Bootleader is a program that starts to execute when the system is powered on. It initializes the hardware device, prepares the software environment, and finally calls the operating system kernel.
U-boot is a general boot program suitable for multiple CPUs. Multiple operating systems can be guided to support CPUs with multiple architectures.
U-boot source code structure:
File structure:
Board: Related to the Development Board. Board corresponding to different configurations
CPU: corresponding to different CPUs. For example, there is at91rm9200 at ARM920T.
Lib_i386 is similar to a common file in a certain architecture.
Include: the general function header file and the development board configuration file. Include/config contains the development board configuration file.
Lib_generic common library functions
Conmon: A common function that further encapsulates the driver at the next layer.
Disk: hard disk interface program
Drivers: drivers for various devices.
DTT: the drive of a Digital Thermostat or sensor
FS: filesystem: File System
Nand_spl: U-boot is generally started from Rom, romflash, and other devices. Now it starts from NAND Flash,
Net: various network protocols
Post: power-on self-check program
RTC: Real-time clock driver
Doc documentation, user documentation
Examples: Some test programs can be downloaded and run using U-boot.
Tools: tools used to create an image in the S-record and U-boot formats
[... Under preparation] For the embedded part, see zisu123.sinaapp.com.
Reference: complete embedded Linux application development manual Wei Dongshan.