BOOT program storing method and device and BOOT program starting method and device
A program and memory technology, applied in the field of BOOT program storage, can solve the problems of limited BOOT program functions and small NORFlash memory capacity, and achieve the effects of improving user experience, increasing production costs, and reducing storage space.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] Such as figure 2 As shown, the embodiment of the present invention provides a method for storing a BOOT program. The execution subject of each step of the method may be a device for storing the BOOT program in an electronic device. For example, the device may be a computer device , can also be a hardware module or a function module in a computer device. The storage methods include:
[0039]Step S101, compiling the source code of the BOOT program into a binary BOOT program.
[0040] The source code of the BOOT program is generally directly written by the software developer, and the software developer can use C / C++, BASIC, JAVA, assembly language, etc. to write the BOOT program. Of course, this embodiment is not limited to these programming languages.
[0041] The method for compiling the source code into binary may adopt the compiling scheme in the prior art, which will not be described in detail here. The compiled binary BOOT program is recorded as out.bin.
[0042...
Embodiment 2
[0143] Such as Figure 5 As shown, the method for starting a BOOT program provided by the embodiment of the present invention corresponds to the storage method for the BOOT program described in the scheme A in Embodiment 1, specifically:
[0144] S51 . Copy the decompression program and the start.s program in the NORFlash memory and the compressed BOOT program added as the decompression object into the memory.
[0145] That is to say, all the programs in the binary boot file are copied to the memory. For example, the decompression program is the GUNZIP decompression program.
[0146] S52. Execute the start.s program in the memory to complete the initial configuration of the electronic device, specifically including the completion of the initial configuration of the CPU and the memory.
[0147] S53. Execute the decompression program added with the compressed BOOT program in the memory, decompress the compressed BOOT program in the form of an array into the memory, and obtain ...
Embodiment 3
[0150] Such as Figure 6 As shown, another booting method of the BOOT program provided by the embodiment of the present invention corresponds to the storage method of the BOOT program described in Scheme B in Embodiment 1, and the binary data stored in the NORFlash memory of the electronic device is stored according to the storage method. The boot file includes a compressed BOOT program and a binary file, wherein the binary file is a file compiled by the decompression program and the startup assembler, and the address of the decompression object of the decompression program is a specified address of the memory.
[0151] The starting method of the BOOT program is specifically:
[0152] S61. Copy the binary file compiled together by the decompression program in the NORFlash memory and the start.s program into the memory.
[0153] For example, the decompression program is the GUNZIP decompression program.
[0154] S62. Execute the start.s program in the memory to complete the i...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 