Article Title: Summary of porting the uClinux kernel on ARMSYS. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Brief Introduction
Summary of "how to build a uClinux kernel port on the armSYS Development Board with b0x as the core, the content includes the Function Analysis of the Bootloader and the key content of the modifications made to the b0x Development Board based on the kernel of the uClinux2.4.24 release.
2. Bootloader
2.1 Bootloader Overview
Boot Loader is a program that runs before the operating system kernel runs. Through this program, we can initialize hardware devices and create a map of memory space to bring the system's hardware and software environment to a suitable state, in order to prepare the correct environment for the final call to the operating system kernel. Therefore, the precondition for Correctly Setting up the transplantation of uClinux is to have a suitable and easy-to-use Bootloader.
The armSYS Development Board provides such a special Bootloader for uClinux. the Bootloader program is installed at the address 0x0 of the system and runs immediately upon power-on. It can correctly initialize the hardware system and guide uClinux.
Theoretically, a kernel-independent Bootloader is not required during uClinux boot. However, the separation of Bootloader and kernel design can make the software architecture clearer, and also help to flexibly support multiple boot methods to implement some useful auxiliary functions.
The main tasks of Bootloader provided by armSYS can be summarized as follows:
1. hardware initialization;
2. download the new kernel image and file system image from the host;
3. Burn NorFlash and Nandflash;
4. Load the uClinux kernel image and start running;
5. Provides the human-machine operation interface on the serial Super Terminal.
2.2 storage space distribution
Bootloader uses the default storage space distribution address to load the uClinux kernel and file system, and properly guide the uClinux operation. In the Bootloader of armSYS, the default storage space distribution is as follows:
Content start address Storage Medium
Bootloader program space 0x00000000 Flash
Compressed kernel image 0x00010000 Flash
ROM file system image 0x000e0000 Flash
Kernel run address 0x0c008000 SDRAM
Decompress the compressed kernel at 0x0c100000 SDRAM
File System Load 0x0c700000 SDRAM
The storage space allocation method is not fixed. You can change it by modifying the relevant code in Bootloader.
2.3 Work of Bootloader
The complete Bootloader boot process can be described as follows:
Hardware initialization Phase 1
◎ Hardware initialization;
◎ Copy the second-level interrupt exception vector table;
Initialize various processor modes;
◎ Copy RO and RW and clear ZI (jump to the C code entry function ).
Hardware initialization Phase 2
Initialize the hardware devices used in this phase;
Establish man-machine interface;
◎ Tool for downloading and burning image files;
◎ Tools for loading and running image files.
Next, we will describe the above steps one by one and describe the content related to uClinux in detail.
[1] [2] [3] [4] [5] Next page