CN106843940B - Quick upgrading method for embedded system - Google Patents
Quick upgrading method for embedded system Download PDFInfo
- Publication number
- CN106843940B CN106843940B CN201611264014.XA CN201611264014A CN106843940B CN 106843940 B CN106843940 B CN 106843940B CN 201611264014 A CN201611264014 A CN 201611264014A CN 106843940 B CN106843940 B CN 106843940B
- Authority
- CN
- China
- Prior art keywords
- partition
- configuration file
- upgrading
- embedded
- original
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Abstract
The invention discloses a rapid upgrading method of an embedded system, which comprises the steps of transmitting a configuration file for upgrading to embedded equipment to be upgraded after the system is started, and replacing the original configuration file in a third partition; restarting the system; after the system is powered on, determining a starting mode according to whether a system starting mark is set in the second partition: if yes, reading the original factory configuration file from the first partition to start the system, and copying the original factory configuration file of the first partition into a third partition; otherwise, loading the configuration file from the third partition to start the system; then, setting a system starting mark in a second partition; and judging whether the system is started successfully or not, if not, restarting again, otherwise, clearing the starting mark in the second partition, judging whether the upgrading is successful or not, and if not, upgrading again. The invention can rapidly upgrade the system, and can rapidly restore the system after the upgrade fails so that the system can be normally started.
Description
Technical Field
The invention relates to a quick upgrading method of an embedded system.
Background
Embedded systems are increasingly used in a wide range of applications, involving many aspects of human life, such as digital communications, information appliances, aerospace, industrial process control, and military electronics. The embedded technology is more and more closely related to the aspects of daily life of people, and the integration trend of consumer electronics, computers and communication is more and more obvious, so that the embedded technology is used as an important component in the field of computers.
The embedded system is based on computer technology and has available software and hardware, and is suitable for application system with strict function, reliability, cost, volume and power consumption constraints.
Embedded systems are generally composed of embedded software and hardware, and the software is tightly integrated with the hardware. The hardware takes an embedded microprocessor as a core, and integrates a memory and input and output equipment special for the system; the software comprises initialization codes and drivers, an embedded operating system, application programs and the like, and the software is organically combined together to form system-specific integrated software.
With the change of software and hardware technologies, embedded devices are continuously updated, so that the system needs to be upgraded conveniently and quickly. In the prior art, a conventional upgrading mode of an embedded system is as follows: the embedded device is connected to an external host (a computer, a notebook computer and the like) through a serial port, and a specific operation command is input on the external host through tool software to upgrade a system in the embedded device. The method is not only complex in operation and easy to make mistakes, but also needs very strong computer professional knowledge, thus being not beneficial to the batch upgrading of products, and once the upgrading fails, the system can not be started normally.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method for rapidly upgrading an embedded system, which can rapidly replace and upgrade configuration files, and can rapidly restore the system after the upgrade fails, so that the system can be normally started after the upgrade fails.
The technical scheme provided by the invention is as follows:
a method for rapidly upgrading an embedded system, wherein a storage medium for starting the system is manufactured in advance when the embedded system leaves a factory: dividing a storage medium for system startup into five partitions (the size of each partition can be determined according to the size of a file stored in each partition), wherein the first partition is used for saving a factory original configuration file, the second partition is used for saving a system startup mark, the third partition is used for saving a configuration file currently running by a system, the fourth partition is used for storing a root file system, and the fifth partition is used for storing user applications and data;
the quick upgrading method of the embedded system comprises the following steps:
step 1, transmitting a configuration file for upgrading to a root file system of embedded equipment needing upgrading;
step 2, replacing the original configuration file in the third partition with the configuration file for upgrading;
step 3, restarting the system;
step 4, after the system is powered on, firstly judging whether a second partition is provided with a starting mark, and determining a system starting mode according to whether the second partition is provided with a system starting mark;
if the configuration file exists, the system is started by reading the original factory configuration file from the first partition, and the original factory configuration file of the first partition is copied to a third partition to cover the original configuration file, wherein the original configuration file is read from the third partition; if not, loading a configuration file from a third partition to start the system;
in the initial state, the second partition is not provided with a starting mark;
step 5, setting a system starting mark in the second partition;
step 6, judging whether the system is started successfully; if yes, clearing the starting mark in the second partition, and turning to the step 7; otherwise, turning to the step 3;
step 7, judging whether the upgrade is successful; if not, returning to the step 1 to upgrade again; otherwise, the upgrade is successful, and the process is finished.
After the system is started, the first three partitions are hidden for a common user, and only the last two partitions are displayed. The first three partitions relate to the configuration of the system, and a user cannot modify the system at will and only operates the third partition when upgrading; thereby ensuring the security of the system.
The configuration file for upgrading is transmitted to the file system of the embedded device needing upgrading through a common network.
The step 2 specifically comprises the following steps: first mount the third partition of the storage media to the root file system of the system (making it visible to the user); and then copying the configuration file used for upgrading in the root file system to the mounted third partition, covering the original configuration file, and unloading the mounted third partition.
Has the advantages that:
the method is simple, convenient, quick and reliable, does not need operators with professional computer knowledge, and is convenient for upgrading the system in batches. Even if the upgrade is failed accidentally, the system can restore the configuration file to the original factory configuration after restarting again, and the user can upgrade the configuration file again, so that the system is influenced by the minimum time and the minimum loss.
Drawings
FIG. 1 is a storage media partition for system boot.
Fig. 2 is a flow of system configuration file upgrade.
Detailed Description
The invention is further described with reference to the following figures and specific examples.
As shown in fig. 1, in the present invention, a storage medium for system startup is manufactured in advance when an embedded system is shipped: dividing a storage medium for system startup into five partitions (the size of each partition can be determined according to the size of a file stored in each partition), wherein the first partition is used for saving a factory original configuration file, the second partition is used for saving a system startup mark, the third partition is used for saving a configuration file currently running by a system, the fourth partition is used for storing a root file system, and the fifth partition is used for storing user applications and data; after the system is started, the first three partitions are hidden for a common user, and only the last two partitions are displayed.
The quick upgrading method of the embedded system comprises the following steps:
step 1, transmitting a configuration file for upgrading to a root file system of embedded equipment needing upgrading through a common network;
step 2, replacing the original configuration file in the third partition with the configuration file for upgrading; the method specifically comprises the following steps: firstly, mounting a third partition of a storage medium to a root file system of a system; copying a configuration file used for upgrading in the root file system to a mounted third partition, covering the original configuration file, and unloading the mounted third partition;
step 3, restarting the system;
step 4, after the system is powered on, firstly judging whether a starting mark is arranged in the second partition;
if the configuration file exists, the system is started by reading the original factory configuration file from the first partition, and the original factory configuration file of the first partition is copied to a third partition to cover the original configuration file, wherein the original configuration file is read from the third partition; if not, loading a configuration file from a third partition to start the system;
in the initial state, the second partition is not provided with a starting mark;
step 5, setting a system starting mark in the second partition;
step 6, judging whether the system is started successfully; if yes, clearing the starting mark in the second partition, and turning to the step 7; otherwise, turning to the step 3 to reset the system;
step 7, judging whether the upgrade is successful; if not, returning to the step 1 to upgrade again; otherwise, the upgrade is successful, and the process is finished.
In the steps 6 and 7, whether the system is started successfully or not and whether the upgrade is successful or not can be judged manually or automatically.
The invention can quickly replace and upgrade the configuration file, and can quickly restore the system after the upgrade fails, so that the system can be normally started after the upgrade fails.
Claims (3)
1. A method for rapidly upgrading an embedded system is characterized in that a storage medium for starting the system is configured in advance when the embedded system leaves a factory: dividing a storage medium for starting a system into five partitions, wherein the first partition is used for saving original configuration files from a factory, the second partition is used for saving system starting marks, the third partition is used for saving configuration files of the current operation of the system, the fourth partition is used for storing a root file system, and the fifth partition is used for storing user application programs and data;
the quick upgrading method of the embedded system comprises the following steps:
step 1, transmitting a configuration file for upgrading to a root file system of embedded equipment needing upgrading;
step 2, replacing the original configuration file in the third partition with the configuration file for upgrading in the root file system;
step 3, restarting the system;
step 4, after the system is powered on, firstly judging whether a starting mark is arranged in the second partition;
if the configuration file exists, the system is started by reading the original factory configuration file from the first partition, and the original factory configuration file of the first partition is copied to a third partition to cover the original configuration file, wherein the original configuration file is read from the third partition; if not, loading a configuration file from a third partition to start the system;
in the initial state, the second partition is not provided with a starting mark;
step 5, setting a system starting mark in the second partition;
step 6, judging whether the system is started successfully; if yes, clearing the starting mark in the second partition, and turning to the step 7; otherwise, turning to the step 3;
step 7, judging whether the upgrade is successful; if not, returning to the step 1 to upgrade again; otherwise, the upgrade is successful, and the process is finished.
2. The method for rapidly upgrading an embedded system according to claim 1, wherein after the system is started, the first to third partitions are hidden from a general user, and only the fourth and fifth partitions are exposed.
3. The method for rapidly upgrading an embedded system according to claim 1, wherein the step 2 specifically comprises: firstly, mounting a third partition of a storage medium to a root file system of a system; and then copying the configuration file used for upgrading in the root file system to the mounted third partition, covering the original configuration file, and unloading the mounted third partition.
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 CN106843940A (en) | 2017-06-13 |
CN106843940B true 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) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107273170B (en) * | 2017-07-03 | 2018-07-27 | 西南交通大学 | A kind of SoPC programs remote update system and method |
CN110413230B (en) * | 2019-07-12 | 2023-01-06 | 湖南建工集团有限公司 | Embedded system construction method and storage medium |
CN110554934B (en) * | 2019-09-06 | 2022-08-19 | 超越科技股份有限公司 | 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)
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 |
CN105094913A (en) * | 2015-07-31 | 2015-11-25 | 广东欧珀移动通信有限公司 | System, base band fastener and system application upgrading method and device |
CN105094903A (en) * | 2015-07-16 | 2015-11-25 | 广州飞米电子科技有限公司 | Method and device for upgrading firmware |
-
2016
- 2016-12-30 CN CN201611264014.XA patent/CN106843940B/en active Active
Patent Citations (4)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN106843940A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106843940B (en) | Quick upgrading method for embedded system | |
CN105745617B (en) | Selective power management for pre-boot firmware updates | |
US20110276724A1 (en) | System and Method for Updating Device Drivers | |
EP2474913A1 (en) | USB device switching working mode | |
US9430208B2 (en) | System and method of remote management and configuration of an information handling system by implementing a customized configuration of a personality module | |
CN103412769A (en) | External card parameter configuration method, equipment and system | |
CN105917306B (en) | System and method for configuring system firmware configuration data | |
US7822964B2 (en) | Booting apparatus for booting a computer and method therefor and computer with a booting apparatus | |
US20150082056A1 (en) | Computer device and method for converting working mode of universal serial bus connector of the computer device | |
US20130007428A1 (en) | System and method for customized configuration of information handling systems | |
CN103514015A (en) | Method and device for booting operation system from storage medium | |
EP3614258B1 (en) | Retrieving updated firmware code | |
CN105824678A (en) | Method and device for installing operating system | |
CN107111568B (en) | System and method for presenting drive installation files when USB device is enabled | |
US7849300B2 (en) | Method for changing booting sources of a computer system and a related backup/restore method thereof | |
CN106155713B (en) | Startup information management method and device | |
US20150324209A1 (en) | Operating System Switching Method and Dual-Operating System Electronic Device Using the Same | |
CN114207583B (en) | External operating system driving device and method thereof | |
CN108664275A (en) | Method, system and the storage medium of backup configuration parameter | |
TW202131170A (en) | Firmware corruption recovery | |
US20090119445A1 (en) | Computer memory accessible in either power state of the computer | |
US20200210166A1 (en) | Systems and methods for enforcing update policies while applying updates from bootable image file | |
CN102023873B (en) | Application program execution method and system, storage media controller and storage device | |
KR20040029089A (en) | Device for use in a network environment | |
US20120278509A1 (en) | Updating device and method through a baseboard management controller thereof |
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 |