CN103678035A - Method for recovering dynamic backup of environmental variable in embedded device - Google Patents

Method for recovering dynamic backup of environmental variable in embedded device Download PDF

Info

Publication number
CN103678035A
CN103678035A CN201310556984.7A CN201310556984A CN103678035A CN 103678035 A CN103678035 A CN 103678035A CN 201310556984 A CN201310556984 A CN 201310556984A CN 103678035 A CN103678035 A CN 103678035A
Authority
CN
China
Prior art keywords
embedded
environment variable
microprocessor
operating
current environment
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
CN201310556984.7A
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.)
GUANGDONG DINGCAN TECHNOLOGY Co Ltd
Original Assignee
GUANGDONG DINGCAN 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 GUANGDONG DINGCAN TECHNOLOGY Co Ltd filed Critical GUANGDONG DINGCAN TECHNOLOGY Co Ltd
Priority to CN201310556984.7A priority Critical patent/CN103678035A/en
Publication of CN103678035A publication Critical patent/CN103678035A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method for recovering a dynamic backup of an environmental variable in an embedded device. The embedded device comprises a key, an MTD layer interface, a microprocessor and a storage module, a bootloader module, an operating system and a kernel of the operating system are stored in the storage module, and a FLASH idle storage sector where the current environmental variable is written is arranged in the bootloader module. According to the method, a method that a system is recovered by an automatic backup through software is adopted, and development persons can conveniently modify and debug the environmental variable in practical application.

Description

A kind of method that in embedded device, environmental variance dynamic backup recovers
Technical field
The present invention relates to embedded device field, relate in particular to a kind of method that in embedded device, environmental variance dynamic backup recovers.
Background technology
Embedded Linux System application in the exploitation of current electronic product is very extensive, and bootloader in its start-up course is essential.A channel of the communication between bootloader and linux system and coordination is exactly the environmental variance in bootloader.Environmental variance plays a part very important, once environmental variance due to our improperly-configured, or storage lost efficacy etc., tended to cause whole system not start, this situation is often perplexing Embedded Linux System developer, therefore need to make improvement.
Summary of the invention
Technical matters to be solved by this invention is: a kind of method and control method of environmental variance dynamic backup recovery system are provided, and very convenient developer is to the modification of environmental variance and debugging in actual applications.
For solving the problems of the technologies described above, the present invention proposes a kind of method that in embedded device, environmental variance dynamic backup recovers, described embedded device comprises button, MTD layer interface, microprocessor and memory module, stores the kernel of bootloader module, operating system and operating system in described memory module; In described bootloader module, be provided with one for writing the idle memory sector of FLASH of current environment variable; Said method comprising the steps of:
When steps A, start, described microprocessor reads current environment variable by calling MTD layer interface, and this current environment variable is write to the idle memory sector of described FLASH;
In step B, operating system, check the current environment variable that writes the idle memory sector of described FLASH and modify, increase a preorder effective environment address of variable pointer, point to described FLASH free time memory sector;
Step C, described microprocessor detect and judge whether the key-press input of having an agreement;
If so, enter step D after reading the last effective environment variable;
If not, enter step D after reading conventional environmental variance;
Step D, the startup of described microprocessor enter operating system;
It is the last environmental variance that step e, described bootloader module are preserved current environment variable, and current environment variable and backup environment variable are recovered;
Step F, end.
Further, described embedded device also comprises and being connected with microprocessor for waiting for that time delay detects the function Macintosh of agreement key-press input; Before microprocessor detects the key-press input of whether having an agreement in described step C, by function Macintosh, agreement key-press input is waited for to time delay detects.
Further, described operating system adopts embedded Linux operating system.
Technique scheme at least has following beneficial effect: the present invention adopts the method for software automated back-up recovery system, and very convenient developer is to the modification of environmental variance and debugging in actual applications.
Accompanying drawing explanation
Fig. 1 is the theory diagram of the method that in embedded device of the present invention, environmental variance dynamic backup recovers.
Fig. 2 is the FLASH zoned format schematic diagram in the method that in embedded device of the present invention, environmental variance dynamic backup recovers.
Embodiment
It should be noted that, in the situation that not conflicting, embodiment and the feature in embodiment in the application can combine mutually.Below in conjunction with accompanying drawing, the present invention is described further.
Embedded device in the method that in the embedded device of the embodiment of the present invention, environmental variance dynamic backup recovers comprises button, MTD layer interface, microprocessor and memory module, stores the kernel of bootloader module, linux operating system and linux operating system in memory module; In bootloader module, be provided with one for writing the idle memory sector of FLASH of current environment variable.
As shown in Figure 1 and Figure 2, the method that in embedded device, environmental variance dynamic backup recovers comprises the following steps:
When steps A, start, described microprocessor reads current environment variable by calling MTD layer interface, and this current environment variable is write to the idle memory sector of described FLASH;
In step B, linux operating system, check the current environment variable that writes the idle memory sector of described FLASH and carry out, increase a preorder effective environment address of variable pointer, point to described FLASH free time memory sector;
Step C, described microprocessor detect and judge whether the key-press input of having an agreement;
If had, enter step D after reading the last effective environment variable;
If no, enter step D after reading conventional environmental variance;
Step D, the startup of described microprocessor enter linux operating system;
It is the last environmental variance that step e, described bootloader module are preserved current environment variable, and current environment variable and backup environment variable are recovered;
Step F, end.
As another kind of embodiment, embedded device also comprises and being connected with microprocessor for waiting for that time delay detects the function Macintosh of agreement key-press input; Before microprocessor detects the key-press input of whether having an agreement in above-mentioned steps C, by function Macintosh, agreement key-press input is waited for to time delay detects.
The above is the specific embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications are also considered as protection scope of the present invention.

Claims (3)

1. the method that in an embedded device, environmental variance dynamic backup recovers, described embedded device comprises button, MTD layer interface, microprocessor and memory module, stores the kernel of bootloader module, operating system and operating system in described memory module; It is characterized in that: in described bootloader module, be provided with one for writing the idle memory sector of FLASH of current environment variable; Said method comprising the steps of:
When steps A, start, described microprocessor reads current environment variable by calling MTD layer interface, and this current environment variable is write to the idle memory sector of described FLASH;
In step B, operating system, check the current environment variable that writes the idle memory sector of described FLASH and modify, increase a preorder effective environment address of variable pointer, point to described FLASH free time memory sector;
Step C, described microprocessor detect and judge whether the key-press input of having an agreement;
If so, enter step D after reading the last effective environment variable;
If not, enter step D after reading conventional environmental variance;
Step D, the startup of described microprocessor enter operating system;
It is the last environmental variance that step e, described bootloader module are preserved current environment variable, and current environment variable and backup environment variable are recovered;
Step F, end.
2. the method that in embedded device as claimed in claim 1, environmental variance dynamic backup recovers, is characterized in that, described embedded device also comprises and being connected with microprocessor for waiting for that time delay detects the function Macintosh of agreement key-press input; Before microprocessor detects the key-press input of whether having an agreement in described step C, by function Macintosh, agreement key-press input is waited for to time delay detects.
3. the method that in embedded device as claimed in claim 1, environmental variance dynamic backup recovers, is characterized in that, described operating system adopts embedded Linux operating system.
CN201310556984.7A 2013-11-11 2013-11-11 Method for recovering dynamic backup of environmental variable in embedded device Pending CN103678035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310556984.7A CN103678035A (en) 2013-11-11 2013-11-11 Method for recovering dynamic backup of environmental variable in embedded device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310556984.7A CN103678035A (en) 2013-11-11 2013-11-11 Method for recovering dynamic backup of environmental variable in embedded device

Publications (1)

Publication Number Publication Date
CN103678035A true CN103678035A (en) 2014-03-26

Family

ID=50315680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310556984.7A Pending CN103678035A (en) 2013-11-11 2013-11-11 Method for recovering dynamic backup of environmental variable in embedded device

Country Status (1)

Country Link
CN (1) CN103678035A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817607A (en) * 2020-12-31 2021-05-18 广州芯德通信科技股份有限公司 Realization method for accelerating production speed of optical transceiver

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104395A1 (en) * 2006-10-30 2008-05-01 Dai David Z System and method for enhancing environment variable and process option invocation
CN101727369A (en) * 2008-10-15 2010-06-09 英业达股份有限公司 Method for automatically verifying environment variable settings
CN101753360A (en) * 2009-12-16 2010-06-23 中兴通讯股份有限公司 Method applying system start-up, parallel management system and application management system
US20110060897A1 (en) * 2009-09-08 2011-03-10 Apple Inc. Device bootup from a nand-type non-volatile memory
CN102063319A (en) * 2010-12-30 2011-05-18 汉柏科技有限公司 Software updating method
CN102298545A (en) * 2011-08-23 2011-12-28 晨星软件研发(深圳)有限公司 System startup boot processing method and device
CN102708001A (en) * 2012-04-26 2012-10-03 深圳市九思泰达技术有限公司 Linux embedded equipment and switching method between user mode and engineering mode
CN102722394A (en) * 2012-06-08 2012-10-10 深圳路迪网络有限公司 Start upgrading method of embedded equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104395A1 (en) * 2006-10-30 2008-05-01 Dai David Z System and method for enhancing environment variable and process option invocation
CN101727369A (en) * 2008-10-15 2010-06-09 英业达股份有限公司 Method for automatically verifying environment variable settings
US20110060897A1 (en) * 2009-09-08 2011-03-10 Apple Inc. Device bootup from a nand-type non-volatile memory
CN101753360A (en) * 2009-12-16 2010-06-23 中兴通讯股份有限公司 Method applying system start-up, parallel management system and application management system
CN102063319A (en) * 2010-12-30 2011-05-18 汉柏科技有限公司 Software updating method
CN102298545A (en) * 2011-08-23 2011-12-28 晨星软件研发(深圳)有限公司 System startup boot processing method and device
CN102708001A (en) * 2012-04-26 2012-10-03 深圳市九思泰达技术有限公司 Linux embedded equipment and switching method between user mode and engineering mode
CN102722394A (en) * 2012-06-08 2012-10-10 深圳路迪网络有限公司 Start upgrading method of embedded equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817607A (en) * 2020-12-31 2021-05-18 广州芯德通信科技股份有限公司 Realization method for accelerating production speed of optical transceiver

Similar Documents

Publication Publication Date Title
CN102207881B (en) Quick operation system start-up method based on Android
CN102455950A (en) Firmware recovery system and method of base board management controller
EP2399193A1 (en) Concurrent execution of a smartphone operating system and a desktop operating system
CN102708001B (en) The method that Linux embedded device and user model thereof and engineering mode switch
CN104794014A (en) System operation method and intelligent terminal
CN103823769A (en) Computer system and data recovery method thereof
TW201531844A (en) Operating system recovery method, apparatus and terminal device
CN105874428A (en) Technologies for operating system transitions in multiple-operating-system environments
CN104765631B (en) A kind of application recovery method and device of mobile terminal
CN1936853A (en) Data cut-off protection and repairing method of inlaid apparatus
CN105117239A (en) Operating system reboot method and apparatus
WO2015117356A1 (en) Start-up method and communication terminal
CN103678035A (en) Method for recovering dynamic backup of environmental variable in embedded device
TW201248392A (en) System and method for recovering data of a NVRAM
CN102243587A (en) Method for upgrading read only memory (ROM) program in embedded system
TW201546612A (en) Resuming a system using state information
CN105893221B (en) The alarm method and device of terminal operating duration
CN105549985A (en) Method and system for enhancing reliability of Linux application system
CN104793699A (en) Development board card
US20140115378A1 (en) System and method for restoring network configuration parameters
CN102279755A (en) Embedded device and updating method of embedded software thereof
US20170147450A1 (en) Information processing device, information processing method, and program recording medium
CN103365747B (en) A kind of method of EMBEDDED AVIONICS configuration automatic reduction and configuration automatic reduction system
CN104657229A (en) Multi-core processor rollback recovering system and method based on high-availability hardware checking point
CN104461659A (en) High-reliability computer starting method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140326