Movatterモバイル変換


[0]ホーム

URL:


CN105468420B - operating system upgrading method and device - Google Patents

operating system upgrading method and device
Download PDF

Info

Publication number
CN105468420B
CN105468420BCN201511005881.7ACN201511005881ACN105468420BCN 105468420 BCN105468420 BCN 105468420BCN 201511005881 ACN201511005881 ACN 201511005881ACN 105468420 BCN105468420 BCN 105468420B
Authority
CN
China
Prior art keywords
upgrade
parameter
upgrading
upgrade file
mcu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201511005881.7A
Other languages
Chinese (zh)
Other versions
CN105468420A (en
Inventor
林耿标
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shirui Electronics Co LtdfiledCriticalGuangzhou Shirui Electronics Co Ltd
Priority to CN201511005881.7ApriorityCriticalpatent/CN105468420B/en
Publication of CN105468420ApublicationCriticalpatent/CN105468420A/en
Application grantedgrantedCritical
Publication of CN105468420BpublicationCriticalpatent/CN105468420B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention relates to an operating system upgrading method and device, wherein the method comprises the following steps: acquiring a first upgrade file corresponding to BOOT, a second upgrade file corresponding to a system main program and a third upgrade file corresponding to an MCU (microprogrammed control unit), writing an upgrade command into a backup partition, and setting a first mark for upgrading the BOOT; upgrading the BOOT according to the first mark, the upgrading command and the first upgrading file, setting a second mark for upgrading the main program of the system, and respectively transmitting a first parameter required by upgrading the main program of the system and a second parameter required by upgrading the MCU to the main program of the system and the MCU; responding to the second mark to analyze a second upgrading file, setting a third mark for upgrading the MCU according to an upgrading command, the first parameter and a main program of the upgrading system of the second upgrading file, and transmitting a third parameter required by upgrading the MCU to the MCU; and responding to the third mark to analyze the third upgrading file, and upgrading the MCU according to the upgrading command, the second parameter, the third parameter and the third upgrading file.

Description

Operating system update method and apparatus
Technical field
The present invention relates to software technology fields, more particularly to a kind of operating system update method and apparatus.
Background technique
With the fast development of electronic technology, the performance of terminal operating system is higher and higher, and user can install whereinA variety of applications.In practical application, application the problems such as there may be loophole or having a single function that user is installed, therefore, answerThese applications can be upgraded with developer, with patching bugs or the function of abundant application.
Traditional upgrade method to operating system, usually by BOOT, system main program and MCU(Microcontroller Unit, micro-control unit) separately upgrades.It is many by taking the Intelligent flat of android system as an exampleThe intelligent terminal of android system not only possesses the primary function of single Android, and more MCU that carry remove carry Radio,The peripheral apparatus such as TV (Television, television set) and BT (Blue Tooth, bluetooth), can be realized more powerful function.It is existingHave in technology, Intelligent flat equipment MCU, BOOT, Android main program are all to separate upgrading.
It can be seen that legacy operating system upgrade method, upgrades low efficiency, affects the convenience that terminal uses.
Summary of the invention
Based on this, it is necessary to aiming at the problem that prior art upgrades low efficiency, provide a kind of operating system update method andDevice.
A kind of operating system update method, comprising the following steps:
It is corresponding getting corresponding first upgrade file of BOOT, corresponding second upgrade file of system main program and MCUThird upgrade file after, by the corresponding backup subregion of upgrade command writing system, and be arranged upgrading BOOT first mark;
BOOT is upgraded according to first mark, upgrade command and first upgrade file, then setting risesSecond mark of grade system main program, and needed for the first parameter needed for upgrade-system main program and upgrading MCU second is joinedNumber is transmitted separately to system main program and MCU;
Respond second mark and parse second upgrade file, according to the upgrade command, first parameter andSecond upgrade file upgrades system main program, then the third mark of setting upgrading MCU, and will upgrade MCU instituteThe third parameter needed is transmitted to MCU;
Respond the third mark and parse the third upgrade file, and according to the upgrade command, second parameter,Third parameter and the third upgrade file upgrade MCU.
A kind of operating system update device, comprising:
Writing module, for getting corresponding second upgrading of corresponding first upgrade file of BOOT, system main programAfter file and the corresponding third upgrade file of MCU, by the corresponding backup subregion of upgrade command writing system, and upgrading is setThe first mark of BOOT;
First upgraded module, for according to first mark, upgrade command and first upgrade file to BOOT intoThen the second mark of upgrade-system main program is arranged in row upgrading, and by the first parameter and liter needed for upgrade-system main programSecond parameter needed for grade MCU is transmitted separately to system main program and MCU;
Second upgraded module parses second upgrade file for responding second mark, is ordered according to the upgradingEnable, first parameter and second upgrade file upgrade system main program, then setting upgrading MCU third markWill, and third parameter needed for upgrading MCU is transmitted to MCU;
Third upgraded module parses the third upgrade file for responding the third mark, and according to the upgradingOrder, second parameter, third parameter and the third upgrade file upgrade MCU.
Aforesaid operations method for upgrading system and device, by writing BOOT, MCU and the corresponding upgrade file of system main programEnter the corresponding backup subregion of system, the second mark of upgrade-system main program is set after upgrading to BOOT, responds instituteThe upgrading process that the second mark enters system main program is stated, then the third mark of setting upgrading MCU, responds the third markInto the upgrading process of MCU, disposably BOOT, MCU and system main program can be upgraded, upgrading is high-efficient, using justBenefit.
Detailed description of the invention
Fig. 1 is the operating system update method flow diagram of one embodiment;
Fig. 2 is that the BOOT of one embodiment upgrades flow chart;
Fig. 3 is that the system main program of one embodiment upgrades flow chart;
Fig. 4 is that the MCU of one embodiment upgrades flow chart;
Fig. 5 is the structural schematic diagram of the operating system update device of one embodiment.
Specific embodiment
The embodiment of operating system update method of the invention is described with reference to the accompanying drawing.
Fig. 1 is the operating system update method flow diagram of one embodiment.As shown in Figure 1, operating system liter of the inventionGrade method can comprise the following steps that
S1 is getting corresponding first upgrade file of BOOT, corresponding second upgrade file of system main program and MCU pairsAfter the third upgrade file answered, by the corresponding backup subregion of upgrade command writing system, and the first mark of upgrading BOOT is setWill;
In this step, the corresponding second upgrading text of corresponding first upgrade file of BOOT, system main program can first be obtainedPart and the corresponding third upgrade file of MCU.First upgrade file, the second upgrade file and can be obtained by two waysThree upgrade files.Method first is that directly download first upgrade file, the second upgrade file and third upgrade file, and will underThe upgrade file of load is saved in internal storage device.Method is second is that access movable storage device, and read the mobile storageFirst upgrade file, the second upgrade file and third upgrade file in equipment.
By taking android system as an example, it is corresponding that corresponding first upgrade file of BOOT, android system main program can be obtainedThe second upgrade file and the corresponding third upgrade file of MCU.Sustainable monitoring OTA (Over-the-AirTechnology, over the air) PUSH message, and after receiving OTA PUSH message, upgrading text is downloaded from serverPart.Alternatively, the sustainable access for monitoring movable storage device, and after having detected movable storage device access, scan instituteState the upgrade file in movable storage device.
Then, MCU, the cache of the upgrade command write-in android system of BOOT and Android main program will can be dividedIn the recovery catalogue in area.For example, can define upgrade_all order as to MCU, the three of BOOT and Android main programUnify upgrade command, and by the upgrade_all order be written android system cache subregion recovery catalogueIn.The upgrade_all order is for recording the mark of upgrade-system.
Boot environmental variance upgrade_boot can be set as 1, and restart android system, into bootstrapBootloader detects environmental variance upgrade_boot.The boot environmental variance upgrade_boot is upgrading BOOTFirst mark.
S2 upgrades BOOT according to first mark, upgrade command and first upgrade file, is then arrangedSecond mark of upgrade-system main program, and will be second needed for the first parameter needed for upgrade-system main program and upgrading MCUParameter is transmitted separately to system main program and MCU;
As shown in Fig. 2, can be upgraded according to such as under type to BOOT:
S21 reads first upgrade file after reading the upgrade command;
S22, first upgrade file is verified;
S23, if first upgrade file be it is complete and correct, wipe BOOT storage region, described first is upgradedThe corresponding storage region of BOOT, starting system of laying equal stress on is written in file.
Still by taking android system as an example, the first upgrade file boot.bin can be read, boot.bin is verified, ifBoot.bin be it is complete and correct, corresponding storage region can be wiped by SPI Flash, and BOOT is written into boot.binCorresponding storage region.It is to be written finish after, system can be restarted.
After completing BOOT upgrading process, the second mark of settable upgrade-system main program, and by upgrade-system masterFirst parameter needed for program is transmitted separately to system main program and MCU with the second parameter needed for upgrading MCU.System is detectingTo after second mark, the upgrading process of main program can be executed automatically.
S3 responds second mark and parses second upgrade file, according to the upgrade command, first parameterSystem main program is upgraded with second upgrade file, then the third mark of setting upgrading MCU, and MCU will be upgradedRequired third parameter is transmitted to MCU;
In this step, system can detect whether that there are second marks, if detecting, can respond second markParse second upgrade file.Then, it can detect whether that there are the upgrade commands, and if it exists, can order according to the upgradingEnable, first parameter and second upgrade file upgrade system main program, then setting upgrading MCU third markWill, and third parameter needed for upgrading MCU is transmitted to MCU.Wherein, according to the upgrade command, first parameter and instituteState the second upgrade file the concrete mode that system main program is upgraded may is that in the BOOT program after calling upgrading theOne parameter, and whether include the upgrade command in the corresponding backup subregion of detection system, if comprising can be according to first ginsengSeveral and second upgrade file executes the upgrading process of system main program.
As shown in figure 3, in one embodiment, the upgrading process of system main program can be executed according to such as under type:
S31 reads second upgrade file and the first parameter;
S32 verifies second upgrade file and the first parameter;
S33 will be described if second upgrade file is complete and correct, the storage region of erasing system main programThe corresponding storage region of the system main program, starting system of laying equal stress on is written in second upgrade file and the first parameter.
Still by taking android system as an example, the second upgrade file update.zip can be read, and decompressed.It then, can be rightThe second upgrade file after decompression is verified.It can examine whether SF file matches with RSA file, MANIFEST.MF and signatureIt is whether consistent in file, and described in the second upgrade file and MANIFEST after decompression it is whether consistent.If describedTwo upgrade files be it is complete and correct, can by boot.img be written BOOT subregion, recovery is written into recovery.imgSubregion updates system subregion, and upgrades all firmwares.
After the upgrading process for completing system main program, erasable second mark, the third mark of setting upgrading MCUWill, and third parameter needed for upgrading MCU is transmitted to MCU.
S4 responds the third mark and parses the third upgrade file, and according to the upgrade command, second ginsengNumber, third parameter and the third upgrade file upgrade MCU.Specifically, in the BOOT program after upgrading can be calledThe second parameter and upgrading after system main program in third parameter, and in the corresponding backup subregion of detection system whether includeThe upgrade command;If comprising executing MCU upgrading according to second parameter, third parameter and the third upgrade fileProcess.
As shown in figure 4, in one embodiment, the upgrading process of MCU can be executed according to such as under type:
S41 reads the third upgrade file, the second parameter and third parameter;
S42 verifies the third upgrade file, the second parameter and third parameter;
S43, if the third upgrade file, the second parameter and third parameter be it is complete and correct, wipe the storage of MCUThe corresponding storage region of the MCU is written in the third upgrade file, the second parameter and third parameter by region, and again onElectricity.
Aforesaid operations method for upgrading system, can be after obtaining a upgrade file, to BOOT, system main program and MCUThree-in-one upgrading is carried out, upgrading efficiency is improved.Also, upgrade file can not only be obtained by downloading mode, but also can be passed throughThe mode of insertion movable storage device obtains, and convenient for users and operation improves user experience.
The embodiment of operating system update device of the invention is described with reference to the accompanying drawing.
Fig. 5 is the structural schematic diagram of the operating system update device of one embodiment.As shown in figure 5, operation of the inventionSystem upgrade device can include:
Writing module 10, for get corresponding first upgrade file of BOOT, system main program second liter correspondingAfter grade file and the corresponding third upgrade file of MCU, by the corresponding backup subregion of upgrade command writing system, and upgrading is setThe first mark of BOOT;
The write module 10 can first obtain corresponding second upgrading of corresponding first upgrade file of BOOT, system main programFile and the corresponding third upgrade file of MCU.Can be obtained by two ways first upgrade file, the second upgrade file andThird upgrade file.Method is first is that directly download first upgrade file, the second upgrade file and third upgrade file, and incite somebody to actionThe upgrade file of downloading is saved in internal storage device.Method is second is that access movable storage device, and read the movement and depositStore up first upgrade file, the second upgrade file and the third upgrade file in equipment.
By taking android system as an example, it is corresponding that corresponding first upgrade file of BOOT, android system main program can be obtainedThe second upgrade file and the corresponding third upgrade file of MCU.Sustainable monitoring OTA (Over-the-AirTechnology, over the air) PUSH message, and after receiving OTA PUSH message, upgrading text is downloaded from serverPart.Alternatively, the sustainable access for monitoring movable storage device, and after having detected movable storage device access, scan instituteState the upgrade file in movable storage device.
Then, MCU, the cache of the upgrade command write-in android system of BOOT and Android main program will can be dividedIn the recovery catalogue in area.For example, can define upgrade_all order as to MCU, the three of BOOT and Android main programUnify upgrade command, and by the upgrade_all order be written android system cache subregion recovery catalogueIn.The upgrade_all order is for recording the mark of upgrade-system.
Boot environmental variance upgrade_boot can be set as 1, and restart android system, into bootstrapBootloader detects environmental variance upgrade_boot.The boot environmental variance upgrade_boot is upgrading BOOTFirst mark.
First upgraded module 20, for indicating according to described first, upgrade command and first upgrade file are to BOOTUpgraded, then the second mark of upgrade-system main program be set, and by the first parameter needed for upgrade-system main program andSecond parameter needed for upgrading MCU is transmitted separately to system main program and MCU;
First upgraded module 20 can include:
First reading unit, for reading first upgrade file after reading the upgrade command;
First verification unit, for being verified to first upgrade file;
First writing unit, if for first upgrade file being complete and correct, erasable BOOT storage region,By the corresponding storage region of first upgrade file write-in BOOT, starting system of laying equal stress on.
Still by taking android system as an example, the first upgrade file boot.bin is can be read in the first reading unit, and the first verification is singleMember can verify boot.bin, if boot.bin be it is complete and correct, the first writing unit can be wiped by SPI FlashThe corresponding storage region of BOOT is written except corresponding storage region, and by boot.bin.It is to be written finish after, can restart and beSystem.
After completing BOOT upgrading process, the second mark of the settable upgrade-system main program of the first upgraded module 20,And by the first parameter needed for upgrade-system main program and upgrading MCU needed for the second parameter be transmitted separately to system main program andMCU.System can execute the upgrading process of main program after detecting second mark automatically.
Second upgraded module 30 parses second upgrade file for responding second mark, according to the upgradingOrder, first parameter and second upgrade file upgrade system main program, then the third of setting upgrading MCUMark, and third parameter needed for upgrading MCU is transmitted to MCU;
Second upgraded module 30 can detect whether that there are second marks, if detecting, can respond second markParse second upgrade file.Then, it can detect whether that there are the upgrade commands, and if it exists, can order according to the upgradingEnable, first parameter and second upgrade file upgrade system main program, then setting upgrading MCU third markWill, and third parameter needed for upgrading MCU is transmitted to MCU.Wherein, second upgraded module 30 may include the first calling listMember, for calling the first parameter in the BOOT program after upgrading, first detection unit, for the corresponding backup point of detection systemIt whether include the upgrade command, the first upgrade unit, if for comprising can be according to first parameter and described second in areaThe upgrading process of upgrade file execution system main program.
In one embodiment, the first upgrade unit can include:
Second reading unit, for reading second upgrade file and the first parameter;
Second verification unit, for being verified to second upgrade file and the first parameter;
Second writing unit, if for second upgrade file be it is complete and correct, erasable system main programSecond upgrade file and the first parameter are written the corresponding storage region of the system main program, and restarted by storage regionSystem.
Still by taking android system as an example, the second upgrade file update.zip is can be read in the second reading unit, and is solvedPressure.Then, the second verification unit can verify the second upgrade file after decompression.SF file can be examined is with RSA fileIt is whether consistent in no matching, MANIFEST.MF and signature file, and the second upgrade file after decompression and institute in MANIFESTWhether what is described is consistent.If second upgrade file be it is complete and correct, boot.img can be written for the second writing unitRecovery.img is written recovery subregion, updates system subregion, and upgrade all firmwares by BOOT subregion.
After the upgrading process for completing system main program, erasable second mark of the second upgraded module 30, settingUpgrade the third mark of MCU, and third parameter needed for upgrading MCU is transmitted to MCU.
Third upgraded module 40 parses the third upgrade file for responding the third mark, and according to the literGrade order, second parameter, third parameter and the third upgrade file upgrade MCU.The third upgraded module40 can include: the second call unit, for the main journey of system after calling the second parameter in the BOOT program after upgrading and upgradingThird parameter in sequence;Second detection unit, for whether including the upgrade command in the corresponding backup subregion of detection system;Second upgrade unit, if for comprising executing MCU according to second parameter, third parameter and the third upgrade fileUpgrade process.
In one embodiment, the second upgrade unit can include:
Third reading unit, for reading the third upgrade file, the second parameter and third parameter;
Third verification unit, for being verified to the third upgrade file, the second parameter and third parameter;
Third writing unit, if for the third upgrade file, the second parameter and third parameter be it is complete and correct,The third upgrade file, the second parameter and third parameter, are written that the MCU is corresponding to be deposited by the storage region of erasable MCUStorage area domain, and re-power.
Aforesaid operations system upgrade device, can be after obtaining a upgrade file, to BOOT, system main program and MCUThree-in-one upgrading is carried out, upgrading efficiency is improved.Also, upgrade file can not only be obtained by downloading mode, but also can be passed throughThe mode of insertion movable storage device obtains, and convenient for users and operation improves user experience.
Operating system update device of the invention and operating system update method of the invention correspond, in aforesaid operationsTechnical characteristic and its advantages that the embodiment of method for upgrading system illustrates are suitable for the implementation of operating system update deviceIn example, hereby give notice that.
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned realityIt applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not depositedIn contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneouslyIt cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the artIt says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the inventionRange.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (10)

CN201511005881.7A2015-12-252015-12-25operating system upgrading method and deviceActiveCN105468420B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201511005881.7ACN105468420B (en)2015-12-252015-12-25operating system upgrading method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201511005881.7ACN105468420B (en)2015-12-252015-12-25operating system upgrading method and device

Publications (2)

Publication NumberPublication Date
CN105468420A CN105468420A (en)2016-04-06
CN105468420Btrue CN105468420B (en)2018-12-28

Family

ID=55606158

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201511005881.7AActiveCN105468420B (en)2015-12-252015-12-25operating system upgrading method and device

Country Status (1)

CountryLink
CN (1)CN105468420B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108024002B (en)*2016-10-312021-05-07成都卫士通信息产业股份有限公司Method for constructing dual-domain mobile phone system based on ROM
CN107092504A (en)*2017-03-302017-08-25努比亚技术有限公司A kind of mobile terminal and its upgrade method
CN108304210B (en)*2018-02-072021-08-06深圳市布谷鸟科技有限公司Upgrading method of automobile instrument panel
CN109032632B (en)*2018-07-132021-11-09高新兴物联科技有限公司FOTA upgrading method, wireless communication terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070073978A1 (en)*2005-09-272007-03-29Samsung Electronics Co., Ltd.Method and system for booting and automatically updating software, and recovering from update error, and computer readable recording medium storing method
CN102955701A (en)*2011-08-222013-03-06深圳市金溢科技有限公司Application update method by boot loader
CN103995712A (en)*2014-04-162014-08-20潍柴动力股份有限公司Boot loader device capable of updating automatically and updating method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070073978A1 (en)*2005-09-272007-03-29Samsung Electronics Co., Ltd.Method and system for booting and automatically updating software, and recovering from update error, and computer readable recording medium storing method
CN102955701A (en)*2011-08-222013-03-06深圳市金溢科技有限公司Application update method by boot loader
CN103995712A (en)*2014-04-162014-08-20潍柴动力股份有限公司Boot loader device capable of updating automatically and updating method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈曦.基于自编程功能的MCUBootloader设计.《电子设计工程》.2010,第18卷(第11期),第65-68页.*

Also Published As

Publication numberPublication date
CN105468420A (en)2016-04-06

Similar Documents

PublicationPublication DateTitle
CN105094903B (en)The method and device that firmware is upgraded
CN101931944B (en)Method, device and system for updating terminal patches on line
CN105094913B (en)System, base band firmware and system application upgrade method and device
WO2015154385A1 (en)Method and terminal for ota updating
CN101344854B (en)Method for upgrading embedded type Linux equipment through SD card
CN105468420B (en)operating system upgrading method and device
CN104978271B (en) A pressure measurement method and system for automatic upgrade of Android system
CN104506639A (en) A method and device for obtaining root authority
CN112312212B (en)Upgrading method and related device for digital television system
CN106210877A (en)The method for upgrading system of intelligent television and device
CN103559065A (en)Method and system for OTA (Over-the-Air Technology) upgrade
CN109089108A (en)test method and system
CN102946600A (en)Method and system for updating mobile terminal parameters by firmware
CN109002305B (en)Method and system for updating equipment program
CN103019764B (en)The detection method of Andriod resource bag installability and system
CN103164247A (en)Method and device for automatically repairing system application
CN109002314A (en)Oftware updating method, device, electronic equipment and storage medium
CN112463199A (en)System upgrading method and terminal
CN105700903A (en)User terminal upgrading method and user terminal
CN107967207B (en)Method and device for testing user interface interaction function
CN108322540A (en)Customized data lead-in method, terminal and computer readable storage medium
CN102664990A (en)Installation and display method of dynamic wallpaper of Android mobile phone
CN105740025A (en)Bluetooth based firmware program upgrading method and apparatus
CN105677409A (en)System upgrading method and device
CN105045671A (en)Method and device for upgrading systems of intelligent terminals

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp