CN102169445A - Security upgrading method for BootRom - Google Patents

Security upgrading method for BootRom Download PDF

Info

Publication number
CN102169445A
CN102169445A CN2011101232407A CN201110123240A CN102169445A CN 102169445 A CN102169445 A CN 102169445A CN 2011101232407 A CN2011101232407 A CN 2011101232407A CN 201110123240 A CN201110123240 A CN 201110123240A CN 102169445 A CN102169445 A CN 102169445A
Authority
CN
China
Prior art keywords
address table
mirror image
bootrom
address
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.)
Granted
Application number
CN2011101232407A
Other languages
Chinese (zh)
Other versions
CN102169445B (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.)
Anhui Tengling Technology Co ltd
Original Assignee
HEFEI HUAYUN COMMUNICATION 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 HEFEI HUAYUN COMMUNICATION TECHNOLOGY Co Ltd filed Critical HEFEI HUAYUN COMMUNICATION TECHNOLOGY Co Ltd
Priority to CN2011101232407A priority Critical patent/CN102169445B/en
Publication of CN102169445A publication Critical patent/CN102169445A/en
Application granted granted Critical
Publication of CN102169445B publication Critical patent/CN102169445B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a security upgrading method for a BootRom. The method comprises the following steps of: starting a system, downloading a high-version BootRom mirror image and storing the BootRom mirror image into a memory; verifying the correctness of the downloaded mirror image; analyzing a primary address table to obtain standby area addresses; storing the mirror image and judging whether the mirror image is stored successfully or not; and updating the primary address table and a standby address table in turn. By the security upgrading method for the BootRom, the problem of a situation that Flash is back to a factory to be reprogrammed by using equipment because of an upgrading failure of the BootRom, so that the security upgrading method has the advantages that the system can be started normally, the data damaged by the upgrading failure can be modified and the like even if the upgrading fails.

Description

The safety upgrade method of a kind of BootRom
Technical field
The present invention relates to the safety upgrade method of a kind of BootRom (Boot Read-Only-Memory, system start-up ROM (read-only memory)), especially a kind of safety upgrade method of avoiding the BootRom of communication facilities BootRom upgrading failure.
Background technology
In communication facilities, the startup mirror image that equipment one powers on and will carry out among the BootRom comes application programs to unpack, decompress, guide operations such as execution by this startup mirror image again.Wherein, this application program has comprised operating system program, BSP program and other application layer programs etc.When the packet format of application program, compression algorithm etc. change, just need upgrade to BootRom.
Usually, upgrading for BootRom has three kinds of modes: upgrade self in (1) BootRom operational process, this upgrading mode is simple and convenient, cost is lower, if but in escalation process, cut off the power supply, mishap such as device reset, may cause system to start, can not upgrade once more; Equipment need be returned manufacturer, change chip or sintering again, thereby influence the normal operation and the use of equipment; (2) open device housings, the Flash chip is welded from integrated circuit board, the Flash fever writes by special use writes ROMPaq, and then is soldered on the integrated circuit board; (3) jtag interface that utilizes CPU to provide comes Flash is programmed.Described back two kinds of methods all need special-purpose hardware supported, and technician's technical merit had relatively high expectations, need train accordingly the technician, all need very high cost on hardware and human resources, this can cause the raising of device upgrade cost undoubtedly.
In the prior art,, usually BootRom is compiled as two different mirror images, is referred to as root segment and expanding section (as shown in Figure 7) usually for addressing these problems.Root segment is carried out different functions respectively with expanding section.The function of root segment is very simple, and main effect is the upgrading that realizes expanding section.Expanding section is realized system initialization, greater functionality such as application program updating.Root segment and expanding section are stored in the different spaces of Flash.The mirror image of scalable expanding section in root segment is if the upgrading failure can be upgraded to expanding section once more.When the upgrading root segment, when writing root segment among the Flash, if accidents such as generation is cut off the power supply suddenly, device reset can cause root segment upgrading failure.At this moment,, will cause equipment to start, and have only equipment is brought back producer, burned again BootRom mirror image because root segment is imperfect.And, the expanding section of in root segment, upgrading, root segment will comprise some communications protocol, this has just increased the complicacy that root segment realizes.
Summary of the invention
The present invention is the weak point that exists in the above-mentioned prior art for avoiding, and the safety upgrade method of a kind of BootRom is provided, with solve in upgrading BootRom process burst accident cause upgrading failure, can not start-up system problem.
The invention provides the safety upgrade method of a kind of BootRom.
The safety upgrade method of a kind of BootRom may further comprise the steps:
A. system start-up downloads the BootRom mirror image of highest version get off, and is saved in the internal memory; B. the mirror image of downloading is carried out the correctness verification; If the mirror image of downloading is incorrect, then upgrading failure; If the mirror image of downloading is correct, then continue next step; C. resolve the master and use address table, obtain the address, spare area; D. preserve mirror image, and judge whether successful mirror image is preserved; If mirror image is preserved unsuccessful, then upgrading failure; If mirror image is preserved successfully, continuing next step; E. lead be set to the effective identifier of address table invalid; Upgrade the main address table of using, be about to the master and exchange with main area address in the address table and address, spare area; Then, being provided with main is effectively with the effective identifier of address table; F. the effective identifier of standby address table be set to invalid; Upgrade the standby address table, be about to main area address and the exchange of address, spare area in the standby address table; Then, the effective identifier of standby address table is set for effective; G. upgrade successfully.
Compared with the prior art, beneficial effect of the present invention is embodied in:
The safety upgrade method of BootRom of the present invention in the process of upgrading, leaves the BootRom that moves in the main area in, and the BootRom of the highest version of downloading leaves in the spare area.If upgrade successfully, again main area address in the address table and address, spare area are exchanged.So, when system powers on once more, new BootRom mirror image will be used.By the main mode that backs up mutually with address table and standby address epiphase, accidents such as unexpected power down, device reset when preventing the scheduler table.Use address table to determine the main area address, can guarantee what upgrade successfully back execution it is up-to-date BootRom mirror image, upgrading is unsuccessful, still carries out original BootRom mirror image, normally start-up system.Determine the main area address by address table, the main area address can change like this, can be when writing the BootRom mirror image among the Flash, thus avoid bad piece of Flash or bad block.The mirror image of downloading is kept at the spare area earlier, and unsuccessful original BootRom mirror image that destroys prevents to upgrade.The safety upgrade method of BootRom of the present invention, can not occur to go back to factory and use the equipment situation of programming Flash again because of BootRom upgrading failure, the normally start-up system even upgrading is failed also, and can repair the data of damaging because of the upgrading failure, effectively reduce human cost and handling cost, improved the synthesized competitiveness of product.
Description of drawings
Fig. 1 is the distribution synoptic diagram in space among the Flash of safety upgrade method of BootRom of the present invention.
Fig. 2 is the structural representation of address table of the safety upgrade method of BootRom of the present invention.
Fig. 3 is the upgrading process flow diagram of the safety upgrade method of BootRom of the present invention.
Fig. 4 is that the BootRom of the safety upgrade method of BootRom of the present invention starts process flow diagram.
Fig. 5 is the preceding address table of upgrading of the safety upgrade method of BootRom of the present invention.
Fig. 6 is the address table after the upgrading success of safety upgrade method of BootRom of the present invention.
Fig. 7 is the distribution synoptic diagram in space among the Flash of the prior art.
Below pass through embodiment, and the invention will be further described in conjunction with the accompanying drawings.
Embodiment
Referring to Fig. 1~Fig. 6, the safety upgrade method of a kind of BootRom may further comprise the steps:
A. system start-up downloads the BootRom mirror image of highest version get off, and is saved in S301 in the internal memory;
B. the mirror image of downloading is carried out correctness verification S302; If the mirror image of downloading is incorrect, then upgrading failure; If the mirror image of downloading is correct, then continue next step;
C. resolve the master and use address table, obtain address, spare area S303;
D. preserve mirror image S304, and judge that whether mirror image preserve successful S305; If mirror image is preserved unsuccessful, then upgrading failure; If mirror image is preserved successfully, continuing next step; Mirror image in the spare area is read, with image ratio in the internal memory, if the two unanimity illustrate and preserve successfully, continue execution in step e.If the two is inconsistent, then failure is preserved in explanation, can preserve once more.If repeatedly preserve when all failing, then will preserve the address and add constant offset, continue again to preserve.If preserve successfully this moment, continue execution in step e.If also failure, then this upgrading failure.If in the implementation of step a~steps d, cut off the power supply, fortuitous event such as device reset, this moment is main with address table and the not change of standby address table, when system restarts, will carry out the BootRom in original MIRROR SITE, the failure of also just can not upgrading, can not guide and the situation of upgrade-system.
E. lead with the effective identifier of address table and be set to invalid S306; Upgrade the main address table of using, be about to the master and exchange S307 with main area address in the address table and address, spare area; Then, being provided with main is effective S308 with the effective identifier of address table; It is an atomic operation that step e guarantees to upgrade main process with address table; In this process, if cut off the power supply, accident such as device reset, main effective sign with address table is invalid, illustrates that this upgrading fails.When system re-powered, the fixed mirror picture of execution can be come the content copy of standby address table, upgrades the main address table of using, to repair the main address table of using.
F. the effective identifier of standby address table is set to invalid S309; Upgrade the standby address table, be about to main area address and address, spare area exchange S310 in the standby address table; Then, the effective identifier of standby address table being set is effective S311; The process that step f guarantees to upgrade the standby address table is an atomic operation, and in this process, if cut off the power supply, accident such as device reset, effective sign of standby address table is invalid, and this upgrading failure is described.When system re-powered, the fixed mirror picture of execution can be come main content copy with address table, upgrades the standby address table, to repair the standby address table.
G. upgrade successfully.
Safety upgrade method of the present invention is by the main mode that backs up mutually with address table and standby address epiphase, the phenomenon that accidents such as unexpected power down, device reset cause system to start when preventing the scheduler table.After upgrading successfully, main area address in the address table and address, spare area exchange, the BootRom mirror image that this sampling device powers on once more and will use upgrading recently to obtain.The mirror image of downloading is kept at the spare area earlier, prevents to upgrade unsuccessfully to have destroyed original BootRom mirror image, solved because of the upgrading failure destroy original BootRom mirror image, can't start-up system problem.
When dispatching from the factory, with fixed area mirror image, main with among address table, standby address table, the burned Flash of BootRom mirror image difference.Burned when the fixed area mirror image dispatches from the factory, do not allow to change.The BootRom mirror image is in the burned main area.After burned, the allocation of space of Flash as shown in Figure 1.As shown in Figure 2, the master includes the effective identifier of address table, main area address and address, spare area with address table and standby address table.This moment, main content with address table and standby address table was effective and on all four.
When device powers on, at first carry out the fixed area mirror image.In the fixed area mirror image, synchronously main with address table and standby address table, again from main with obtaining the main area address the address table, execution is kept at the BootRom mirror image in the main area.
During upgrading, BootRom is kept at the upgrade image of downloading in the spare area according to the address, spare area in the address table.If upgrade successfully, then the scheduler table exchanges main area address and address, spare area, behind the operation fixed area mirror image that powers on next time like this, with the BootRom mirror image of carrying out after upgrading; If the upgrading failure, address table can not change, and powers on next time behind the operation fixed area mirror image, will carry out original Bootrom mirror image.
The standby address table is main backup with address table, is on all four under both content normal conditions.When having only upgrading BootRom, behind the BootRom mirror image that preservation is downloaded, renewal is main, and this will cause the failure of upgrading with power down suddenly in the process of address table or standby address table, and the content of two tables just can be different in such cases.When powering on execution fixed area mirror image, can carry out synchronously these two address tables.The mirror image of current operation can not upgraded to self; Main address table and the standby address table used can be simultaneously not invalid.The BootRom mirror image leaves in the main area, downloads the mirror image that gets off during upgrading and is kept in the spare area.
When device powers on, at first carry out the fixed area mirror image.The realization of fixed area mirror image is fairly simple, mainly contains following two functions: (1) is main synchronously with address table and standby address table, and the two is consistent; (2) obtain the main area address, jump to this address, carry out the BootRom mirror image.
As shown in Figure 4, after system powers on, the beginning start-up system, the startup flow process of system comprises the steps:
S401: read main with the effective identifier of address table;
S402: judge main whether effective with address table, execution in step S403 effectively then, invalid then execution in step S407;
S403: read the effective identifier of standby address table;
S404: judge that whether the standby address table is effective, effectively then carries out S409; The invalid S405 that then carries out;
S405: will lead with the copying data except that the address table identifier in the address table in the standby address table;
S406: purchasing with the effective identifier of address table is effectively, then execution in step S409;
S407: the copying data except that the address table identifier in the standby address table is used in the address table to main;
S408: putting main is effectively with the effective identifier of address table, execution in step S409;
S409: resolve and mainly to use address table, obtain the main area address, the entry address of Here it is BootRom mirror image.
S410: jump to this place, entry address, carry out the BootRom mirror image in the main area.Then, the system start-up flow process finishes, and carries out application corresponding system or operating system.
When device powers on, carry out the startup flow process earlier, main synchronously with address table and standby address table, keep the unanimity of two address tables, reboot the BootRom mirror image.In the BootRom mirror image, download the BootRom mirror image of redaction, carry out as the upgrading flow process among Fig. 3, upgrade.
The safety upgrade method of BootRom of the present invention, with the spatial division of flash is fixed area, main mode with address table, standby address table, main area and spare area, the master can back up mutually with address table and standby address table, make the BootRom of communication facilities can realize safety, reliable, convenient and upgrading cheaply, solved in upgrading BootRom process burst accident cause upgrading failure, can not start-up system problem.

Claims (1)

1. the safety upgrade method of a BootRom is characterized in that, may further comprise the steps:
A. system start-up downloads the BootRom mirror image of highest version get off, and is saved in (S301) in the internal memory;
B. the mirror image of downloading is carried out correctness verification (S302); If the mirror image of downloading is incorrect, then upgrading failure; If the mirror image of downloading is correct, then continue next step;
C. resolve the master and use address table, obtain address, spare area (S303);
D. preserve mirror image (S304), and judge mirror image preservation whether successfully (S305); If mirror image is preserved unsuccessful, then upgrading failure; If mirror image is preserved successfully, continuing next step;
E. lead with the effective identifier of address table and be set to invalid (S306); Upgrade the main address table of using, be about to the master and exchange (S307) with main area address in the address table and address, spare area; Then, being provided with main is effective (S308) with the effective identifier of address table;
F. the effective identifier of standby address table is set to invalid (S309); Upgrade the standby address table, be about to main area address and address, spare area exchange (S310) in the standby address table; Then, the effective identifier of standby address table is set and is effective (S311);
G. upgrade successfully.
CN2011101232407A 2011-05-13 2011-05-13 Security upgrading method for BootRom Expired - Fee Related CN102169445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011101232407A CN102169445B (en) 2011-05-13 2011-05-13 Security upgrading method for BootRom

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101232407A CN102169445B (en) 2011-05-13 2011-05-13 Security upgrading method for BootRom

Publications (2)

Publication Number Publication Date
CN102169445A true CN102169445A (en) 2011-08-31
CN102169445B CN102169445B (en) 2013-12-04

Family

ID=44490611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101232407A Expired - Fee Related CN102169445B (en) 2011-05-13 2011-05-13 Security upgrading method for BootRom

Country Status (1)

Country Link
CN (1) CN102169445B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105119952A (en) * 2015-07-07 2015-12-02 北京京东尚科信息技术有限公司 Method and system for automatically and flexibly assigning resource under cloud platform
CN106598654A (en) * 2016-11-30 2017-04-26 中国兵器装备集团自动化研究所 Method for updating PowerPC motherboard guide chip online
CN106933606A (en) * 2015-12-29 2017-07-07 普天信息技术有限公司 The update method and device of VxWorks system image image files
CN109254799A (en) * 2018-08-29 2019-01-22 新华三技术有限公司 The starting method, apparatus and communication equipment of bootstrap

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437113A (en) * 2002-02-08 2003-08-20 华为技术有限公司 Guide memory and its construction method and usage
CN101464804A (en) * 2008-12-29 2009-06-24 杭州迪普科技有限公司 Double-boot backup method and security equipment
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN102023908A (en) * 2010-12-03 2011-04-20 中兴通讯股份有限公司 Method and device for backing up boot program
CN102033790A (en) * 2010-12-15 2011-04-27 中兴通讯股份有限公司 Method and device for upgrading embedded-type system BOOTROM

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437113A (en) * 2002-02-08 2003-08-20 华为技术有限公司 Guide memory and its construction method and usage
CN101464804A (en) * 2008-12-29 2009-06-24 杭州迪普科技有限公司 Double-boot backup method and security equipment
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN102023908A (en) * 2010-12-03 2011-04-20 中兴通讯股份有限公司 Method and device for backing up boot program
CN102033790A (en) * 2010-12-15 2011-04-27 中兴通讯股份有限公司 Method and device for upgrading embedded-type system BOOTROM

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105119952A (en) * 2015-07-07 2015-12-02 北京京东尚科信息技术有限公司 Method and system for automatically and flexibly assigning resource under cloud platform
CN105119952B (en) * 2015-07-07 2018-12-21 北京京东尚科信息技术有限公司 The method and system of resource is distributed to automatic elastic under cloud platform
CN106933606A (en) * 2015-12-29 2017-07-07 普天信息技术有限公司 The update method and device of VxWorks system image image files
CN106598654A (en) * 2016-11-30 2017-04-26 中国兵器装备集团自动化研究所 Method for updating PowerPC motherboard guide chip online
CN109254799A (en) * 2018-08-29 2019-01-22 新华三技术有限公司 The starting method, apparatus and communication equipment of bootstrap

Also Published As

Publication number Publication date
CN102169445B (en) 2013-12-04

Similar Documents

Publication Publication Date Title
CN101431441B (en) Method for on-line updating FPGA system embedded with CPU
CN107179909A (en) Method for upgrading software, device and computer-readable recording medium
TWI386847B (en) Method of safe and recoverable firmware update and device using the same
CN102693139B (en) A kind of method and system of radio upgrade cell phone software
EP2456257B1 (en) Method and system for upgrading wireless data card
US8136108B2 (en) Updating firmware with multiple processors
CN109062598B (en) Safe OTA (over the air) upgrading method and system
CN108027741A (en) Document handling method, device, terminal and storage medium based on patch upgrading
US20090222650A1 (en) Communication device and firmware update method thereof
WO2009074444A2 (en) Updating firmware of an electronic device
CN102073517A (en) Upgrading and backup method and device for embedded system
CN103688268A (en) Vehicle unit and method for operating the vehicle unit
JP2011053817A (en) Information processing apparatus
CN102004657B (en) A kind of electronic equipment and upgrade method thereof
CN102169445B (en) Security upgrading method for BootRom
CN109753299A (en) A kind of method for upgrading system, device and computer storage medium
CN102646043A (en) Method and device for upgrading mobile terminal software and mobile terminal
JP2003029997A (en) Software upgrading method in network environment and network device by the same
CN108170457A (en) Firmware upgrade method, device and VR head-mounted displays
JP5533935B2 (en) Software distribution system and software distribution method
TW201621647A (en) Operating system updating method
CN107071570A (en) A kind of set top box upgrading method and device
CN112416411B (en) Upgrading method and device, equipment end, server and computer readable medium
CN117707626A (en) System starting method and electronic equipment
JP6073710B2 (en) Information processing apparatus, automatic recovery method from startup failure, and automatic recovery program from startup failure

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210722

Address after: 230000 room 2153, D8 floor, Hefei Innovation Industrial Park, 800 Wangjiang West Road, high tech Zone, Hefei, Anhui Province

Patentee after: Anhui tengling Technology Co.,Ltd.

Address before: 230001 Room 405, building A1, animation and service outsourcing industry base, high tech Zone, Hefei, Anhui Province

Patentee before: Hefei Huayun Communication Technology Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131204

CF01 Termination of patent right due to non-payment of annual fee