CN102364446A - Embedded system, security upgrading method and running method for embedded system - Google Patents

Embedded system, security upgrading method and running method for embedded system Download PDF

Info

Publication number
CN102364446A
CN102364446A CN2011103690058A CN201110369005A CN102364446A CN 102364446 A CN102364446 A CN 102364446A CN 2011103690058 A CN2011103690058 A CN 2011103690058A CN 201110369005 A CN201110369005 A CN 201110369005A CN 102364446 A CN102364446 A CN 102364446A
Authority
CN
China
Prior art keywords
loader
boot
main
embedded system
upgrading
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.)
Pending
Application number
CN2011103690058A
Other languages
Chinese (zh)
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.)
BEIJING CLOUD-FRAME TECHNOLOGY Co Ltd
Original Assignee
BEIJING CLOUD-FRAME TECHNOLOGY 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 BEIJING CLOUD-FRAME TECHNOLOGY Co Ltd filed Critical BEIJING CLOUD-FRAME TECHNOLOGY Co Ltd
Priority to CN2011103690058A priority Critical patent/CN102364446A/en
Publication of CN102364446A publication Critical patent/CN102364446A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides an embedded system, a security upgrading method and a running method for the embedded system. The embedded system is provided with a master boot loader and a slave boot loader. The security upgrading method for the embedded system comprises the following steps that: the master boot loader detects whether the slave boot loader is effective; if the slave boot loader is effective, the master boot loader upgrades the slave boot loader; and the master boot loader updates a version number of the slave boot loader so as to judge whether the slave boot loader is upgraded according to the version number during booting. By upgrading the slave boot loader, the master boot loader cannot be damaged during upgrading; therefore, non-recovered errors due to system upgrading error can be avoided and the security of system upgrading can be guaranteed; furthermore, by updating the version number of the slave boot loader, the upgraded boot loader program can work.

Description

Embedded system and safety upgrade method and operation method
Technical field
The present invention relates to the embedded system technology field, relate in particular to a kind of embedded system and safety upgrade method and operation method.
Background technology
The composition of general embedded system has three part: Bootloader (boot-loader), Kernel (kernel) and UI (user interface).Carry out Bootloader in the time of system start-up at first, carry out Kernel and UI then, and the upgrade function of system is generally realized in Bootloader.
If system makes mistakes or power down in the process of upgrading Kernel and UI, then can repair.Because the Bootloader of this moment still is complete, when Bootloader starts once more, find that Kernel and UI are imperfect, then can get into upgrade mode once more and upgrade with repair system.
The shortcoming that prior art exists is, if system makes mistakes or power down in the process of upgrading Bootloader, because Bootloader is imperfect, then can cause system to start, and user's repair system voluntarily.
Summary of the invention
The present invention is intended to solve at least one of technical matters that exists in the prior art.
For this reason, one object of the present invention is to propose a kind of safety upgrade method that can guarantee the embedded system of system complete upgrading, avoids in the escalation process because the system that power down etc. cause is irrecoverable.
Another object of the present invention is to propose a kind of operation method of embedded system.
Another purpose of the present invention is to propose a kind of embedded system.
For realizing above-mentioned purpose; A kind of safety upgrade method of embedded system is proposed according to the embodiment of first aspect present invention; Wherein embedded system has main boot-loader and is equipped with boot-loader, and said safety upgrade method may further comprise the steps: said main boot-loader detection is said, and whether boot-loader is effective fully; When the said boot-loader that is equipped with when effective, said main boot-loader is upgraded to the said boot-loader that is equipped with; And upgrade the said version number that is equipped with boot-loader, so that said main boot-loader judges according to said version number whether the said boot-loader that is equipped with upgrades when starting.
Safety upgrade method according to the embedded system of the embodiment of the invention; Through upgrading to being equipped with boot-loader; Guarantee that main boot-loader can not be destroyed in upgrading, thereby the mistake that can't recover after avoiding system upgrade to make mistakes guarantees the security of system upgrade.And, through upgrading the boot-loader fully after the version number that is equipped with boot-loader guarantees loading upgrading, the Boot loader onset after the feasible upgrading.
Be to realize above-mentioned purpose, propose a kind of operation method of embedded system according to the embodiment of second aspect present invention, wherein embedded system has main boot-loader and is equipped with boot-loader, and said operation method may further comprise the steps: start said main boot-loader; Said main boot-loader judges whether the said boot-loader that is equipped with upgrades; If the said boot-loader that is equipped with is not upgraded, then said main boot-loader is further checked the integrality of kernel file and interface file; And if the said boot-loader that is equipped with upgrades, then said main boot-loader loads and saidly is equipped with boot-loader, and further checks the integrality of kernel file and interface file.
According to the operation method of the embedded system of the embodiment of the invention, through judging whether be equipped with boot-loader upgrades, guarantee the Boot loader after the operation upgrading, thereby guarantee the validity of system upgrade.
Be to realize above-mentioned purpose, propose a kind of embedded system, comprising: be equipped with boot-loader, be used to preserve the Boot loader after the upgrading, and after upgrading, upgrade the version number of Boot loader according to the embodiment of third aspect present invention; And main boot-loader; Be used for after starting, judging whether the said boot-loader that is equipped with upgrades; And if the said boot-loader that is equipped with is not upgraded; Then said main boot-loader is further checked the integrality of kernel file and interface file, and if the said boot-loader that is equipped with upgrade, then said main boot-loader loads the said boot-loader that is equipped with.
Embedded system according to the embodiment of the invention; Through increase to be equipped with boot-loader and to upgrade to being equipped with boot-loader; Guarantee that main boot-loader can not be destroyed in upgrading, thereby the mistake that can't recover after avoiding system upgrade to make mistakes guarantees the security of system upgrade.And, through upgrading the Boot loader onset after the version number that is equipped with boot-loader guarantees upgrading.
Additional aspect of the present invention and advantage part in the following description provide, and part will become obviously from the following description, or recognize through practice of the present invention.
Description of drawings
Above-mentioned and/or additional aspect of the present invention and advantage obviously with are easily understood becoming the description of embodiment from combining figs, wherein:
Fig. 1 is the process flow diagram of safety upgrade method of the embedded system of one embodiment of the invention;
Fig. 2 is the process flow diagram of operation method of the embedded system of one embodiment of the invention;
Fig. 3 is the process flow diagram of operation method of the embedded system of another embodiment of the present invention; And
Fig. 4 is the structured flowchart of the embedded system of one embodiment of the invention.
Embodiment
Describe embodiments of the invention below in detail, the example of said embodiment is shown in the drawings, and wherein identical from start to finish or similar label is represented identical or similar elements or the element with identical or similar functions.Be exemplary through the embodiment that is described with reference to the drawings below, only be used to explain the present invention, and can not be interpreted as limitation of the present invention.
In description of the invention, unless otherwise prescribed and limit, need to prove; Term " installation ", " linking to each other ", " connection " should be done broad understanding, for example, can be mechanical connection or electrical connection; Also can be the connection of two element internals, can be directly to link to each other, and also can link to each other indirectly through intermediary; For those of ordinary skill in the art, can understand the concrete implication of above-mentioned term as the case may be.
Fig. 1 is the process flow diagram of safety upgrade method of the embedded system of one embodiment of the invention.In an embodiment of the present invention, embedded system has main boot-loader and is equipped with boot-loader, and the main boot-loader of start operation is equipped with the backup of boot-loader as main boot-loader, the boot-loader fully of only upgrading in the time of upgrading.As shown in Figure 1, this safety upgrade method may further comprise the steps:
Step S101, main boot-loader detect whether boot-loader is effective fully.
Particularly, in examples more of the present invention, judge whether be equipped with boot-loader effectively can confirm through inspection CRC (Cyclic redundancy check, CRC).4 at the end that is equipped with the Boot loader file when system dispatches from the factory is the CRC of file, when system start-up, calculate to be equipped with the CRC of Boot loader file, judges whether the CRC when dispatching from the factory matees, if coupling, it is effective that then explanation is equipped with boot-loader.
Step S102, when boot-loader was effective fully, main boot-loader was upgraded to being equipped with boot-loader.
In the process of upgrading; Main boot-loader keeps virgin state constant; Upgrading never, thus guarantee that main boot-loader can not be destroyed in upgrading, guarantee still can start with the realization system reparation of upgrading once more after system upgrade is made mistakes through main boot-loader.
Step S103 when being equipped with the boot-loader inefficacy, do not upgrade to being equipped with to guide to be contained in, and whether boot-loader is effective fully to detecting again after boot-loader is repaired fully.
Step S104 after being equipped with the boot-loader upgrading, upgrades the version number that is equipped with boot-loader, so that main boot-loader judges according to version number whether be equipped with boot-loader upgrades when starting.
For guarantee to upgrade to be equipped with boot-loader effective; When starting, main boot-loader should check whether boot-loader is new fully; If it is newer than self to find to be equipped with boot-loader, the version number that promptly is equipped with boot-loader is newer than the version number of self, just loads to be equipped with the boot-loader operation.
Particularly; In one embodiment of the invention; The version number that is equipped with boot-loader calculates through the CRC that is equipped with boot-loader, and after being equipped with the boot-loader upgrading, the CRC that is equipped with the Boot loader file changes; During system start-up, whether the CRC through calculate being equipped with boot-loader matees with the CRC of main boot-loader is judged whether be equipped with boot-loader upgrades.Do not match if be equipped with the CRC of boot-loader and the CRC of main boot-loader, then main boot-loader judges that being equipped with boot-loader upgrades.Thus, main boot-loader is equipped with boot-loader after can loading upgrading, makes Boot loader onset after the upgrading.
Safety upgrade method according to the embedded system of the embodiment of the invention; Through upgrading to being equipped with boot-loader; Guarantee that main boot-loader can not be destroyed in upgrading, thereby the mistake that can't recover after avoiding system upgrade to make mistakes guarantees the security of system upgrade.And, guarantee the boot-loader that is equipped with after can loading upgrading through the version number that upgrade to be equipped with boot-loader, make Boot loader onset after the upgrading.
Describe the operation method of the embedded system of the embodiment of the invention in detail below in conjunction with Fig. 2 and Fig. 3.
Fig. 2 is the process flow diagram of operation method of the embedded system of one embodiment of the invention; In an embodiment of the present invention; Embedded system has main boot-loader and is equipped with boot-loader; Start main boot-loader during start, be equipped with the backup of boot-loader, the boot-loader fully of only upgrading in the time of upgrading as main boot-loader.This operation method may further comprise the steps:
Step S201 starts main boot-loader.
Step S202, main boot-loader judge whether be equipped with boot-loader upgrades.
In one embodiment of the invention, main boot-loader judges through the version number that is equipped with boot-loader whether be equipped with boot-loader upgrades.Particularly, the version number that is equipped with boot-loader calculates through the CRC that is equipped with boot-loader, and CRC changes after being equipped with the boot-loader upgrading.Do not match if be equipped with the CRC of boot-loader and the CRC of main boot-loader, then main boot-loader judges that being equipped with boot-loader upgrades.Otherwise main boot-loader judges that being equipped with boot-loader does not upgrade.Upgrade if be equipped with boot-loader, then execution in step S203; Otherwise, execution in step S204.
Step S203, main boot-loader load and are equipped with boot-loader.Then, execution in step S204.
Step S204, main boot-loader is further checked the integrality of kernel file and interface file.
According to the operation method of the embedded system of the embodiment of the invention, through judging whether be equipped with boot-loader upgrades, guarantee the Boot loader after the operation upgrading, thereby guarantee the validity of system upgrade.
Fig. 3 is the process flow diagram of operation method of the embedded system of another embodiment of the present invention; In an embodiment of the present invention; Embedded system has main boot-loader and is equipped with boot-loader; Start main boot-loader during start, be equipped with the backup of boot-loader, the boot-loader fully of only upgrading in the time of upgrading as main boot-loader.As shown in Figure 3, this operation method may further comprise the steps:
Step S301 starts main boot-loader.
Step S302, main boot-loader judge whether be equipped with boot-loader upgrades.Upgrade if be equipped with boot-loader, then execution in step S303; Otherwise, execution in step S304.
Step S303, the boot-loader fully behind the main boot-loader loading upgrading.Then, continue execution in step S304.
Step S304, main boot-loader check further whether kernel file and interface file be complete.If it is imperfect that main boot-loader is confirmed kernel file and interface file, then execution in step S305; If it is complete that main boot-loader is confirmed kernel file and interface file, then execution in step S306.
Step S305 upgrades to repair kernel file and interface file to kernel file and interface file again.Then, continue execution in step S306.
Step S306 starts corresponding kernel and interface successively.
Thus, guarantee the complete upgrading and normal operation of embedded system.
For realizing the foregoing description, the present invention also proposes a kind of embedded system.
Fig. 4 is the structured flowchart of the embedded system of one embodiment of the invention.As shown in Figure 4, this embedded system comprises: be equipped with boot-loader 100 and main boot-loader 200.Start main boot-loader 200 during start, be equipped with the backup of boot-loader 100, the boot-loader 100 fully of only upgrading in the time of upgrading, the main boot-loader 200 of not upgrading as main boot-loader 200.
Particularly, be equipped with the Boot loader after boot-loader 100 is used to preserve upgrading, and after upgrading, upgrade the version number of Boot loader.Main boot-loader 200 is used for after starting, judging whether be equipped with boot-loader 100 upgrades; And if boot-loader 100 is not upgraded fully; Then main boot-loader 200 is further checked the integrality of kernel file and interface file; And if boot-loader 100 has been upgraded fully, then main boot-loader 200 loads and is equipped with boot-loader 100.
In one embodiment of the invention; The version number that is equipped with boot-loader 100 calculates through the CRC that is equipped with boot-loader; CRC changes after being equipped with boot-loader 100 upgradings; Do not match if be equipped with the CRC of boot-loader 100 and the CRC of main boot-loader 200, then main boot-loader 200 judges that being equipped with boot-loader 100 has upgraded.
Embedded system according to the embodiment of the invention; Through increase to be equipped with boot-loader 100 and to upgrade to being equipped with boot-loader 100; Guarantee that main boot-loader 200 can not be destroyed in upgrading, thereby the mistake that can't recover after avoiding system upgrade to make mistakes guarantees the security of system upgrade.And, through upgrading the Boot loader onset after the version number that is equipped with boot-loader 100 guarantees upgrading.
Should be understood that the present invention can realize in the system of arm linux, also can on the embedded system of using other operating systems, realize.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means the concrete characteristic, structure, material or the characteristics that combine this embodiment or example to describe and is contained at least one embodiment of the present invention or the example.In this manual, the schematic statement to above-mentioned term not necessarily refers to identical embodiment or example.And concrete characteristic, structure, material or the characteristics of description can combine with suitable manner in any one or more embodiment or example.
Although illustrated and described embodiments of the invention; Those having ordinary skill in the art will appreciate that: under the situation that does not break away from principle of the present invention and aim, can carry out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is limited claim and equivalent thereof.

Claims (9)

1. the safety upgrade method of an embedded system is characterized in that, embedded system has main boot-loader and is equipped with boot-loader, said method comprising the steps of:
Said main boot-loader detection is said, and whether boot-loader is effective fully;
When the said boot-loader that is equipped with when effective, said main boot-loader is upgraded to the said boot-loader that is equipped with; And
Upgrade the said version number that is equipped with boot-loader, so that said main boot-loader judges according to said version number whether the said boot-loader that is equipped with upgrades when starting.
2. the safety upgrade method of embedded system as claimed in claim 1 is characterized in that, in escalation process, said main boot-loader keeps virgin state.
3. the safety upgrade method of embedded system as claimed in claim 2; It is characterized in that; The said version number that is equipped with boot-loader calculates through the said CRC that is equipped with boot-loader; Said CRC changes after the upgrading of said boot-loader fully, if the said CRC of boot-loader fully and the CRC of said main boot-loader do not match, the said boot-loader fully of then said main boot-loader judgement is upgraded.
4. the operation method of an embedded system is characterized in that, embedded system has main boot-loader and is equipped with boot-loader, said method comprising the steps of:
Start said main boot-loader;
Said main boot-loader judges whether the said boot-loader that is equipped with upgrades;
If the said boot-loader that is equipped with is not upgraded, then said main boot-loader is further checked the integrality of kernel file and interface file; And
If the said boot-loader that is equipped with is upgraded, then said main boot-loader loads said boot-loader fully, and further checks the integrality of kernel file and interface file.
5. the operation method of embedded system as claimed in claim 4 is characterized in that, also comprises:
If said kernel file and interface file are complete, then start corresponding kernel and interface successively;
If said kernel file and interface file are imperfect, then said kernel file and interface file are upgraded to repair said kernel file and interface file.
6. like the operation method of claim 4 or 5 described embedded systems, it is characterized in that said main boot-loader judges according to the said version number that is equipped with boot-loader whether the said boot-loader that is equipped with upgrades.
7. the operation method of embedded system as claimed in claim 6; It is characterized in that; The said version number that is equipped with boot-loader calculates through the said CRC that is equipped with boot-loader; Said CRC changes after the upgrading of said boot-loader fully, if the said CRC of boot-loader fully and the CRC of said main boot-loader do not match, the said boot-loader fully of then said main boot-loader judgement is upgraded.
8. an embedded system is characterized in that, comprising:
Be equipped with boot-loader, be used to preserve the Boot loader after the upgrading, and after upgrading, upgrade the version number of Boot loader; And
Main boot-loader; Be used for after starting, judging whether the said boot-loader that is equipped with upgrades; And if the said boot-loader that is equipped with is not upgraded; Then said main boot-loader is further checked the integrality of kernel file and interface file, and if the said boot-loader that is equipped with upgrade, then said main boot-loader loads the said boot-loader that is equipped with.
9. embedded system as claimed in claim 8; It is characterized in that; The said version number that is equipped with boot-loader calculates through the said CRC that is equipped with boot-loader; Said CRC changes after the upgrading of said boot-loader fully, if the said CRC of boot-loader fully and the CRC of said main boot-loader do not match, the said boot-loader fully of then said main boot-loader judgement is upgraded.
CN2011103690058A 2011-11-17 2011-11-17 Embedded system, security upgrading method and running method for embedded system Pending CN102364446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103690058A CN102364446A (en) 2011-11-17 2011-11-17 Embedded system, security upgrading method and running method for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103690058A CN102364446A (en) 2011-11-17 2011-11-17 Embedded system, security upgrading method and running method for embedded system

Publications (1)

Publication Number Publication Date
CN102364446A true CN102364446A (en) 2012-02-29

Family

ID=45691012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103690058A Pending CN102364446A (en) 2011-11-17 2011-11-17 Embedded system, security upgrading method and running method for embedded system

Country Status (1)

Country Link
CN (1) CN102364446A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618145A (en) * 2014-12-31 2015-05-13 杭州华三通信技术有限公司 System starting method and device
CN105159792A (en) * 2015-08-17 2015-12-16 深圳市中兴物联科技有限公司 Method and apparatus for assisting in stabilizing product system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1749963A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Upgrading method for Boot software and recovering method for Boot software
CN101067791A (en) * 2007-06-28 2007-11-07 中兴通讯股份有限公司 Set-up method and device for starting chip software version information
CN101158907A (en) * 2007-10-26 2008-04-09 中兴通讯股份有限公司 Bootstrap on-line upgrading method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1749963A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Upgrading method for Boot software and recovering method for Boot software
CN101067791A (en) * 2007-06-28 2007-11-07 中兴通讯股份有限公司 Set-up method and device for starting chip software version information
CN101158907A (en) * 2007-10-26 2008-04-09 中兴通讯股份有限公司 Bootstrap on-line upgrading method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618145A (en) * 2014-12-31 2015-05-13 杭州华三通信技术有限公司 System starting method and device
CN104618145B (en) * 2014-12-31 2018-05-08 新华三技术有限公司 A kind of system start method and equipment
CN105159792A (en) * 2015-08-17 2015-12-16 深圳市中兴物联科技有限公司 Method and apparatus for assisting in stabilizing product system

Similar Documents

Publication Publication Date Title
CN101281469B (en) Embedded type system and start-up load application method
CN102693139B (en) A kind of method and system of radio upgrade cell phone software
CN101719072A (en) Embedded type terminal equipment software upgrading method and upgrading device
KR100952585B1 (en) Method and system for automatic recovery of an embedded operating system
CN105302593B (en) The remote update system and method for PowerPC motherboard
CN102110000A (en) Method, device and equipment for controlling software for auto-updating
CN102222011A (en) Software upgrading method for set-top box and set-top box
US20080028386A1 (en) Transmission apparatus and method of automatically updating software
CN101567962A (en) Double-Loader updating method for set-top box
CN102023881A (en) Method and device for upgrading software as well as embedded device
US7882388B2 (en) Dual independent non volatile memory systems
CN106775674B (en) Equipment based on universal boot loader and starting method thereof
EP3040854B1 (en) Method, apparatus and storage medium for dynamically patching function
CN103970564A (en) Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions
JP2009116642A (en) Method and program for recovering from pci bus fault
CN105183580A (en) Storage method and fault recovery method for bootstrap program, and devices
CN111090443A (en) Method, equipment and storage medium for guaranteeing safe upgrade of linux system
CN102364446A (en) Embedded system, security upgrading method and running method for embedded system
CN111273928B (en) Bootloader design method for self-upgrading
CN104699569B (en) A kind of MQX operation system images structure, MQX operating systems, power information acquisition terminal and image update method
JP2005284902A (en) Terminal device, control method and control program thereof, host device, control method and control program thereof, and method, system, and program for remote updating
CN102541585A (en) Remote upgrade method and embedded system
CN102917267A (en) Set-top box upgrading method and device
CN110427286B (en) Gateway server main and standby system recovery method
CN103177213A (en) Software bug fix method and software bug fix system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120229