CN102402445A - Program upgrading method, program upgrading device and embedded equipment - Google Patents

Program upgrading method, program upgrading device and embedded equipment Download PDF

Info

Publication number
CN102402445A
CN102402445A CN2011103718180A CN201110371818A CN102402445A CN 102402445 A CN102402445 A CN 102402445A CN 2011103718180 A CN2011103718180 A CN 2011103718180A CN 201110371818 A CN201110371818 A CN 201110371818A CN 102402445 A CN102402445 A CN 102402445A
Authority
CN
China
Prior art keywords
program image
program
hardware platform
alternative
image
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
CN2011103718180A
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 Star Net Ruijie Networks Co Ltd
Ruijie Networks Co Ltd
Original Assignee
Beijing Star Net Ruijie Networks 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 Star Net Ruijie Networks Co Ltd filed Critical Beijing Star Net Ruijie Networks Co Ltd
Priority to CN2011103718180A priority Critical patent/CN102402445A/en
Publication of CN102402445A publication Critical patent/CN102402445A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a program upgrading method, a program upgrading device and embedded equipment. The program upgrading method comprises the following steps of: operating a bootstrap program, loading a main program image in a program image packet on a hardware platform which is required to be subjected to program upgrading, and if the main program image is applicable to the hardware platform, operating a main program on the hardware platform; or if standby program images exist in the program image packet, sequentially loading all standby program images on the hardware platform until the standby program image which is currently loaded is applicable to the hardware platform, and operating a standby program which is currently loaded on the hardware platform. By adoption of the program upgrading method provided by the embodiment of the invention, a plurality of hardware platforms can be upgraded by using the same program image packet. Compared with an implementation mode of upgrading a hardware platform by using a program image in the prior art, the implementation mode by the program upgrading method has the advantages that: the complexity of upgrading can be reduced; the probability of using errors of upgrading software when a plurality of pieces of equipment are required to be upgraded can be reduced; and upgrading efficiency is improved.

Description

A kind of method of program upgrade, device and embedded device
Technical field
The present invention relates to the software upgrading field, relate in particular to a kind of method, device and embedded device of program upgrade.
Background technology
Embedded OS on embedded device (Embedded Operating System) is referred to as master routine again, and it is topmost program image on the embedded device, and the running environment that is used to the application providing system level on the hardware platform supports.Usually, embedded OS is write to specific processor platform and corresponding hardware platform characteristic, and therefore, the embedded OS that operates on the different embedded devices often can't be general.For this reason, manufacturer often need supply customer upgrade to the different system program of each product issue in issue embedded OS software.Like this, when the user has the embedded device of many moneys different model, just need remove to manage respectively all system softwares of these equipment.
For some embedded devices, possible hardware is formed broadly similar, only is part hardware different (not equal like processor difference or exchange chip); But such equipment still need adopt different system softwares respectively it to be carried out program upgrade; Increased the complexity of upgrading, and, when need upgrading, very easily cause a plurality of equipment the use mistake of upgrade software; Cause the upgrading failure, efficient is lower.
Summary of the invention
The embodiment of the invention provides a kind of method, device and embedded device of program upgrade, in order to reduce the complexity of program upgrade, improves the efficient of upgrading.
The method of a kind of program upgrade that the embodiment of the invention provides comprises:
The operation boot, the master on needing the hardware platform of ROMPaq in the loading procedure reflection bag uses program image;
Confirm whether the said master who loads is applicable to said hardware platform with program image;
If, the main program of using of operation on said hardware platform;
If not; Confirm whether there is alternative program image in the said program image bag; If exist; On said hardware platform, load each alternative program image successively, be applicable to said hardware platform until the alternative program image of confirming current loading, and the alternative program of the current loading of operation on said hardware platform.
The device of a kind of program upgrade that the embodiment of the invention provides comprises:
Load-on module is used to move boot, and the master on needing the hardware platform of ROMPaq in the loading procedure reflection bag uses program image; Said main during what confirm to load with the inapplicable said hardware platform of program image; Confirm whether there is alternative program image in the said program image bag; If exist; In said hardware platform, load each alternative program image successively, be applicable to said hardware platform until the alternative program image of confirming current loading;
Determination module is used for confirming whether the said master who loads is applicable to said hardware platform with program image or alternative program image;
The operation module is used for when confirming that the said master who loads is applicable to said hardware platform with program image, the main program of using of operation on said hardware platform; When the alternative program image of confirming current loading is applicable to said hardware platform, the alternative program of the current loading of operation on said hardware platform.
A kind of embedded device that the embodiment of the invention provides comprises the device of the said procedure upgrading that the embodiment of the invention provides.
The beneficial effect of the embodiment of the invention comprises:
The method of a kind of program upgrade that the embodiment of the invention provides, device and embedded device; The operation boot; Master on needing the hardware platform of ROMPaq in the loading procedure reflection bag with program image after; When confirming that the master is used for this hardware platform with program image, the main program of using of operation on hardware platform; Otherwise; After in definite program image bag, having alternative program image; On hardware platform, load each alternative program image successively, be applicable to this hardware platform until the alternative program image of confirming current loading, and the alternative program of the current loading of operation on hardware platform.The said procedure upgrade method of using the embodiment of the invention to provide; Can use same program image bag a plurality of hardware platforms of upgrading; With respect to the implementation of using a hardware platform of a program image upgrading in the prior art respectively; Can reduce the complexity of a plurality of hardware platform program upgrades, and the probability of the use mistake of upgrade software can reduce a plurality of equipment and need upgrade the time, upgrading efficient improved.
Description of drawings
The process flow diagram of the method for the program upgrade that Fig. 1 provides for the embodiment of the invention;
The structural representation of the program image bag that Fig. 2 provides for the embodiment of the invention;
The process flow diagram of the instance that Fig. 3 provides for the embodiment of the invention;
The structural representation of the device of the program upgrade that Fig. 4 provides for the embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing, the embodiment of method, device and the embedded device of the program upgrade that the embodiment of the invention is provided is at length explained.
The programme upgrade method that the embodiment of the invention provides can be applied to the to upgrade embedded OS of a plurality of embedded devices can also be applied to the multiple application program of upgrading hardware platform, does not do qualification at this.
Particularly, the method for a kind of program upgrade that the embodiment of the invention provides, as shown in Figure 1, may further comprise the steps:
S101, operation boot;
S102, the master on needing the hardware platform of ROMPaq in the loading procedure reflection bag use program image;
Whether S103, definite master who loads are applicable to hardware platform with program image; If, execution in step S104; If not, execution in step S105;
S104, on hardware platform this main program of using of operation;
S105, confirm whether there is alternative program image in the program image bag; If there is execution in step S106; If there is not execution in step S108;
S106, on hardware platform, load each alternative program image successively, be applicable to hardware platform until the alternative program image of confirming current loading;
The alternative program of S107, the current loading of operation on hardware platform;
S108, process ends.
Particularly; The program image bag that uses in the said method that the embodiment of the invention provides; Can obtain in the following manner: before embedded product is upgraded, when the program image that need upgrade when a plurality of hardware platforms is incomplete same, in the program image that a plurality of hardware platforms need be upgraded, chooses a program image and use program image as main; The alternative program image of other conduct; To lead with program image and at least one alternative program image packing generator program reflection bag, the program image bag for packing after generating shown in Figure 2 comprises that a master is with program image and a plurality of alternative program image; Perhaps; When the program image that need upgrade when a plurality of hardware platforms is identical; Can the program image that a plurality of hardware platforms need be upgraded be used program image as the master; And will lead with program image packing generator program reflection bag, so just can use this program image bag is a plurality of hardware platform ROMPaqs.
In the method that the embodiment of the invention provides, a plurality of program images of a plurality of hardware platforms are merged into a program image bag, can reduce the software publishing number of times of manufacturer; Make things convenient for manufacturer and user software version management to equipment; And, use same program image bag a plurality of hardware platforms of upgrading, can reduce the complexity of upgrading; And the probability of the use mistake of upgrade software in the time of also can reducing a plurality of equipment and need upgrade improves upgrading efficient.
In the specific implementation; Preferably, the master in the program image bag is with program image and the equal processed compressed of alternative program image, and a plurality of alternative program image can be attached to main with after the program image with the mode of additional compression data successively; Like this, also be convenient to existing hardware platform compatible.
The concrete implementation of each step of the said method that provides in the face of the embodiment of the invention is down carried out detailed explanation, wherein, is attached to the main program image structure afterwards of using with the alternative program image in the program image bag with the mode of additional compression data and is the example explanation.
Particularly, confirm among the step S103 of said method whether the master who loads is applicable to hardware platform with program image, can realize through following manner:
At first, boot reads the sign of hardware platform, for example the model of product or numbering;
Then, boot is judged the sign that whether has this hardware platform in the main product mark tabulation with program image, if confirm that this master is applicable to this hardware platform with program image.
Whether the master of above-mentioned definite loading is applicable to that with program image the detailed process of current hardware platform just illustrates, and when practical operation, can also realize through other modes, does not limit at this.
Similarly, confirm whether the alternative program image that loads is applicable to that the implementation procedure of current hardware platform also can realize by the way.
Particularly, the concrete implementation procedure of step S105~S108 is as shown in Figure 3 in the said method, can may further comprise the steps:
The alternative program image of not reading in S301, the search utility reflection bag;
S302, judge whether to search an alternative program image, if, execution in step S303; If not, execution in step S307;
S303, the alternative program image that decompresses and search;
S304, the alternative program image after loading decompression on the hardware platform;
S305, judge the sign that whether has this hardware platform in the product mark tabulation of alternative program image; If, execution in step S306; If not, return step S301;
S306, confirm that this alternative program image is applicable to current hardware platform, this alternative program image of operation on hardware platform;
S307, process ends.
Particularly; Master in the said method that the embodiment of the invention provides in the program image bag is that loading position is fixed in the internal memory of hardware platform with program image and alternative program image; Like this, during the inapplicable current hardware platform of the program image that in confirming hardware platform, loads, need internal memory not wiped one time; The follow-up program image that loads once more directly just can override the content of this fixed position in the internal memory, makes things convenient for memory management.
In the specific implementation, the said method that uses a program image bag just can use the embodiment of the invention to provide to the serial equipment of a plurality of hardware composition broadly similars carries out program upgrade, can greatly improve the efficient of program upgrade.
Based on same inventive concept; The embodiment of the invention also provides a kind of device and embedded device of program upgrade; Because the principle that this device and equipment are dealt with problems is similar with the method for aforementioned a kind of program upgrade; Therefore the enforcement of this device and equipment can repeat part and repeat no more referring to the enforcement of method.
The device of a kind of program upgrade that the embodiment of the invention provides, as shown in Figure 4, comprising:
Load-on module 401 is used to move boot, and the master on needing the hardware platform of ROMPaq in the loading procedure reflection bag uses program image; Main during what confirm to load with the inapplicable hardware platform of program image; Confirm whether there is alternative program image in the said program image bag; If exist, in hardware platform, load each alternative program image successively, be applicable to hardware platform until the alternative program image of confirming current loading;
Determination module 402 is used for confirming whether the master who loads is applicable to hardware platform with program image or alternative program image;
Operation module 403 is used for when confirming that the master who loads is applicable to hardware platform with program image, the main program of using of operation on hardware platform; When the alternative program image of confirming current loading is applicable to hardware platform, the alternative program of the current loading of operation on hardware platform.
Further, the said apparatus that the embodiment of the invention provides, as shown in Figure 4; Can also comprise: reflection bag generation module 404; Be used for before the operation boot, when the program image that need upgrade when a plurality of hardware platforms is incomplete same, in the program image that a plurality of hardware platforms need be upgraded, chooses a program image and use program image as main; The alternative program image of other conduct will be led with the alternative program image packing of program image and at least one generator program reflection bag; When the program image that need upgrade when a plurality of hardware platforms is identical, the program image that a plurality of hardware platforms need be upgraded use program image as main, and will lead with program image packing generator program reflection and wrap.
Further, cover half piece 402 really in the said apparatus that the embodiment of the invention provides specifically is used to read the sign of hardware platform; Judge the sign that whether has hardware platform in the main product mark tabulation, if confirm that the master is applicable to hardware platform with program image or alternative program image with program image or alternative program image.
Further; The said apparatus that the embodiment of the invention provides, as shown in Figure 4, can also comprise: output module 405; Be used for when the master who confirms the program image bag is not suitable for hardware platform with program image and alternative program image the result of written-out program upgrading failure.
The embodiment of the invention also provides a kind of embedded device, specifically comprises the device of the said procedure upgrading that the embodiment of the invention provides.
Through the description of above embodiment, those skilled in the art can be well understood to the embodiment of the invention and can realize through hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding; The technical scheme of the embodiment of the invention can be come out with the embodied of software product, this software product can be stored in a non-volatile memory medium (can be CD-ROM, USB flash disk; Portable hard drive etc.) in; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the synoptic diagram of a preferred embodiment, module in the accompanying drawing or flow process might not be that embodiment of the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number is not represented the quality of embodiment just to description.
The method of a kind of program upgrade that the embodiment of the invention provides, device and embedded device; The operation boot; Master on needing the hardware platform of ROMPaq in the loading procedure reflection bag with program image after; When confirming that the master is used for this hardware platform with program image, the main program of using of operation on hardware platform; Otherwise; After in definite program image bag, having alternative program image; On hardware platform, load each alternative program image successively, be applicable to this hardware platform until the alternative program image of confirming current loading, and the alternative program of the current loading of operation on hardware platform.The said procedure upgrade method of using the embodiment of the invention to provide; Can use same program image bag a plurality of hardware platforms of upgrading; With respect to the implementation of using a hardware platform of a program image upgrading in the prior art respectively; Can reduce the complexity of a plurality of hardware platform program upgrades, and the probability of the use mistake of upgrade software can reduce a plurality of equipment and need upgrade the time, upgrading efficient improved.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.

Claims (10)

1. the method for a program upgrade is characterized in that, comprising:
The operation boot, the master on needing the hardware platform of ROMPaq in the loading procedure reflection bag uses program image;
Confirm whether the said master who loads is applicable to said hardware platform with program image;
If, the main program of using of operation on said hardware platform;
If not; Confirm whether there is alternative program image in the said program image bag; If exist; On said hardware platform, load each alternative program image successively, be applicable to said hardware platform until the alternative program image of confirming current loading, and the alternative program of the current loading of operation on said hardware platform.
2. the method for claim 1 is characterized in that, before the operation boot, also comprises:
When the program image that need upgrade when a plurality of hardware platforms is incomplete same; In the program image that said a plurality of hardware platforms need be upgraded, choose a program image and use program image as the master; The alternative program image of other conduct is with said main with the said program image bag of program image and at least one alternative program image packing generation;
When the program image that need upgrade when a plurality of hardware platforms is identical, the program image that said a plurality of hardware platforms need be upgraded use program image as main, and said master is wrapped with program image packing generator program reflection.
3. the method for claim 1 is characterized in that, the fixed memory position in said hardware platform loads main with program image or alternative program image.
4. like each described method of claim 1-3, it is characterized in that, confirm that whether the said master who loads is applicable to said hardware platform with program image or alternative program image, specifically comprises:
Read the sign of said hardware platform;
Judge the sign that whether has said hardware platform in the product mark tabulation of said master with program image or said alternative program image, if confirm that said master is applicable to said hardware platform with program image or said alternative program image.
5. like each described method of claim 1-3, it is characterized in that, also comprise:
When the master in confirming said program image bag is not suitable for said hardware platform with program image and alternative program image, the result of written-out program upgrading failure.
6. the device of a program upgrade is characterized in that, comprising:
Load-on module is used to move boot, and the master on needing the hardware platform of ROMPaq in the loading procedure reflection bag uses program image; Said main during what confirm to load with the inapplicable said hardware platform of program image; Confirm whether there is alternative program image in the said program image bag; If exist; In said hardware platform, load each alternative program image successively, be applicable to said hardware platform until the alternative program image of confirming current loading;
Determination module is used for confirming whether the said master who loads is applicable to said hardware platform with program image or alternative program image;
The operation module is used for when confirming that the said master who loads is applicable to said hardware platform with program image, the main program of using of operation on said hardware platform; When the alternative program image of confirming current loading is applicable to said hardware platform, the alternative program of the current loading of operation on said hardware platform.
7. device as claimed in claim 6 is characterized in that, also comprises:
Reflection bag generation module; Be used for before the operation boot; When the program image that need upgrade when a plurality of hardware platforms is incomplete same; In the program image that said a plurality of hardware platforms need be upgraded, choose a program image and use program image as main, the alternative program image of other conduct is with said main with the said program image bag of program image and at least one alternative program image packing generation; When the program image that need upgrade when a plurality of hardware platforms is identical, the program image that said a plurality of hardware platforms need be upgraded use program image as main, and said master is wrapped with program image packing generator program reflection.
8. like claim 6 or 7 described devices, it is characterized in that said determination module specifically is used to read the sign of said hardware platform; Judge the sign that whether has said hardware platform in the product mark tabulation of said master with program image or alternative program image, if confirm that said master is applicable to said hardware platform with program image or alternative program image.
9. like claim 6 or 7 described devices, it is characterized in that, also comprise:
Output module is used for when the master who confirms said program image bag is not suitable for said hardware platform with program image and alternative program image, the result of written-out program upgrading failure.
10. an embedded device is characterized in that, comprises the device like each described program upgrade of claim 6~9.
CN2011103718180A 2011-11-21 2011-11-21 Program upgrading method, program upgrading device and embedded equipment Pending CN102402445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103718180A CN102402445A (en) 2011-11-21 2011-11-21 Program upgrading method, program upgrading device and embedded equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103718180A CN102402445A (en) 2011-11-21 2011-11-21 Program upgrading method, program upgrading device and embedded equipment

Publications (1)

Publication Number Publication Date
CN102402445A true CN102402445A (en) 2012-04-04

Family

ID=45884678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103718180A Pending CN102402445A (en) 2011-11-21 2011-11-21 Program upgrading method, program upgrading device and embedded equipment

Country Status (1)

Country Link
CN (1) CN102402445A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506822A (en) * 2002-12-09 2004-06-23 联想(北京)有限公司 Hardware driving and software updating method based on multiplexed embedded system with expandable form
US6834384B2 (en) * 2001-03-14 2004-12-21 General Instrument Corporation Methods and apparatus for upgrading firmware in an embedded system
CN102023881A (en) * 2010-12-14 2011-04-20 福建星网锐捷网络有限公司 Method and device for upgrading software as well as embedded device
CN102081537A (en) * 2010-12-31 2011-06-01 青岛海信宽带多媒体技术有限公司 Method for upgrading software

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6834384B2 (en) * 2001-03-14 2004-12-21 General Instrument Corporation Methods and apparatus for upgrading firmware in an embedded system
CN1506822A (en) * 2002-12-09 2004-06-23 联想(北京)有限公司 Hardware driving and software updating method based on multiplexed embedded system with expandable form
CN102023881A (en) * 2010-12-14 2011-04-20 福建星网锐捷网络有限公司 Method and device for upgrading software as well as embedded device
CN102081537A (en) * 2010-12-31 2011-06-01 青岛海信宽带多媒体技术有限公司 Method for upgrading software

Similar Documents

Publication Publication Date Title
CN103186460B (en) A kind of method, Apparatus and system of generating test use case script
US8732446B2 (en) Selectively compressing blocks of a bootable snapshot image during booting
CN103577212A (en) System starting preloading method and device
US20110179260A1 (en) Method for integrating operating system into bios chip and method for booting operating system from server
CN103473067A (en) Embedded Linux partitioning and data recovery method, embedded Linux partitioning and data recovery system and system development method
US8266419B2 (en) Fast restart on a virtual machine
CN104778066B (en) The quick start method and its device of a kind of embedded OS
CN112068852B (en) Method, system, equipment and medium for installing open-source software based on domestic server
CN103246534A (en) Method and device for migrating operating system
CN101894028B (en) Realization method and device for Linux kernel mirror image data supporting various CPUs
CN103077043A (en) Method for fast starting and operating Linux
CN102141923A (en) Memory file system loading method and device
CN108694052B (en) Firmware upgrading method, firmware upgrading device and firmware upgrading system
CN105095767A (en) System and method for secure startup checked based on file data block
CN111078279A (en) Processing method, device and equipment of byte code file and storage medium
JP5225071B2 (en) Method for verifying pseudo code loaded on embedded systems, especially smart cards
CN102857817B (en) Set-top box production system and method capable of realizing dynamical loading
CN116543828B (en) UFS protocol testing method and device, readable storage medium and electronic equipment
CN113741954A (en) System software generation method and device, electronic equipment and storage medium
CN105630530A (en) Multilevel boot method and system of digital signal processor
CN104459515A (en) Mainboard production testing method
CN107463423B (en) Verification method, storage medium, electronic device and system depending on package tool
CN111694600B (en) Mirror image file design, chip operation method, system, device and medium
CN102402445A (en) Program upgrading method, program upgrading device and embedded equipment
CN102629259A (en) Read-only file system setting up method in embedded system, device and embedded 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: 20120404