CN102087603A - Method for backing up main edition and spare edition on single chip - Google Patents
Method for backing up main edition and spare edition on single chip Download PDFInfo
- Publication number
- CN102087603A CN102087603A CN 200910229015 CN200910229015A CN102087603A CN 102087603 A CN102087603 A CN 102087603A CN 200910229015 CN200910229015 CN 200910229015 CN 200910229015 A CN200910229015 A CN 200910229015A CN 102087603 A CN102087603 A CN 102087603A
- Authority
- CN
- China
- Prior art keywords
- version
- chip
- standby
- main
- edition
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention relates to a method for backing up a main edition and a spare edition on a single chip. The method comprises the following steps of: dividing a storage space into at least three parts on a single chip, wherein the part for storing BOOT is called V0, the parts for storing the main edition and the spare edition are called V1 and V2; firstly, running the BOOT after the chip is powered on and judging whether the current main edition is V1 or V2; switching the control right to the main edition by the BOOT; downloading a new edition file from a remote server to cover the current spare edition storage space if a remote upgrading instruction is received in the operation period of the main edition; updating the parameter configuration area of the main edition and then restarting the system; and automatically starting the new main edition after restarting to finish the upgrading of the remote edition. The invention has the advantages that the three files of the BOOT, the main edition and the spare edition are simultaneously stored in the single chip by using the method, the exchange of the main edition and the spare edition and the remote upgrading function are realized, and the development and maintenance cost of the product is effectively decreased.
Description
(1) technical field:
The present invention relates to the embedded product design, especially a kind of method that on single-chip, realizes active and standby version backup.
(2) background technology:
In the embedded product, because of reasons such as changes of function, fault restoration, need upgrade to the software the product (version) from long-range through regular meeting.Tradition embedded product implementation is to use two or above chip in product, wherein starts BOOT and is positioned on the individual chips, and by BOOT and long-range carrying out alternately, finish edition upgrading, and newly downloaded version is write another chip block, start redaction afterwards.This mode is owing to will use more than chip piece, and cost is difficult to reduce, so generally only be used on the high-end embedded device, causes the low side embedded device can't realize remote upgrade.
(3) summary of the invention:
The object of the present invention is to provide a kind of method that realizes active and standby version backup on single-chip, it can solve the deficiencies in the prior art, can reduce cost of products on terminal device.
Technical scheme of the present invention: a kind of method that realizes active and standby version backup on single-chip is characterized in that it is made of following steps:
(1) on one chip, storage space is divided at least three parts, be respectively applied for storage and start BOOT, main version and the standby version used of storage; Wherein be used to store the part that starts BOOT and be called V0; The main part with version and standby version of said storage is called V1 and V2; Use version if V1 is the master, then V2 is standby version, uses version if V2 is the master, and then V1 is standby version, and this relation is distinguished by the parameter configuration district;
(2) behind the chip power, start BOOT and take the lead in moving, the configuration of its detected parameters judges that current master is V1 or V2 with version; Start BOOT control is switched to the main version of using;
(3) master uses the version run duration, if receive the remote upgrade instruction, then downloads new version file from the remote service end, covers current standby storage of versions space; Use version if V1 is the master, then cover V2, otherwise then cover V1;
(4) the main version updating parameter configuration district that uses is made as the master with newly downloaded version and uses version, and the version of current operation is made as standby version, restarts system then;
(5) after system restarts, start BOOT and detect the parameter variation, use version, finish the remote version upgrading starting new master automatically.
Parameter in the above-mentioned said step (1) is stored in independently storage space, for example on the E2PROM; Or reside on the same chip with version, promptly on chip, divide a zone again, be used for stored parameter.
Start in the above-mentioned said step (2) BOOT control is switched to main when using version, if when the compiling master uses version and standby version executable file, be provided with the location independent option, can make version can start operation in the optional position of storage space, then, start the main version of using by adjusting the programmable counter of CPU; When adjusting programmable counter, if V0 operates under the user model, need so by soft interrupt mode, force CPU entrance management pattern, could revise the CPU programmable counter then, realize the version redirect;
If compiler can't produce position independent code, then start BOOT and will lead and copy memory headroom to version, use version from the internal storage starting master then; Or on chip, marking off an operation area, this zone identifies with Vm, starts BOOT and finds out the master with behind the version, copies this version to the Vm district, starts the main version of using then from the Vm district.
Above-mentioned said compiler can't produce position independent code, and then when the active and standby version of compiling, the start address of internal memory or Vm is set to the version enabling address.
Above-mentioned said startup BOOT is a small-sized executable file, is stored in the physical address 0x0 of chip usually; Behind the chip power, will automatically perform startup BOOT.
Above-mentioned said main with version and standby version, be the executable file of two different editions.
Superiority of the present invention: this method is on one chip, and storage simultaneously starts BOOT, main with version, three files of standby version, and realizes active and standby exchange, remote upgrade function, effectively reduces product development and maintenance cost.
(4) description of drawings:
Fig. 1 is the related a kind of synoptic diagram of realizing the chip-stored spatial division of first kind of embodiment of method that active and standby version backs up on single-chip of the present invention.
Fig. 2 is the related a kind of synoptic diagram of realizing the chip-stored spatial division of second kind of embodiment of method that active and standby version backs up on single-chip of the present invention.
(5) embodiment:
Embodiment 1: a kind of method that realizes active and standby version backup on single-chip is characterized in that it is made of following steps:
(1) on one chip, storage space is divided into three part (see figure 1)s, wherein be used to store the part that starts BOOT and be called V0; The main part with version and standby version of said storage is called V1 and V2;
(2) behind the chip power, start BOOT and take the lead in moving, the configuration of its detected parameters judges that current master is V1 or V2 with version; Start BOOT control is switched to the main version of using;
(3) master uses the version run duration, if receive the remote upgrade instruction, then downloads new version file from the remote service end, covers current standby storage of versions space; Use version if V1 is the master, then cover V2, otherwise then cover V1;
(4) the main version updating parameter configuration district that uses is made as the master with newly downloaded version and uses version, and the version of current operation is made as standby version, restarts system then;
(5) after system restarts, start BOOT and detect the parameter variation, use version, finish the remote version upgrading starting new master automatically.
Parameter in the above-mentioned said step (1) is stored in independently storage space, for example on the E2PROM.
Start in the above-mentioned said step (2) BOOT control is switched to main when using version, when the compiling master uses version and standby version executable file, be provided with the location independent option, can make version can start operation in the optional position of storage space, then, start the main version of using by adjusting the programmable counter of CPU.When adjusting programmable counter, if V0 operates under the user model, need so by soft interrupt mode, force CPU entrance management pattern, could revise the CPU programmable counter then, realize the version redirect.
Above-mentioned said startup BOOT is a small-sized executable file, is stored in the physical address 0x0 of chip usually; Behind the chip power, will automatically perform startup BOOT.
Above-mentioned said main with version and standby version, be the executable file of two different editions.
Embodiment 2: a kind of method that realizes active and standby version backup on single-chip is characterized in that it is made of following steps:
(1) on one chip, storage space is divided into four part (see figure 2)s, wherein be used to store the part that starts BOOT and be called V0; The main part with version and standby version of said storage is called V1 and V2;
(2) behind the chip power, start BOOT and take the lead in moving, the configuration of its detected parameters judges that current master is V1 or V2 with version; Start BOOT control is switched to the main version of using;
(3) master uses the version run duration, if receive the remote upgrade instruction, then downloads new version file from the remote service end, covers current standby storage of versions space; Use version if V1 is the master, then cover V2, otherwise then cover V1;
(4) the main version updating parameter configuration district that uses is made as the master with newly downloaded version and uses version, and the version of current operation is made as standby version, restarts system then;
(5) after system restarts, start BOOT and detect the parameter variation, use version, finish the remote version upgrading starting new master automatically.
Parameter in the above-mentioned said step (1) is stored in independently storage space, for example on the E2PROM.
Start in the above-mentioned said step (2) BOOT control is switched to main when using version, compiler can't produce position independent code, then on chip, mark off an operation area (see figure 2), this zone identifies with Vm, starting BOOT finds out main with behind the version, copy this version to the Vm district, start the main version of using then from the Vm district.
Above-mentioned said compiler can't produce position independent code, and then when the active and standby version of compiling, the start address of Vm is set to the version enabling address.
Above-mentioned said startup BOOT is a small-sized executable file, is stored in the physical address 0x0 of chip usually; Behind the chip power, will automatically perform startup BOOT.
Above-mentioned said main with version and standby version, be the executable file of two different editions.
Claims (6)
1. on single-chip, realize the method that active and standby version backs up for one kind, it is characterized in that it is made of following steps:
(1) on one chip, storage space is divided at least three parts, be respectively applied for storage and start BOOT, main version and the standby version used of storage; Wherein be used to store the part that starts BOOT and be called V0; The main part with version and standby version of said storage is called V1 and V2; Use version if V1 is the master, then V2 is standby version, uses version if V2 is the master, and then V1 is standby version, and this relation is distinguished by the parameter configuration district;
(2) behind the chip power, start BOOT and take the lead in moving, the configuration of its detected parameters judges that current master is V1 or V2 with version; Start BOOT control is switched to the main version of using;
(3) master uses the version run duration, if receive the remote upgrade instruction, then downloads new version file from the remote service end, covers current standby storage of versions space; Use version if V1 is the master, then cover V2, otherwise then cover V1;
(4) the main version updating parameter configuration district that uses is made as the master with newly downloaded version and uses version, and the version of current operation is made as standby version, restarts system then;
(5) after system restarts, start BOOT and detect the parameter variation, use version, finish the remote version upgrading starting new master automatically.
2. according to the said a kind of method that on single-chip, realizes active and standby version backup of claim 1, it is characterized in that the parameter in the said step (1) is stored in independently storage space, for example on the E2PROM; Or reside on the same chip with version, promptly on chip, divide a zone again, be used for stored parameter.
3. according to the said a kind of method that on single-chip, realizes active and standby version backup of claim 1, it is characterized in that starting in the said step (2) BOOT control is switched to main when using version, if when the compiling master uses version and standby version executable file, be provided with the location independent option, can make version can start operation in the optional position of storage space, then, start the main version of using by adjusting the programmable counter of CPU; When adjusting programmable counter, if V0 operates under the user model, need so by soft interrupt mode, force CPU entrance management pattern, could revise the CPU programmable counter then, realize the version redirect;
If compiler can't produce position independent code, then start BOOT and will lead and copy memory headroom to version, use version from the internal storage starting master then; Or on chip, marking off an operation area, this zone identifies with Vm, starts BOOT and finds out the master with behind the version, copies this version to the Vm district, starts the main version of using then from the Vm district.
4. according to the said a kind of method that on single-chip, realizes active and standby version backup of claim 3, it is characterized in that said compiler can't produce position independent code, then when the active and standby version of compiling, the start address of internal memory or Vm is set to the version enabling address.
5. according to the said a kind of method that on single-chip, realizes active and standby version backup of claim 1, it is characterized in that said startup BOOT is a small-sized executable file, be stored in the physical address 0x0 of chip usually; Behind the chip power, will automatically perform startup BOOT.
6. according to the said a kind of method that realizes active and standby version backup on single-chip of claim 1, it is characterized in that said main version and the standby version used, is the executable file of two different editions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200910229015 CN102087603A (en) | 2009-12-08 | 2009-12-08 | Method for backing up main edition and spare edition on single chip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200910229015 CN102087603A (en) | 2009-12-08 | 2009-12-08 | Method for backing up main edition and spare edition on single chip |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102087603A true CN102087603A (en) | 2011-06-08 |
Family
ID=44099422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200910229015 Pending CN102087603A (en) | 2009-12-08 | 2009-12-08 | Method for backing up main edition and spare edition on single chip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102087603A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102314369A (en) * | 2011-10-09 | 2012-01-11 | 杭州先锋电子技术股份有限公司 | Self-upgrade method for equipment in remote online monitoring system |
CN102819435A (en) * | 2012-07-26 | 2012-12-12 | 复旦大学 | Position independent code generation method of Java virtual machine |
CN103970556A (en) * | 2013-02-01 | 2014-08-06 | 京信通信系统(中国)有限公司 | Updating method and system for power amplification software in radio remote equipment |
CN104063238A (en) * | 2013-03-21 | 2014-09-24 | 苏州方位通讯科技有限公司 | System upgrading backup mechanism under finite storage space |
CN104615471A (en) * | 2015-03-05 | 2015-05-13 | 浪潮软件集团有限公司 | System upgrading method and device for terminal |
CN106604138A (en) * | 2016-12-08 | 2017-04-26 | Tcl集团股份有限公司 | Remote restoration method and system for intelligent television |
CN107102871A (en) * | 2017-03-30 | 2017-08-29 | 建荣半导体(深圳)有限公司 | The method and apparatus of embedded system upgrading |
CN112379897A (en) * | 2020-12-01 | 2021-02-19 | 北京致远互联软件股份有限公司 | Method for releasing gray scale and restrictively installing client installation program |
CN113339956A (en) * | 2021-06-03 | 2021-09-03 | 青岛海信日立空调系统有限公司 | Air conditioning system |
-
2009
- 2009-12-08 CN CN 200910229015 patent/CN102087603A/en active Pending
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102314369A (en) * | 2011-10-09 | 2012-01-11 | 杭州先锋电子技术股份有限公司 | Self-upgrade method for equipment in remote online monitoring system |
CN102314369B (en) * | 2011-10-09 | 2014-07-23 | 杭州先锋电子技术股份有限公司 | Self-upgrade method for equipment in remote online monitoring system |
CN102819435A (en) * | 2012-07-26 | 2012-12-12 | 复旦大学 | Position independent code generation method of Java virtual machine |
CN102819435B (en) * | 2012-07-26 | 2015-10-28 | 复旦大学 | A kind of position independent code generation method of Java Virtual Machine |
CN103970556A (en) * | 2013-02-01 | 2014-08-06 | 京信通信系统(中国)有限公司 | Updating method and system for power amplification software in radio remote equipment |
CN104063238A (en) * | 2013-03-21 | 2014-09-24 | 苏州方位通讯科技有限公司 | System upgrading backup mechanism under finite storage space |
CN104615471A (en) * | 2015-03-05 | 2015-05-13 | 浪潮软件集团有限公司 | System upgrading method and device for terminal |
CN106604138A (en) * | 2016-12-08 | 2017-04-26 | Tcl集团股份有限公司 | Remote restoration method and system for intelligent television |
CN107102871A (en) * | 2017-03-30 | 2017-08-29 | 建荣半导体(深圳)有限公司 | The method and apparatus of embedded system upgrading |
CN112379897A (en) * | 2020-12-01 | 2021-02-19 | 北京致远互联软件股份有限公司 | Method for releasing gray scale and restrictively installing client installation program |
CN112379897B (en) * | 2020-12-01 | 2024-03-15 | 北京致远互联软件股份有限公司 | Gray release and restrictive method for installing client installation program |
CN113339956A (en) * | 2021-06-03 | 2021-09-03 | 青岛海信日立空调系统有限公司 | Air conditioning system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102087603A (en) | Method for backing up main edition and spare edition on single chip | |
US8874889B2 (en) | Method of switching between multiple operating systems of computer system | |
US9894605B2 (en) | Low-power wearable devices and methods for switching and communication among multiple operating systems and application management methods thereof | |
CN102460377B (en) | Data processing apparatus and method | |
US20180120927A1 (en) | Devices and methods for switching and communication among multiple operating systems and application management methods thereof | |
CN102236621B (en) | Computer interface information configuration system and method | |
CN100432931C (en) | Method for implementing long jumping dynamic patch in embedded system | |
KR101780052B1 (en) | Method for switching the operating system in information processing system | |
CN101414264B (en) | Method for updating software version | |
CN103176864B (en) | A kind of backup method based on Android system, device and mobile terminal | |
CN102646043B (en) | Mobile terminal software upgrading method, update device and mobile terminal | |
CN101324850B (en) | LINUX inner core dynamic loading method | |
KR101673299B1 (en) | Operating system recovery method and apparatus, and terminal device | |
WO2007005562A3 (en) | Shared file system management between independent operating systems | |
CN102902518B (en) | A kind of changing method of active USB device and its mode of operation | |
CN105260270A (en) | Flash storage space dynamic recovery method and device | |
CN102508686A (en) | Method and system for realizing safe upgrading of system | |
CN102880477A (en) | Method for realizing computer start and computer | |
KR20140127341A (en) | Method and system for scheduling requests in a portable computing device | |
CN109308195A (en) | Starting method, embedded device and the computer storage medium of embedded device | |
CN101615128A (en) | A kind of method of single-chip microcomputer online upgrading and device | |
CN103116502A (en) | Method of achieving upgrading by using main and backup version backup | |
CN102566738A (en) | Server system and starting method for server system | |
CN101419560B (en) | Operating system switching method based on expandable firmware interface | |
WO2005098648A3 (en) | Method and structure for explicit software control of execution of a thread including a helper subthread |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110608 |