CN106843940A - A kind of fast updating method of embedded system - Google Patents

A kind of fast updating method of embedded system Download PDF

Info

Publication number
CN106843940A
CN106843940A CN201611264014.XA CN201611264014A CN106843940A CN 106843940 A CN106843940 A CN 106843940A CN 201611264014 A CN201611264014 A CN 201611264014A CN 106843940 A CN106843940 A CN 106843940A
Authority
CN
China
Prior art keywords
subregion
configuration file
upgrading
embedded
active flag
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
CN201611264014.XA
Other languages
Chinese (zh)
Other versions
CN106843940B (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.)
Changsha HCC Hiden Technology Co Ltd
Original Assignee
Changsha HCC Hiden 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 Changsha HCC Hiden Technology Co Ltd filed Critical Changsha HCC Hiden Technology Co Ltd
Priority to CN201611264014.XA priority Critical patent/CN106843940B/en
Publication of CN106843940A publication Critical patent/CN106843940A/en
Application granted granted Critical
Publication of CN106843940B publication Critical patent/CN106843940B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of fast updating method of embedded system, after system starts, the configuration file for being used for upgrading is sent to needs the embedded device of upgrading, replaces original configuration file in the 3rd subregion;Restart system;After system electrification, Starting mode is determined according to whether second subregion is provided with system active flag:If then reading original configuration file activation system of dispatching from the factory from first subregion, and copy the original configuration file that dispatches from the factory of first subregion to the 3rd subregion;Otherwise from the 3rd subregion loading configuration file activation system;Then system active flag is set in second subregion;Judging whether system starts successfully again, if restarted again without if, otherwise removing the active flag in second subregion, and judge whether to upgrade successfully, need to be upgraded again if not.The present invention can rapidly carry out system upgrade, and can quickly carry out reduction to system after failure of upgrading and enable the system to normally start.

Description

A kind of fast updating method of embedded system
Technical field
The present invention relates to a kind of fast updating method of embedded system.
Background technology
The range of application of embedded system is increasingly extensive, is related to all many-sides of human lives, such as digital communication, information Household electrical appliances, Aero-Space, industrial stokehold and Military Electronics etc..Embedded technology and the every aspect relation of people's daily life More and more closely, consumer electronics, computer, communicating integral trend are increasingly apparent, used as an important set of computer realm Into part.
Embedded system is application-centered, and based on computer technology, and software and hardware can cut, and being adapted to should There is the dedicated system of hard constraints to function, reliability, cost, volume, power consumption with system.
Embedded system is typically made up of embedded software hardware, and software is closely integrated with hardware.Hardware is declined with insertion Processor is the input-output equipment of core, integrated memory and system-specific;Software includes setup code and driving, insertion Formula operating system and application program etc., these softwares are organically combined together, and form the specific integrated software of system.
With making rapid progress for software and hardware technology, embedded device is in constantly updating, it is therefore desirable to convenient to system Rapidly upgrade.In existing technology, the conventional upgrading mode of embedded system is:Embedded device is connected by serial ports To external host (computer, notebook etc.), specific operational order is input into come to insertion by tool software on external host System in formula equipment is upgraded.This method not only complex operation, easily error, and it also requires very strong computer Professional knowledge, thus be unfavorable for carrying out product batch upgrade, and once upgrading failure, system may be caused normally to open It is dynamic.
The content of the invention
Technical problem solved by the invention is, in view of the shortcomings of the prior art, there is provided a kind of embedded system it is quick Upgrade method, can rapidly carry out the replacement and upgrading of configuration file, also, quickly system can be carried out after failure of upgrading Reduction so that system also can normally start after failure of upgrading.
Technical scheme provided by the present invention is:
A kind of fast updating method of embedded system, pre-production is used for depositing for system startup when embedded system is dispatched from the factory Storage media:The storage medium started for system is divided into five subregions, and (size of subregion can be according to each partitioned storage File size is determined), wherein first subregion is used to preserving system and opens for dispatch from the factory original configuration file, second subregion of preservation Dynamic mark, the 3rd subregion be used to preserving system currently the configuration file of operation, the 4th subregion be used to storing root file system, 5th subregion is used to store user application and data;
The fast updating method of embedded system comprises the following steps:
Step 1, the root file system that the configuration file for being used for upgrading is sent to the embedded device for needing upgrading;
Step 2, the configuration file upgraded will be used for replace original configuration file in the 3rd subregion;
Step 3, restart system;
After step 4, system electrification, first determine whether whether second subregion is provided with active flag, according to the second point Whether area is provided with system active flag is carried out decision systems Starting mode;
If it has, representing that system last time starts failure, then reading the original configuration file that dispatches from the factory from first subregion starts system System, and copy the original configuration file that dispatches from the factory of first subregion to the 3rd subregion, cover original configuration file;If No, then from the 3rd subregion loading configuration file activation system;
Under original state, second subregion is not provided with active flag;
Step 5, the setting system active flag in second subregion;
Step 6, judge whether system starts successfully;If it is, removing the active flag in second subregion, go to step 7;Otherwise go to step 3;
Step 7, judge whether to upgrade successfully;If it is not, return to step 1 re-starts upgrading;Otherwise, escalate into Work(, terminates.
After system starts, first three subregion is hidden to domestic consumer, only represent most latter two subregion.First three subregion is related to And to the configuration of system, user can not at will modify, simply just the 3rd subregion of operation when upgrading;Thereby guarantee that The security of system.
Configuration file for upgrading sends the file system of the embedded device for needing upgrading to by the network commonly used.
The step 2 is specially:The root file system that the 3rd subregion of storage medium is mounted to system (is allowed to first It is visible to user);Then will be used in root file system during the configuration file upgraded copies the 3rd subregion of carry to, covering Original configuration file, and unload the 3rd subregion of carry.
Beneficial effect:
By the present invention, the file of the system currently needs such as configuration file of operation upgrading can be replaced quickly and easily Change, the method is simple, convenient, fast, reliable, it is not necessary to the operating personnel of special purpose computer knowledge, be easy to be in bulk System upgrading.Even if inadvertently causing upgrading to fail, configuration file can also be reverted to and dispatched from the factory by system after restarting again Original configuration, user can upgrade to configuration file again, make the system impacted time minimum, loss reduction.
Brief description of the drawings
Fig. 1 is the storage medium subregion started for system.
Fig. 2 is the flow of CONFIG.SYS upgrading.
Specific embodiment
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings.
As described in Figure 1, in the present invention, pre-production is used for the storage medium that system starts when embedded system is dispatched from the factory:Will For system start storage medium be divided into five subregions (size of subregion can according to the file size of each partitioned storage come It is fixed), wherein first subregion is used to preserving system active flag, for dispatch from the factory original configuration file, second subregion of preservation Three subregions be used to preserving system currently the configuration file of operation, the 4th subregion be used to storing root file system, the 5th point Area is used to store user application and data;After system starts, first three subregion is hidden to domestic consumer, only represent last Two subregions.
The fast updating method of embedded system comprises the following steps:
Step 1, the configuration file that will be used for upgrading send the embedded device for needing to upgrade to by the network commonly used Root file system;
Step 2, the configuration file upgraded will be used for replace original configuration file in the 3rd subregion;Specially:First 3rd subregion of storage medium is mounted to the root file system of system;Then the configuration upgraded will be used in root file system File copy covers original configuration file, and unload the 3rd subregion of carry in the 3rd subregion of carry;
Step 3, restart system;
After step 4, system electrification, first determine whether whether second subregion is provided with active flag;
If it has, representing that system last time starts failure, then reading the original configuration file that dispatches from the factory from first subregion starts system System, and copy the original configuration file that dispatches from the factory of first subregion to the 3rd subregion, cover original configuration file;If No, then from the 3rd subregion loading configuration file activation system;
Under original state, second subregion is not provided with active flag;
Step 5, the setting system active flag in second subregion;
Step 6, judge whether system starts successfully;If it is, removing the active flag in second subregion, go to step 7;3 pairs of systems are otherwise gone to step to reset;
Step 7, judge whether to upgrade successfully;If it is not, return to step 1 re-starts upgrading;Otherwise, escalate into Work(, terminates.
Judging whether system starts successfully and judge whether to upgrade successfully in the step 6 and 7 can be by manually carrying out Can also carry out automatically.
By means of the invention it is possible to the replacement and upgrading of configuration file are rapidly carried out, also, can be quick after failure of upgrading System is reduced so that system also can normally start after failure of upgrading.

Claims (4)

1. a kind of fast updating method of embedded system, it is characterised in that when embedded system is dispatched from the factory pre-production be used for be The storage medium that system starts:The storage medium started for system is divided into five subregions, wherein first subregion is used to preserve Dispatch from the factory original configuration file, second subregion is used to preserving system active flag, the 3rd subregion and is used to preserving system and currently transport Capable configuration file, the 4th subregion is used to store user application sum for storing root file system, the 5th subregion According to;
The fast updating method of the embedded system comprises the following steps:
Step 1, the root file system that the configuration file for being used for upgrading is sent to the embedded device for needing upgrading;
Step 2, the configuration file upgraded will be used in root file system replaces original configuration file in the 3rd subregion;
Step 3, restart system;
After step 4, system electrification, first determine whether whether second subregion is provided with active flag;
If it has, representing that system last time starts failure, then original configuration file activation system of dispatching from the factory is read from first subregion, and In copying the original configuration file that dispatches from the factory of first subregion to the 3rd subregion, original configuration file is covered;If it did not, Then from the 3rd subregion loading configuration file activation system;
Under original state, second subregion is not provided with active flag;
Step 5, the setting system active flag in second subregion;
Step 6, judge whether system starts successfully;If it is, removing the active flag in second subregion, 7 are gone to step;It is no Then go to step 3;
Step 7, judge whether to upgrade successfully;If it is not, return to step 1 re-starts upgrading;Otherwise, upgrade successfully, tie Beam.
2. the fast updating method of embedded system according to claim 1, it is characterised in that right after system starts Domestic consumer hides first three subregion, only represents most latter two subregion.
3. the fast updating method of embedded system according to claim 1, it is characterised in that in the step 1, be used for The configuration file of upgrading sends the file system of the embedded device for needing upgrading to by the network commonly used.
4. the fast updating method of embedded system according to claim 1, it is characterised in that the step 2 is specially: The 3rd subregion of storage medium is mounted to the root file system of system first;Then will be used for what is upgraded in root file system Configuration file is copied in the 3rd subregion of carry, covers original configuration file, and unload the 3rd subregion of carry.
CN201611264014.XA 2016-12-30 2016-12-30 Quick upgrading method for embedded system Active CN106843940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611264014.XA CN106843940B (en) 2016-12-30 2016-12-30 Quick upgrading method for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611264014.XA CN106843940B (en) 2016-12-30 2016-12-30 Quick upgrading method for embedded system

Publications (2)

Publication Number Publication Date
CN106843940A true CN106843940A (en) 2017-06-13
CN106843940B CN106843940B (en) 2020-02-14

Family

ID=59116755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611264014.XA Active CN106843940B (en) 2016-12-30 2016-12-30 Quick upgrading method for embedded system

Country Status (1)

Country Link
CN (1) CN106843940B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273170A (en) * 2017-07-03 2017-10-20 西南交通大学 A kind of SoPC programs remote update system and method
CN110413230A (en) * 2019-07-12 2019-11-05 湖南建工集团有限公司 A kind of embedded system construction method and storage medium
CN110554934A (en) * 2019-09-06 2019-12-10 山东超越数控电子股份有限公司 embedded equipment and system partitioning and upgrading method thereof
CN113515291A (en) * 2021-04-22 2021-10-19 北京汇钧科技有限公司 Equipment online upgrading method and device
CN113687851A (en) * 2021-08-31 2021-11-23 高新兴科技集团股份有限公司 Embedded equipment upgrading method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699421A (en) * 2014-01-08 2014-04-02 金三立视频科技(深圳)有限公司 Method and device for upgrading embedded device system
CN104156249A (en) * 2014-08-18 2014-11-19 四川九成信息技术有限公司 Embedded software upgrading method
CN105094903A (en) * 2015-07-16 2015-11-25 广州飞米电子科技有限公司 Method and device for upgrading firmware
CN105094913A (en) * 2015-07-31 2015-11-25 广东欧珀移动通信有限公司 System, base band fastener and system application upgrading method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699421A (en) * 2014-01-08 2014-04-02 金三立视频科技(深圳)有限公司 Method and device for upgrading embedded device system
CN104156249A (en) * 2014-08-18 2014-11-19 四川九成信息技术有限公司 Embedded software upgrading method
CN105094903A (en) * 2015-07-16 2015-11-25 广州飞米电子科技有限公司 Method and device for upgrading firmware
CN105094913A (en) * 2015-07-31 2015-11-25 广东欧珀移动通信有限公司 System, base band fastener and system application upgrading method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273170A (en) * 2017-07-03 2017-10-20 西南交通大学 A kind of SoPC programs remote update system and method
CN107273170B (en) * 2017-07-03 2018-07-27 西南交通大学 A kind of SoPC programs remote update system and method
CN110413230A (en) * 2019-07-12 2019-11-05 湖南建工集团有限公司 A kind of embedded system construction method and storage medium
CN110413230B (en) * 2019-07-12 2023-01-06 湖南建工集团有限公司 Embedded system construction method and storage medium
CN110554934A (en) * 2019-09-06 2019-12-10 山东超越数控电子股份有限公司 embedded equipment and system partitioning and upgrading method thereof
CN113515291A (en) * 2021-04-22 2021-10-19 北京汇钧科技有限公司 Equipment online upgrading method and device
CN113687851A (en) * 2021-08-31 2021-11-23 高新兴科技集团股份有限公司 Embedded equipment upgrading method and device

Also Published As

Publication number Publication date
CN106843940B (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN106843940A (en) A kind of fast updating method of embedded system
US7631174B2 (en) Method of updating firmware in computer server systems
US6668261B1 (en) Method of upgrading a program using associated configuration data
US7334157B1 (en) Restore of data to a computer system having different hardware
TW454147B (en) Recoverable software installation process and apparatus for a computer system
US8875125B2 (en) Operation system installation methods and media
US20030233534A1 (en) Enhanced computer start-up methods
CN100389395C (en) Memory dump program boot method and mechanism, and computer-readable storage medium
US20050038934A1 (en) USB-based peripheral device and method for starting up the USB-based peripheral device
CN103150231A (en) Computer booting method and computer system
CN104778066B (en) The quick start method and its device of a kind of embedded OS
CN105607972B (en) A kind of method and device repaired extremely
CN102135893A (en) Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server
CN103514015A (en) Method and device for booting operation system from storage medium
CN110413230A (en) A kind of embedded system construction method and storage medium
EP2280348B1 (en) Method and system for saving operational state of running applications when unexpected shutdown events occur
CN103077043A (en) Method for fast starting and operating Linux
CN110119330A (en) Method for automatically restoring BIOS file of cloud backup server BIOSROM
US20150324209A1 (en) Operating System Switching Method and Dual-Operating System Electronic Device Using the Same
CN105117250A (en) Compatibility processing method and electronic device
US8086834B2 (en) System and method for populating a dedicated system service repository for an information handling system
CN103995717A (en) Method for upgrading software in embedded device
KR101576370B1 (en) System and method for remote restoration of computer system, and computer-readable recording medium with program therefor
CN104866397A (en) Computer System And Control Method
TW202131170A (en) Firmware corruption recovery

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant