CN102043634B - Embedded system and embedded software upgrading method - Google Patents
Embedded system and embedded software upgrading method Download PDFInfo
- Publication number
- CN102043634B CN102043634B CN200910110580.9A CN200910110580A CN102043634B CN 102043634 B CN102043634 B CN 102043634B CN 200910110580 A CN200910110580 A CN 200910110580A CN 102043634 B CN102043634 B CN 102043634B
- Authority
- CN
- China
- Prior art keywords
- program
- upgrading
- compressed package
- module
- check code
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000005192 partition Methods 0.000 claims abstract description 5
- 238000001514 detection method Methods 0.000 claims description 6
- 230000006837 decompression Effects 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004377 microelectronic Methods 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
The invention relates to an embedded system and an embedded software upgrading method. The system comprises an upgraded compressed packet loading module, an upgraded compressed packet decompressing module, a copying module and a detecting module, wherein the upgraded compressed packet loading module is used for loading an upgraded compressed packet from outside storage equipment and reading check code of the upgraded compressed packet; the upgraded compressed packet decompressing module is used for comparing the preset check code with the read check code and starting to decompressing the upgraded compressed packet if the preset code is the same as the check code, and a program exists and the upgrade failure is prompted if the preset check code is not same as the check code; the copying module is used for respectively copying a program obtained by decompressing the upgraded compressed packet to corresponding catalogs; and the detecting module is used for detecting whether the program coped to the corresponding catalogs is correct, and the upgrade is carried out if the program is correct. The invention provides guarantee for the software upgrading reliability of embedded system equipment to ensure successful upgrade, and is suitable for frequently upgrading equipment requiring frequent upgrade on the basis of flash memory partition.
Description
Technical field
The present invention relates to electronic technology field, more particularly, relate to a kind of embedded system and embedded software upgrade method.
Background technology
Embedded system refers to the dedicated computer system for performing standalone feature.It is by comprising microprocessor, timer, microcontroller, storer, a series of microelectronic chip of sensor and device, with embed micro operation system in memory, control application software composition, jointly realize such as controlling in real time, monitor, manage, the various automatic business processing task such as mobile computing, data processing.Embedded system is application-centered, based on microelectric technique, control technology, computer technology and mechanics of communication, emphasize concertedness and the conformability of hardware-software, software restraint can be cut out, to meet system to requirements such as function, cost, volume and power consumptions.Embedded software is exactly the software based on Embedded System Design, and it is also the one of computer software, is made up of equally program and document thereof, and can be subdivided into system software, support programs, application software three class, be the important component part of embedded system.In escalation process, may there is some reason in embedded system device, as unexpected power-off, maloperation etc., cause and upgrade unsuccessfully, this requirement provides safeguard to the reliability of software upgrading, guarantees to upgrade successfully.
In prior art, common way adopts the readable flash memory (flash memory) write as upgrading private memory, internal storage upgrade image file, is burnt in flash memory by socket burnt-in seat by image file or enters the corresponding order of upgrade mode execution and carry out ROMPaq.Although the implementation procedure of this mode upgrading is fairly simple, but there is following shortcoming: if embedded software has to upgrade need frequent upgrade software, inconvenient, power-off is run in escalation process, maloperations etc. then need again to wipe the burned new image file of existing image file, add the complicacy of the operation of technical support personnel, thus add cost.
Summary of the invention
The technical problem to be solved in the present invention is, for existing upgrading, maloperation, complexity, inconvenient defect easily occurs, provides a kind of embedded system and embedded software upgrade method.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of embedded system, it comprises:
Upgrading compressed package loading module, for loading upgrading compressed package from extraneous memory device, reads the check code of described upgrading compressed package;
Upgrading compressed package decompression module, for being compared by the check code of preset check code and described reading, if identical, then start to upgrade described in decompress(ion) compressed package, if difference, program exits, and prompting is upgraded unsuccessfully;
Copy module, for copying to corresponding catalogue respectively by obtaining program after compressed package of upgrading described in decompress(ion);
Whether correctly detection module, copy to the program of corresponding catalogue, if correct, upgrade described in detecting.
Wherein, preferably, this system also comprises: upgrade status display module, for showing upgrade status on display terminal.
Wherein, further, described upgrade status comprises the state of upgrading successfully or upgrading status of fail.
Wherein, further; described copy module; for: copy to kernel program catalogue by obtaining kernel program after compressed package of upgrading described in decompress(ion); copying to defence program catalogue by obtaining defence program after compressed package of upgrading described in decompress(ion), being applied program copy to application catalog by after compressed package of upgrading described in decompress(ion).
The present invention also provides a kind of embedded software upgrade method, and it comprises step:
Load upgrading compressed package from extraneous memory device, obtain the check code of described upgrading compressed package;
Compared by the check code of preset check code and described acquisition, if identical, then start to upgrade described in decompress(ion) compressed package, if difference, program exits, and prompting is upgraded unsuccessfully;
Corresponding catalogue is copied to respectively by obtaining program after compressed package of upgrading described in decompress(ion);
Whether the program copying to corresponding catalogue described in detection is correct, if correct, upgrades.
Wherein, whether the program copying to corresponding catalogue described in detection is correct, if correct, upgrades; Or prompting is upgraded unsuccessfully, comprises step further afterwards:
Display terminal shows upgrade status.
Wherein, further, describedly corresponding catalogue is copied to respectively by obtaining program after compressed package of upgrading described in decompress(ion); Specifically comprise:
Kernel program catalogue is copied to by obtaining kernel program after compressed package of upgrading described in decompress(ion); copying to defence program catalogue by obtaining defence program after compressed package of upgrading described in decompress(ion), being applied program copy to application catalog by after compressed package of upgrading described in decompress(ion).
Implement technical scheme of the present invention, there is following beneficial effect: make embedded system device in escalation process, prevent some reason that may exist, as unexpected power-off, maloperation etc., the upgrading failure caused, for the reliability of the software upgrading of embedded system device provides safeguard, guarantee to upgrade successfully.Being applicable on existing flash partition basis, frequently upgrading to needing the equipment of frequent upgrading.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the process flow diagram of the embedded software upgrade method that the embodiment of the present invention provides;
Fig. 2 is the Application Example process flow diagram of the embedded software upgrade method that the embodiment of the present invention provides;
Fig. 3 is the structural drawing of the embedded system that the embodiment of the present invention provides.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The embodiment of the present invention provides a kind of embedded software upgrade method, as shown in Figure 1, comprises step:
11, load upgrading compressed package from extraneous memory device, obtain the check code of described upgrading compressed package;
Described external device comprises USB flash disk, portable hard drive etc., and described upgrading compressed package is the compressed package that embedded system will be upgraded.
12, compared by the check code of preset check code and described acquisition, if identical, then start to upgrade described in decompress(ion) compressed package, if difference, program exits, and prompting is upgraded unsuccessfully;
This preset check code is the check code deposited in embedded system, and the check code that this has been deposited and the check code of this compressed package contrast.
13, corresponding catalogue is copied to respectively by obtaining program after compressed package of upgrading described in decompress(ion);
Kernel program catalogue is copied to by obtaining kernel program after compressed package of upgrading described in decompress(ion); copying to defence program catalogue by obtaining defence program after compressed package of upgrading described in decompress(ion), being applied program copy to application catalog by after compressed package of upgrading described in decompress(ion).Be specially: under kernel (kernel) program (vmlinux.bin) is copied to flash memory (flash) subregion/boot/ catalogue; under the defence program (vmlinux_rescue.bin) of kernel (kernel) include file system is copied to flash memory (flash) subregion/boot/ catalogue; when this defence program is for upgrading failed; upgrade as kernel (kernel) programmed protection program, under copying application program (home.img) to flash memory (flash) subregion/dev/mmc6 catalogue.
Whether the program 14, copying to corresponding catalogue described in detection is correct, if correct, upgrades.
Be specially: whether correctly detect the kernel program (vmlinux.bin) copying to flash memory; whether correctly detect the defence program (vmlinux_rescue.bin) copying flash memory kernel include file system to, whether correctly detect the application program (home.img) copying to flash memory.If correct, upgrade.If incorrect, then failure of upgrading, shows upgrading status of fail to user.
An Application Example of above-described embodiment is described below in conjunction with Fig. 2.As shown in Figure 2, this embedded software upgrade method Application Example comprises step:
101, upgrading compressed package is loaded;
102, judge that whether this loading is failed, if failure, then carry out step 117, exit the upgrading of compressed package, if not failure, then carry out step 103;
103, verify that whether AKU check code is correct;
104, judge that whether checking check code is failed; If failure, then carry out step 117; If failure, then carry out step 105;
105, master routine is exited;
106, ROMPaq is performed;
107, whether unsuccessfully judge to perform ROMPaq, if failure, then carry out step 117, if not failure, then carry out step 108;
108, decompress upgrading compressed package;
109, judge that whether decompression upgrading compressed package is failed, if failure, then carry out step 117, if not failed, then carry out step 110;
110, under kernel (kernel) program (vmlinux.bin) being copied to flash memory (flash) subregion/boot/ catalogue;
111, whether correctly detect described kernel program (vmlinux.bin), if correctly, then carry out step 112, if incorrect, then carry out step 117;
112, under the defence program (vmlinux_rescue.bin) of kernel (kernel) include file system being copied to flash memory (flash) subregion/boot/ catalogue;
113, whether correctly detect the defence program (vmlinux_rescue.bin) copying flash memory kernel include file system to, if incorrect, then carry out step 117, if correctly, then carry out step 114;
114, under copying application program (home.img) to flash memory (flash) subregion/dev/mmc6 catalogue;
115, whether correctly detect the application program (home.img) copying to flash memory, if incorrect, then carry out step 118, if correctly, then carry out step 116;
116, software upgrade success, restart facility, carry out step 118.
117, software upgrading failure, next time upgrades again, carry out step 118;
118, this escalation process is exited.
The embodiment of the present invention also provides a kind of embedded system, and as shown in Figure 3, this system comprises:
Upgrading compressed package loading module 201, for loading upgrading compressed package from extraneous memory device, reads the check code of described upgrading compressed package;
Upgrading compressed package decompression module 202, for being compared by the check code of preset check code and described reading, if identical, then start to upgrade described in decompress(ion) compressed package, if difference, program exits, and prompting is upgraded unsuccessfully;
Copy module 203, for copying to corresponding catalogue respectively by obtaining program after compressed package of upgrading described in decompress(ion); Concrete: copy to kernel program catalogue by obtaining kernel program after compressed package of upgrading described in decompress(ion); copying to defence program catalogue by obtaining defence program after compressed package of upgrading described in decompress(ion), being applied program copy to application catalog by after compressed package of upgrading described in decompress(ion).
Whether correctly detection module 204, copy to the program of corresponding catalogue, if correct, upgrade described in detecting.
In further embodiment, this system also comprises: upgrade status display module 205, for showing upgrade status on display terminal.Wherein, described upgrade status comprises the state of upgrading successfully or upgrading status of fail.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.
Claims (1)
1. an embedded software upgrade method, is characterized in that, comprise step:
Upgrading compressed package loading module loads upgrading compressed package from extraneous memory device, obtains the check code of described upgrading compressed package;
The check code of preset check code and described acquisition compares by upgrading compressed package decompression module, if identical, then start to upgrade described in decompress(ion) compressed package, if difference, program exits, and prompting is upgraded unsuccessfully;
Copy module copies to corresponding catalogue respectively by obtaining program after compressed package of upgrading described in decompress(ion);
Whether the program copying to corresponding catalogue described in detection module detects is correct, if correct, upgrades; Or prompting is upgraded unsuccessfully, comprises step further afterwards:
Upgrade status display module shows upgrade status on display terminal;
Described upgrading compressed package decompression module copies to corresponding catalogue respectively by obtaining program after compressed package of upgrading described in decompress(ion); Specifically comprise:
Kernel program catalogue under flash partition is copied to by obtaining kernel program after compressed package of upgrading described in decompress(ion); defence program catalogue under flash partition is copied to, by the application catalog under the program copy to flash partition that is applied after compressed package of upgrading described in decompress(ion) by obtaining defence program after compressed package of upgrading described in decompress(ion).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910110580.9A CN102043634B (en) | 2009-10-23 | 2009-10-23 | Embedded system and embedded software upgrading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910110580.9A CN102043634B (en) | 2009-10-23 | 2009-10-23 | Embedded system and embedded software upgrading method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102043634A CN102043634A (en) | 2011-05-04 |
CN102043634B true CN102043634B (en) | 2015-01-21 |
Family
ID=43909793
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910110580.9A Active CN102043634B (en) | 2009-10-23 | 2009-10-23 | Embedded system and embedded software upgrading method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102043634B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102436388A (en) * | 2011-12-22 | 2012-05-02 | 华为技术有限公司 | Method and device for upgrading software of embedded system |
CN102999397A (en) * | 2012-12-17 | 2013-03-27 | 四川九洲电器集团有限责任公司 | Embedded software upgrading and checking method |
CN104298532B (en) * | 2014-11-04 | 2018-05-01 | 上海斐讯数据通信技术有限公司 | A kind of method for upgrading software and system |
CN104375863A (en) * | 2014-11-17 | 2015-02-25 | 张毓 | Program online upgrading method in embedded system |
CN109614116B (en) * | 2018-11-20 | 2022-06-21 | 锐捷网络股份有限公司 | Installation method and device of embedded system |
CN113535200A (en) * | 2021-05-28 | 2021-10-22 | 宁波三星医疗电气股份有限公司 | Energy controller APP upgrading method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101316330A (en) * | 2007-06-01 | 2008-12-03 | 深圳Tcl工业研究院有限公司 | Method for upgrading television program |
CN101510161A (en) * | 2009-03-30 | 2009-08-19 | 北京中星微电子有限公司 | Bootstrap implementing method, apparatus and portable electronic apparatus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000207193A (en) * | 1999-01-13 | 2000-07-28 | Nec Ibaraki Ltd | Magnetic tape unit and firmware updating method for the same |
-
2009
- 2009-10-23 CN CN200910110580.9A patent/CN102043634B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101316330A (en) * | 2007-06-01 | 2008-12-03 | 深圳Tcl工业研究院有限公司 | Method for upgrading television program |
CN101510161A (en) * | 2009-03-30 | 2009-08-19 | 北京中星微电子有限公司 | Bootstrap implementing method, apparatus and portable electronic apparatus |
Non-Patent Citations (1)
Title |
---|
JP特开2000-207193A 2000.07.28 * |
Also Published As
Publication number | Publication date |
---|---|
CN102043634A (en) | 2011-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10353779B2 (en) | Systems and methods for detection of firmware image corruption and initiation of recovery | |
CN102043634B (en) | Embedded system and embedded software upgrading method | |
US7100087B2 (en) | Module and method for automatic restoring BIOS device | |
TWI386847B (en) | Method of safe and recoverable firmware update and device using the same | |
US9747192B2 (en) | Automated operating system installation on multiple drives | |
CN102622280B (en) | Control method and control device used for software version upgrade and based on dual file system | |
JP5363242B2 (en) | Method, computer program, and system for recovering an incorrectly programmed embedded device | |
CN104636217B (en) | A kind of root file system automated back-up and abnormal restoring method and partitioned organization | |
CN105917306B (en) | System and method for configuring system firmware configuration data | |
CN106598780A (en) | System backup and recovery method and device | |
EP2798428B1 (en) | Apparatus and method for managing operation of a mobile device | |
CN103514065A (en) | Electronic device with automatic detection and recovery function and method | |
CN100395713C (en) | Method of automatic repairing basic input output system element and module | |
US10824517B2 (en) | Backup and recovery of configuration files in management device | |
CN103984585A (en) | Method for upgrading Linux kernel in running process of kernel module capable of being plugged in thermal mode | |
TWI764454B (en) | Firmware corruption recovery | |
CN104866397A (en) | Computer System And Control Method | |
CN106909382B (en) | Method and device for outputting different types of system starting information | |
CN104459515A (en) | Mainboard production testing method | |
CN105630523A (en) | Computer BIOS data recovery system and method | |
KR101461650B1 (en) | Apparatus and method for managing file system of a computing device | |
KR101225841B1 (en) | Apparatus and method of updating restoration for firmware | |
CN103309691A (en) | Information processing equipment and quick startup method thereof | |
CN104850472A (en) | Method and device for restoring backup of system application software | |
CN104731665A (en) | Information processing method and electronic equipment |
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 |