CN102520778A - One-key reset method suitable for embedded Linux operating system - Google Patents

One-key reset method suitable for embedded Linux operating system Download PDF

Info

Publication number
CN102520778A
CN102520778A CN201110409135XA CN201110409135A CN102520778A CN 102520778 A CN102520778 A CN 102520778A CN 201110409135X A CN201110409135X A CN 201110409135XA CN 201110409135 A CN201110409135 A CN 201110409135A CN 102520778 A CN102520778 A CN 102520778A
Authority
CN
China
Prior art keywords
file
sdram
primary processor
nand flash
module
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
CN201110409135XA
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.)
Shandong University
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CN201110409135XA priority Critical patent/CN102520778A/en
Publication of CN102520778A publication Critical patent/CN102520778A/en
Pending legal-status Critical Current

Links

Images

Abstract

A one-key reset method suitable for an embedded Linux operating system belongs to the technical field of an embedded system. The one-key reset method of the embedded operating system is constructed by C programming language and assembly language. A user starts the one-key reset of the system by a one-key reset button, and an operating system to be reset is stored in a common SD (Secure Digital) card. When the reset button is pressed, a main processor is triggered to start the level switching of a control module, and the starting mode of the main processor is changed to be in a one-key reset mode. When the reset is finished, a main processor module sends a signal to a reset module, the starting mode is changed to be a normal starting mode, the main processor module is reset, and the system is in login. The system adopts a modular design, a peripheral singlechip is additionally arranged and is taken as a coprocessor module to control the reset of the main processor and change the starting mode of the main processor. By the communication between a GPIO (General Purpose Input/Output) port and the main processor, the one-key reset method is suitable for the embedded main processors with different structures and solves the problem that a common embedded system needs to be connected with an upper computer to be reset.

Description

A kind of system's one key method of reducing that is applicable to built-in Linux operating system
Technical field
The present invention relates to a kind of system's one key method of reducing that is applicable to built-in Linux operating system, belong to the embedded system technology field.
Background technology
Along with the continuous development of infotech, numerous handheld devices has become popular equipment for surfing the net because of its low-power consumption and portable.Therefore, the embedded OS that is applied on the various handheld devices also enters in the popular visual field gradually.Linux is that a class UNIX kernel is the operating system of core support multi-user, multitask, multithreading, many CPU with the network, is one of the most great-hearted operating system at present.In addition, linux system is revised cutting a little, is used in the embedded system, and very big application prospect is arranged.
Mostly traditional embedded system is disposable system, and needing to connect host computer could the completion system repair and upgrading, can't independently carry out the intelligence reduction.Therefore, the native system method of reducing has designed the method for a kind of SD of utilization card to the reduction of embedded device operating system one key.The user will want to repair or the system that upgrades copies the SD card to, press the reduction button after, system will recover voluntarily, and recover to accomplish the back new system of entering.
Summary of the invention
For defective and the deficiency that overcomes prior art,, the invention provides a kind of system's one key method of reducing that is applicable to built-in Linux operating system to solve the problem that system can't independently carry out the intelligence reduction in the existing embedded device on the market.
Technical scheme of the present invention adopts following mode to realize.
A kind of system's one key method of reducing that is applicable to built-in Linux operating system; System's one one-key restoration device comprises DC power supplier, switch control module, main processor modules, primary processor start-up control module, primary processor reseting module, co-processor module, SD card module and Nand Flash module, and DC power supplier is supplied power to total system; Switch control module is connected with co-processor module; Co-processor module is connected with the primary processor reseting module with primary processor start-up control module respectively through universal I/O port; Main processor modules is connected with Nand Flash module with the SD card module respectively; In the main processor modules, it is the S3C6410 of kernel that primary processor adopts with ARM11, the SDRAM of the external 128M of primary processor; In the Co-processor Module, the single-chip microcomputer of coprocessor for having programmable functions based on 8051 nuclears; The primary processor reseting module adopts the chip MAX811 that resets; In the switch control module, switch is a keyswitch.
In system's one key method of reducing, coprocessor is responsible for switching between normal startup mode (starting from Nand Flash) and the key reduction-mode (from the SD card start-up) at primary processor; The programming of one key reduction code comprises guidance code and complete start-up code at the ad-hoc location of SD card; One key reduction code is responsible for deleting the old system file on the Flash, and the new system file of programming again, and new system file leaves in the SD card.
System's one key method of reducing is following:
1) system's one one-key restoration device powers on;
2) coprocessor initialization;
3) primary processor starts, and judges system start-up control signal wire level, if be high, turn to next step, otherwise turns to step 10);
4) set key reduction code; One key reduction code is made up of the guidance code bootloader1 abbreviation BL1 of 8K and the complete start-up code bootloader2 abbreviation BL2 of 256K; One key reduction code is read in the SDRAM the main processor modules from the SD card, and jump to execution one key reduction code among the SDRAM;
5) the primary processor initialization begins, and comprising:
A) configuration primary processor correlation parameter;
B) SDRAM in the configuration main processor modules;
C) the SD card in the configuration SD card module;
D) initialization Nand Flash module;
6) wipe old system file among the Nand Flash, comprise bootloader file, linux kernel file, yaffs2 file;
7) from the SD card, read new bootloader file, linux kernel file, yaffs2 file respectively to SDRAM, and be copied among the Nand Flash, copy sends a signal to coprocessor after accomplishing, and key reduction code is carried out and finished;
8) the coprocessor control primary processor resets;
9) primary processor restarts, and judges system start-up control signal wire level, if be low, turns to next step, otherwise returns step 4);
10) the new system after the entering reduction;
11) finish.
Step 2) the initialized step of coprocessor is following in:
A) beginning;
B) initialization coprocessor I/O mouth;
C) interrupt vector table is set;
D) open external interrupt 0;
E) detect key reduction button and whether press, if, turn to next step, otherwise, wait for;
F) opening timing device is provided with system start-up control signal wire level for high, the primary processor that resets, beginning system reducing;
G) the coprocessor initialization finishes.
At first start coprocessor after system powers on, judge whether that by the external interrupt of coprocessor key reduction button is pressed.After primary processor starts, when key reduction button is pressed, system start-up control signal wire level is changed to height, the primary processor start-up mode is set to the card start-up from SD, the primary processor that resets, and system reducing begins.
In the step 4) key reduction code is read in the SDRAM the main processor modules from the SD card, and it is following to jump to the concrete steps of carrying out key reduction code among the SDRAM:
A) beginning;
B) read BL1, BL1 is stored in 16 sectors that begin in last 18 sectors of SD card;
C) BL1 is copied among the built-in 8K SRAM of primary processor, SteppingStone just, and the start address that jumps to SteppingStone is carried out BL1;
D) BL1 initialization CPU, GPIO mouth, cpu clock frequency, internal memory control register and UART and Nand Flash, and shield all interruptions;
E) BL1 begins to read the complete start-up code BL2 of 256K from the 19th last sector of SD card, and BL2 is copied among the initial SDRAM of BL2_BASE, and BL2_BASE is defined as 0x57E00000, is exactly last 2M among the SDRAM of 128M;
F) BL1 is finished, and jumps to the BL2_BASE place, the start-up code BL2 of complete.
System reducing begins, system can at first load support from a key code of SD card start-up to SDRAM.The system start-up code comprises guidance code and complete start-up code two parts, the guidance code BL1 initialization CPU of 8K and some core devices, and be responsible for copy BL2 in Nand Flash; The complete start-up code BL2 of 256K is mainly used in from SD card start-up system, and execution in step 5)-system action command of step 7).Can at first jump to the start address of SDRAM behind the start-up code loaded, operation guidance code BL1, BL1 mainly is responsible for initialization CPU and some core devices, and shields all interruptions.After initialization finished, BL1 read complete start-up code BL2 from the SD card, and jumped to the initialization that continues all the other system hardwares among the BL2, and continued to carry out the system command of key reduction.
The concrete steps of wiping the old system file among the Nand Flash in the step 6) are following:
A) beginning;
B) begin to wipe full wafer Nand Flash from zero-address;
C) do you judge that bad piece is arranged in the bad block table? If have, skip bad piece, otherwise continue to carry out;
D) wipe and finish.
The system file that leaves on the Nand Flash comprises: bootloader file, linux kernel file, yaffs2 file; When these files go wrong when causing system to start; Wipe the content on the entire flash, write new system file again, thereby accomplish system reducing.When wiping Nand Flash, can by piece (1=16k) wipe, at first read the bad block table of this piece, if this piece is marked as bad piece, then skip this piece, continue to wipe next piece.
From the SD card, read new bootloader file, linux kernel file, yaffs2 file in the step 7) respectively to SDRAM, and be copied among the Nand Flash, the concrete steps that send a signal to coprocessor after copy is accomplished are following:
A) beginning;
B) search the bootloader file from the SD card of FAT32 form;
C) judge whether to find file? If turn to next step, otherwise output error message turns to step g);
D) file is write 0x50008000 position among the SDRAM;
E) this file is copied to Nand Flash from SDRAM, write the bootloader that defines in the linux kernel and deposit subregion " Bootloader ": 0x000000-0x100000 at Nand Flash;
F) bootloader writes completion;
G) SD from the FAT32 form searches the linux kernel file;
H) judge whether to find file? If turn to next step, otherwise output error message turns to step l);
I) file is write 0x50008000 position among the SDRAM;
J) this file is copied to Nand Flash from SDRAM, write the linux kernel file that defines in the linux kernel and deposit subregion " Kernel ": 0x100000-0x600000 at Nand Flash;
K) the linux kernel file writes completion;
L) search the yaffs2 file from the SD card of FAT32 form;
M) judge whether to find file? If turn to next step, otherwise output error message turns to step q);
N) file is write 0x50008000 position among the SDRAM;
O) this file is copied to Nand Flash from SDRAM, write the yaffs2 file that defines in the linux kernel and deposit subregion " File System ": 0x7e00000-0x80000000 at Nand Flash;
P) the yaffs2 file writes completion.
Q) control bit of GPM mouth in the primary processor initialization GPIO mouth;
R) the GPM5 data bit of primary processor in the GPM mouth writes low level, and time-delay 1s, and key reduction code is finished.
When our employed SD card was the FAT32 file system, we can read particular file name from this document system file write Nand Flash then in SDRAM, and the district location that writes defines in linux kernel.At first read the bootloader file, copy the bootloader subregion of Nand Flash to.The bootloader file is mainly used in from Nand Flash and starts built-in Linux operating system.Next reads the linux kernel file, copies the Kernel subregion of Nand Flash to.The linux kernel file is mainly used in operation and control system hardware, and core functions mainly comprises: storage administration, CPU and management of process, file system, equipment control and driving, network service, and initialization of system (guiding), system call etc.From the SD card, read the yaffs2 file system at last, copy the File System subregion of Nand Flash to.Mainly comprise desktop system and application software in the Yaffs2 file system, i.e. the graphical interface of user system directly seen of user.So far, all new system file programmings finish, and primary processor sends signal through GPM5 and gives coprocessor, and the notice coprocessor changes to the primary processor Starting mode from Nand Flash and starts, and the primary processor that resets.BL2 is finished to this, whole key reduction EOC.
The concrete steps that the coprocessor control primary processor resets in the step 8) are following:
A) beginning;
Whether b) coprocessor detects primary processor GPM5 mouth has low level to transmit, if turn to next step, otherwise wait for;
C) the system start-up control signal wire is set is low level to coprocessor, and the primary processor Starting mode is set to the start-up mode from NandFlash, and primary processor resets.
Coprocessor detects the GPM5 mouth through the I/O mouth, and when receiving the signal that GPM5 transmits, the primary processor Starting mode is set to start from Nand Flash, and the primary processor that resets.
Get into the new system after reducing in the step 10) recited above, concrete steps are following:
A) beginning;
B) the Bootloader subregion from Nand Flash loads the bootloader file to SDRAM, and jumps to the SDRAM execution;
C) the Kernel subregion from Nand Flash loads the linux kernel file to SDRAM, jumps to and guides kernel mirror image among the SDRAM;
D) the File System subregion from Nand Flash loads the yaffs2 file;
E) new system start-up gets into the startup picture.
After primary processor resets; Judge system start-up control signal wire level; If be low, primary processor starts from Nand Flash, loads bootloader file, kernel mirror image file and yaffs2 file system files respectively; Get into the built-in Linux operating system after reducing, the total system reduction is accomplished.
The main flow process of system's one key reduction is that the coprocessor control primary processor gets into SD card start-up pattern; Primary processor reads and carries out key reduction code from the SD card; Wipe old system file; The system file that programming is new, coprocessor control primary processor return Nand Flash start-up mode, restarting systems.This flow process at first starts co-processor module, and coprocessor is responsible for judging pressing of key reduction button that if press, it is high level that the system start-up control signal wire is set, and the primary processor that resets.Primary processor is judged the system start-up control signal wire; If be high; Read and carry out key reduction code from the SD card; One key reduction code is responsible for from the SD card, reading respectively bootloader file, kernel mirror image file and yaffs2 file, and the difference programming is in the subregion of each comfortable Nand Flash.After programming finished, primary processor was passed low level to coprocessor through the GPM5 oral instructions, and coprocessor detects low level, and it is low that system start-up control signal wire level is set, and the primary processor that resets.Primary processor is judged the start-up control signal wire, if be low, from Nand Flash, loads bootloader file, kernel mirror image file and yaffs2 file system files respectively, starts new operating system.
Technical solution of the present invention is: the present invention adopts the modularized program structure, is divided into the coprocessor control program, key reduction code.The coprocessor control program adopts the C language, depends on coprocessor and power reset circuit.One key reduction code is made up of the guidance code bootloader1 abbreviation BL1 of 8K and the complete start-up code bootloader2 abbreviation BL2 of 256K.The support of one key reduction code drives from the SD card, can support different flush bonding processor hardware configurations, only need revise its configuration file to different embedded hardware frameworks.
A kind of system one one-key restoration device; Comprise DC power supplier, switch control module, main processor modules, primary processor start-up control module, primary processor reseting module, co-processor module, SD card module and Nand Flash module, DC power supplier is supplied power to total system; Switch control module is connected with co-processor module; Co-processor module is connected with the primary processor reseting module with primary processor start-up control module respectively through universal I/O port; Main processor modules is connected with Nand Flash module with the SD card module respectively.
In the described main processor modules, it is the S3C6410 of kernel that primary processor adopts with ARM11, the SDRASM of the external 256M of primary processor.
The single-chip microcomputer of described coprocessor for having programmable functions based on 8051 nuclears.
Described processor reset module adopts the chip MAX811 that resets.
Described switch control module, switch are keyswitch.
The work functions of each parts is following in system's one one-key restoration device:
(1) co-processor module, connection processing device start-up control module, processor controls reseting module.
(2) primary processor start-up control module, the Starting mode of responsible control primary processor.
(3) the primary processor reseting module is responsible for the primary processor that resets.
Through above-mentioned functions combination, coprocessor is controlled the start-up mode of primary processor through control system start-up control signal wire, through the control primary processor reseting module primary processor that resets.Primary processor from the SD card start-up, is wiped the old system file (bootloader file, kernel mirror image file and yaffs2 file system files) on the Flash through program setting, read new system file from the SD card, and programming is to the corresponding subregion of Flash; After programming finished, primary processor sent the signal that programming is accomplished through the GPM mouth to coprocessor.Coprocessor receives signal, and change system start-up control signal wire level, and the primary processor that resets make primary processor start from Flash, and load new system file, and system's one key reduction so far finishes.
The present invention has the following advantages:
The present invention is directed to built-in Linux operating system and designed a kind of system one key method of reducing.System adopts modular design, increases the peripheral hardware single-chip microcomputer as co-processor module, and the start-up mode of primary processor is changed in resetting of control primary processor, and communicates by letter with primary processor through the GPIO mouth, applicable to the embedded primary processor of different structure.The system file of required reduction leaves on the SD card, can change at any time.The intelligent degree of this key restoring system is high, simple, convenient, has solved the problem that common embedded system need connect the host computer restoring system, makes various embedded type Linux equipments convenient, practical.
Description of drawings
Fig. 1 is the process flow diagram of system of the present invention one key method of reducing.
Fig. 2 is the described step 2 of the inventive method) the middle initialized concrete steps process flow diagram of coprocessor.
Fig. 3 reads in the SDRAM the main processor modules with key reduction code from the SD card in the described step 3) of the inventive method, and jumps to the concrete steps process flow diagram of carrying out key reduction code among the SDRAM.
Fig. 4 is for wiping the concrete steps process flow diagram of the old system file among the Flash in the described step 5) of the inventive method.
Fig. 5 reads new bootloader file, linux kernel file, yaffs2 file respectively to SDRAM in the described step 6) of the inventive method from the SD card; And be copied among the Nand Flash, after accomplishing, copy sends a signal to the concrete steps process flow diagram of coprocessor.
The concrete steps process flow diagram that Fig. 6 resets for coprocessor control primary processor in the described step 7) of the inventive method.
Fig. 7 is the concrete steps process flow diagram that gets into the new system after reducing in the described step 8) of the inventive method.
Specific embodiments
Below in conjunction with accompanying drawing and embodiment the present invention is further specified, but be not limited thereto.
Embodiment 1:
A kind of system's one key method of reducing that is applicable to built-in Linux operating system; System's one one-key restoration device comprises DC power supplier, switch control module, main processor modules, primary processor start-up control module, primary processor reseting module, co-processor module, SD card module and Nand Flash module, and DC power supplier is supplied power to total system; Switch control module is connected with co-processor module; Co-processor module is connected with the primary processor reseting module with primary processor start-up control module respectively through universal I/O port; Main processor modules is connected with Nand Flash module with the SD card module respectively; In the main processor modules, it is the S3C6410 of kernel that primary processor adopts with ARM11, the SDRAM of the external 128M of primary processor; In the Co-processor Module, the single-chip microcomputer of coprocessor for having programmable functions based on 8051 nuclears; The primary processor reseting module adopts the chip MAX811 that resets; In the switch control module, switch is a keyswitch; System's one key method of reducing is following:
1) system's one one-key restoration device powers on;
2) coprocessor initialization;
3) primary processor starts, and judges system start-up control signal wire level, if be high, turn to next step, otherwise turns to step 10);
4) set key reduction code; One key reduction code is made up of the guidance code bootloader1 abbreviation BL1 of 8K and the complete start-up code bootloader2 abbreviation BL2 of 256K; One key reduction code is read in the SDRAM the main processor modules from the SD card, and jump to execution one key reduction code among the SDRAM;
5) the primary processor initialization begins, and comprising:
A) configuration primary processor correlation parameter;
B) SDRAM in the configuration main processor modules;
C) the SD card in the configuration SD card module;
D) initialization Nand Flash module;
6) wipe old system file among the Nand Flash, comprise bootloader file, linux kernel file, yaffs2 file;
7) from the SD card, read new bootloader file, linux kernel file, yaffs2 file respectively to SDRAM, and be copied among the Nand Flash, copy sends a signal to coprocessor after accomplishing, and key reduction code is carried out and finished;
8) the coprocessor control primary processor resets;
9) primary processor restarts, and judges system start-up control signal wire level, if be low, turns to next step, otherwise returns step 4);
10) the new system after the entering reduction;
11) finish.
Step 2 recited above) the initialized step of coprocessor is following in:
A) beginning;
B) initialization coprocessor I/O mouth;
C) interrupt vector table is set;
D) open external interrupt 0;
E) detect key reduction button and whether press, if, turn to next step, otherwise, wait for;
F) opening timing device is provided with system start-up control signal wire level for high, the primary processor that resets, beginning system reducing;
G) the coprocessor initialization finishes.
In the step 4) recited above key reduction code is read in the SDRAM the main processor modules from the SD card, and it is following to jump to the concrete steps of carrying out key reduction code among the SDRAM:
A) beginning;
B) read BL1, BL1 is stored in 16 sectors that begin in last 18 sectors of SD card;
C) BL1 is copied among the built-in 8K SRAM of primary processor, SteppingStone just, and the start address that jumps to SteppingStone is carried out BL1;
D) BL1 initialization CPU, GPIO mouth, cpu clock frequency, internal memory control register and UART and Nand Flash, and shield all interruptions;
E) BL1 begins to read the complete start-up code BL2 of 256K from the 19th last sector of SD card, and BL2 is copied among the initial SDRAM of BL2_BASE, and BL2_BASE is defined as 0x57E00000, is exactly last 2M among the SDRAM of 128M;
F) BL1 is finished, and jumps to the BL2_BASE place, the start-up code BL2 of complete.
The concrete steps of wiping the old system file among the Nand Flash in the step 6) recited above are following:
A) beginning;
B) begin to wipe full wafer Nand Flash from zero-address;
C) do you judge that bad piece is arranged in the bad block table? If have, skip bad piece, otherwise continue to carry out;
D) wipe and finish.
From the SD card, read new bootloader file, linux kernel file, yaffs2 file in the step 7) recited above respectively to SDRAM, and be copied among the Nand Flash, the concrete steps that send a signal to coprocessor after copy is accomplished are following:
A) beginning;
B) search the bootloader file from the SD card of FAT32 form;
C) judge whether to find file? If turn to next step, otherwise output error message turns to step g);
D) file is write 0x50008000 position among the SDRAM;
E) this file is copied to Nand Flash from SDRAM, write the bootloader that defines in the linux kernel and deposit subregion " Bootloader ": 0x000000-0x100000 at Nand Flash;
F) bootloader writes completion;
G) SD from the FAT32 form searches the linux kernel file;
H) judge whether to find file? If turn to next step, otherwise output error message turns to step l);
I) file is write 0x50008000 position among the SDRAM;
J) this file is copied to Nand Flash from SDRAM, write the linux kernel file that defines in the linux kernel and deposit subregion " Kernel ": 0x100000-0x600000 at Nand Flash;
K) the linux kernel file writes completion;
L) search the yaffs2 file from the SD card of FAT32 form;
M) judge whether to find file? If turn to next step, otherwise output error message turns to step q);
N) file is write 0x50008000 position among the SDRAM;
O) this file is copied to Nand Flash from SDRAM, write the yaffs2 file that defines in the linux kernel and deposit subregion " File System ": 0x7e00000-0x80000000 at Nand Flash;
P) the yaffs2 file writes completion.
Q) control bit of GPM mouth in the primary processor initialization GPIO mouth;
R) the GPM5 data bit of primary processor in the GPM mouth writes low level, and time-delay 1s, and key reduction code is finished;
The concrete steps that the coprocessor control primary processor resets in the step 8) recited above are following:
A) beginning;
Whether b) coprocessor detects primary processor GPM5 mouth has low level to transmit, if turn to next step, otherwise wait for;
C) the system start-up control signal wire is set is low level to coprocessor, and the primary processor Starting mode is set to the start-up mode from NandFlash, and primary processor resets.
The concrete steps that get into the new system after reducing in the step 10) recited above are following:
A) beginning;
B) the Bootloader subregion from Nand Flash loads the bootloader file to SDRAM, and jumps to the SDRAM execution;
C) the Kernel subregion from Nand Flash loads the linux kernel file to SDRAM, jumps to and guides kernel mirror image among the SDRAM;
D) the File System subregion from Nand Flash loads the yaffs2 file;
E) new system start-up gets into the startup picture.

Claims (7)

1. system's one key method of reducing that is applicable to built-in Linux operating system; System's one one-key restoration device comprises DC power supplier, switch control module, main processor modules, primary processor start-up control module, primary processor reseting module, co-processor module, SD card module and Nand Flash module, and DC power supplier is supplied power to total system; Switch control module is connected with co-processor module; Co-processor module is connected with the primary processor reseting module with primary processor start-up control module respectively through universal I/O port; Main processor modules is connected with Nand Flash module with the SD card module respectively; In the main processor modules, it is the S3C6410 of kernel that primary processor adopts with ARM11, the SDRAM of the external 128M of primary processor; In the Co-processor Module, the single-chip microcomputer of coprocessor for having programmable functions based on 8051 nuclears; The primary processor reseting module adopts the chip MAX811 that resets; In the switch control module, switch is a keyswitch; It is characterized in that system's one key method of reducing is following:
1) system's one one-key restoration device powers on;
2) coprocessor initialization;
3) primary processor starts, and judges system start-up control signal wire level, if be high, turn to next step, otherwise turns to step 10);
4) set key reduction code; One key reduction code is made up of the guidance code bootloader1 abbreviation BL1 of 8K and the complete start-up code bootloader2 abbreviation BL2 of 256K; One key reduction code is read in the SDRAM the main processor modules from the SD card, and jump to execution one key reduction code among the SDRAM;
5) the primary processor initialization begins, and comprising:
A) configuration primary processor correlation parameter;
B) SDRAM in the configuration main processor modules;
C) the SD card in the configuration SD card module;
D) initialization Nand Flash module;
6) wipe old system file among the Nand Flash, comprise bootloader file, linux kernel file, yaffs2 file;
7) from the SD card, read new bootloader file, linux kernel file, yaffs2 file respectively to SDRAM, and be copied among the Nand Flash, copy sends a signal to coprocessor after accomplishing, and key reduction code is carried out and finished;
8) the coprocessor control primary processor resets;
9) primary processor restarts, and judges system start-up control signal wire level, if be low, turns to next step, otherwise returns step 4);
10) the new system after the entering reduction;
11) finish.
2. a kind of system's one key method of reducing that is applicable to built-in Linux operating system as claimed in claim 1 is characterized in that step 2) the initialized step of described coprocessor is following:
A) beginning;
B) initialization coprocessor I/O mouth;
C) interrupt vector table is set;
D) open external interrupt 0;
E) detect key reduction button and whether press, if, turn to next step, otherwise, wait for;
F) opening timing device is provided with system start-up control signal wire level for high, the primary processor that resets, beginning system reducing;
G) the coprocessor initialization finishes.
3. a kind of system's one key method of reducing that is applicable to built-in Linux operating system as claimed in claim 1; It is characterized in that; Step 4) is described reads in the SDRAM the main processor modules with key reduction code from the SD card, and it is following to jump to the concrete steps of carrying out key reduction code among the SDRAM:
A) beginning;
B) read BL1, BL1 is stored in 16 sectors that begin in last 18 sectors of SD card;
C) BL1 is copied among the built-in 8K SRAM of primary processor, SteppingStone just, and the start address that jumps to SteppingStone is carried out BL1;
D) BL1 initialization CPU, GPIO mouth, cpu clock frequency, internal memory control register and UART and Nand Flash, and shield all interruptions;
E) BL1 begins to read the complete start-up code BL2 of 256K from the 19th last sector of SD card, and BL2 is copied among the initial SDRAM of BL2_BASE, and BL2_BASE is defined as 0x57E00000, is exactly last 2M among the SDRAM of 128M;
F) BL1 is finished, and jumps to the BL2_BASE place, the start-up code BL2 of complete.
4. a kind of system's one key method of reducing that is applicable to built-in Linux operating system as claimed in claim 1 is characterized in that, step 6) is described, and to wipe the concrete steps of the old system file among the Nand Flash following:
A) beginning;
B) begin to wipe full wafer Nand Flash from zero-address;
C) do you judge that bad piece is arranged in the bad block table? If have, skip bad piece, otherwise continue to carry out;
D) wipe and finish.
5. a kind of system's one key method of reducing that is applicable to built-in Linux operating system as claimed in claim 1; It is characterized in that; Described new bootloader file, linux kernel file, the yaffs2 file of from the SD card, reading respectively of step 7) is to SDRAM; And be copied among the Nand Flash, the concrete steps that send a signal to coprocessor after copy is accomplished are following:
A) beginning;
B) search the bootloader file from the SD card of FAT32 form;
C) judge whether to find file? If turn to next step, otherwise output error message turns to step g);
D) file is write 0x50008000 position among the SDRAM;
E) this file is copied to Nand Flash from SDRAM, write the bootloader that defines in the linux kernel and deposit subregion " Bootloader ": 0x000000-0x100000 at Nand Flash;
F) bootloader writes completion;
G) SD from the FAT32 form searches the linux kernel file;
H) judge whether to find file? If turn to next step, otherwise output error message turns to step l);
I) file is write 0x50008000 position among the SDRAM;
J) this file is copied to Nand Flash from SDRAM, write the linux kernel file that defines in the linux kernel and deposit subregion " Kernel ": 0x100000-0x600000 at Nand Flash;
K) the linux kernel file writes completion;
L) search the yaffs2 file from the SD card of FAT32 form;
M) judge whether to find file? If turn to next step, otherwise output error message turns to step q);
N) file is write 0x50008000 position among the SDRAM;
O) this file is copied to Nand Flash from SDRAM, write the yaffs2 file that defines in the linux kernel and deposit subregion " File System ": 0x7e00000-0x80000000 at Nand Flash;
P) the yaffs2 file writes completion.
Q) control bit of GPM mouth in the primary processor initialization GPIO mouth;
R) the GPM5 data bit of primary processor in the GPM mouth writes low level, and time-delay 1s, and key reduction code is finished.
6. a kind of system's one key method of reducing that is applicable to built-in Linux operating system as claimed in claim 1 is characterized in that the concrete steps that the described coprocessor control primary processor of step 8) resets are following:
A) beginning;
Whether b) coprocessor detects primary processor GPM5 mouth has low level to transmit, if turn to next step, otherwise wait for;
C) the system start-up control signal wire is set is low level to coprocessor, and the primary processor Starting mode is set to the start-up mode from NandFlash, and primary processor resets.
7. a kind of system's one key method of reducing that is applicable to built-in Linux operating system as claimed in claim 1 is characterized in that, the concrete steps that get into the new system after reducing in the described step 10) are following:
A) beginning;
B) the Bootloader subregion from Nand Flash loads the bootloader file to SDRAM, and jumps to the SDRAM execution;
C) the Kernel subregion from Nand Flash loads the linux kernel file to SDRAM, jumps to and guides kernel mirror image among the SDRAM;
D) the File System subregion from Nand Flash loads the yaffs2 file;
E) new system start-up gets into the startup picture.
CN201110409135XA 2011-12-09 2011-12-09 One-key reset method suitable for embedded Linux operating system Pending CN102520778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110409135XA CN102520778A (en) 2011-12-09 2011-12-09 One-key reset method suitable for embedded Linux operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110409135XA CN102520778A (en) 2011-12-09 2011-12-09 One-key reset method suitable for embedded Linux operating system

Publications (1)

Publication Number Publication Date
CN102520778A true CN102520778A (en) 2012-06-27

Family

ID=46291730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110409135XA Pending CN102520778A (en) 2011-12-09 2011-12-09 One-key reset method suitable for embedded Linux operating system

Country Status (1)

Country Link
CN (1) CN102520778A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929673A (en) * 2012-10-31 2013-02-13 西安诺瓦电子科技有限公司 Method for installing mirror image document of operating system of light-emitting diode (LED) display screen control device
CN104503558A (en) * 2014-12-26 2015-04-08 四川九洲电器集团有限责任公司 Resetting method of embedding type equipment and embedding type equipment
CN105468425A (en) * 2016-01-07 2016-04-06 云南民族大学 Manufacturing method of embedded Linux operating system starting SD card
WO2016062060A1 (en) * 2014-10-21 2016-04-28 中兴通讯股份有限公司 Method and apparatus for updating/backing up operating system through t card, and storage medium
CN105808292A (en) * 2016-03-07 2016-07-27 西安诺瓦电子科技有限公司 Firmware upgrade method of embedded terminal device
CN107315656A (en) * 2017-06-12 2017-11-03 杭州电子科技大学 The Embedded PLC software rejuvenation method and PLC of many kernels
CN107368389A (en) * 2017-06-26 2017-11-21 合肥美的智能科技有限公司 Control method, control device and the EMMC of operating system One-key recovery function

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553338A (en) * 2003-06-08 2004-12-08 华为技术有限公司 Starting method and system of central processing unit
CN201681381U (en) * 2010-05-06 2010-12-22 成都亿年通讯科技有限公司 Automatic recovery module of system firmware for embedded type IPPBX
CN102117330A (en) * 2011-03-04 2011-07-06 中山中珩数字科技有限公司 Method and system for protecting integrity of critical area of embedded Linux operating system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553338A (en) * 2003-06-08 2004-12-08 华为技术有限公司 Starting method and system of central processing unit
CN201681381U (en) * 2010-05-06 2010-12-22 成都亿年通讯科技有限公司 Automatic recovery module of system firmware for embedded type IPPBX
CN102117330A (en) * 2011-03-04 2011-07-06 中山中珩数字科技有限公司 Method and system for protecting integrity of critical area of embedded Linux operating system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李斌: "基于Nand Flash的UBI文件系统在Android平台上的研究与应用", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929673A (en) * 2012-10-31 2013-02-13 西安诺瓦电子科技有限公司 Method for installing mirror image document of operating system of light-emitting diode (LED) display screen control device
CN102929673B (en) * 2012-10-31 2016-04-13 西安诺瓦电子科技有限公司 The installation method of LED display screen control device operating system image file
WO2016062060A1 (en) * 2014-10-21 2016-04-28 中兴通讯股份有限公司 Method and apparatus for updating/backing up operating system through t card, and storage medium
CN105589702A (en) * 2014-10-21 2016-05-18 中兴通讯股份有限公司 Method and device for updating/backing up operating system through T card
CN104503558A (en) * 2014-12-26 2015-04-08 四川九洲电器集团有限责任公司 Resetting method of embedding type equipment and embedding type equipment
CN105468425A (en) * 2016-01-07 2016-04-06 云南民族大学 Manufacturing method of embedded Linux operating system starting SD card
CN105468425B (en) * 2016-01-07 2018-10-23 云南民族大学 The production method that a kind of built-in Linux operating system starts SD card
CN105808292A (en) * 2016-03-07 2016-07-27 西安诺瓦电子科技有限公司 Firmware upgrade method of embedded terminal device
CN107315656A (en) * 2017-06-12 2017-11-03 杭州电子科技大学 The Embedded PLC software rejuvenation method and PLC of many kernels
CN107315656B (en) * 2017-06-12 2020-10-16 杭州电子科技大学 Multi-kernel embedded PLC software recovery method and PLC
CN107368389A (en) * 2017-06-26 2017-11-21 合肥美的智能科技有限公司 Control method, control device and the EMMC of operating system One-key recovery function
CN107368389B (en) * 2017-06-26 2020-11-06 合肥美的智能科技有限公司 Control method and control device for one-key recovery function of operating system and EMMC

Similar Documents

Publication Publication Date Title
CN102520778A (en) One-key reset method suitable for embedded Linux operating system
KR100505638B1 (en) Apparatus and method for saving and restoring of working context
EP2581826A1 (en) Method and device for cold starting android mobile terminal
CN103761088A (en) Multiple operation system switching method applicable to ARM (advanced risc machine) framework mobile equipment
TW594021B (en) Main computer board on/off testing device, method and system
CN104572161B (en) A kind of UEFI firmware implementation methods based on Godson portable computer
CN103823769A (en) Computer system and data recovery method
CN107703818A (en) Wireless programming creative education intelligent controller system based on WiFi
CN111506351A (en) Deep sleep method, wake-up method and sleep and wake-up method for system on chip
CN113110859A (en) Embedded terminal remote online development system
CN103761129A (en) Method of implementing SDIO (secure digital input/output) interface drive in Boot loader layer
CN1992611B (en) Mobile computing device and method for receiving data packet thereof
CN101650647A (en) Compatibility method for EFI platform
JP2010262621A (en) Computer system with power supply control, and power supply control method
CN102308279A (en) Electronic device with overlapped boot task fetches and boot task execution
CN113867814A (en) Method and device for realizing multi-type restarting of server based on UEFI (unified extensible firmware interface)
JP2012155534A (en) Electronic device, and method and program of the same
WO2020093868A1 (en) Multi-core chip, system and method therefor, and storage medium
CN104035757A (en) MIPS-based (microprocessor without interlocked piped stages-based) U-boot (universal boot loader) transplantation implementing method
CN102495670A (en) Systematic one-key reset device applicable to embedded Linux operating system
CN102567178A (en) Electronic device and method for informing remaining electricity and starting method thereof
CN116302141B (en) Serial port switching method, chip and serial port switching system
CN102880479A (en) Method and device for remotely modifying basic input output system (BIOS) attribute parameters
CN101281416A (en) Method for ensuring system closedown completion
CN101872233B (en) Automatic on-off schedule control method and system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120627