Embedded Linux system startup process

Bootloader is the code that is initially loaded and run after the system is powered on. It provides the initialization code that is initially executed after the processor is powered on and reset.

The main components of a computer system

(1) A computer system is a system that is run by the CPU as the core. Typical computer systems are: PCs (desktops, notebooks), embedded devices (mobile phones, tablet computers, game consoles), single-chip computers (household appliances like rice cookers, air conditioners).

(2) There are many components of a computer system, and the components of different computer systems are also different. But the main core components that all computer systems need to run are 3 things: CPU + external memory ( flash/ hard disk) + internal memory ( DDR SDRAM/SDRAM/SRAM ).

 

Second, the start-up process of the PC

(1) Typical PC deployment: The BIOS program is deployed on the PC motherboard (prefabricated when the motherboard leaves the factory), the operating system is deployed on the hard disk, the memory has no effect when the power is off, and the CPU does not work when the power is off.

(2) Startup process: After the PC is powered on, first execute the BIOS program (in fact , the PC 's BIOS is NorFlash ), the BIOS program is responsible for initializing the DDR memory and initializing the hard disk, and then reads the OS image from the hard disk into the DDR , and then Jump to the DDR to execute the OS until booting ( the BIOS will have no effect after the OS boots).

 

Third, the typical embedded Linux system startup process

( 1 ) The deployment and startup of the embedded system refer to the PC , but there are some differences in the equipment.

( 2 ) Deployment of embedded system: uboot program is deployed on Flash (Flash that can be used as a boot device ) , OS is deployed on Flash ( Flash replaces hard disk in embedded system), memory is useless in case of power failure, CPU Does not work when powered down.

( 3 ) Startup process: After the embedded system is powered on, uboot is executed first , then uboot is responsible for initializing the DDR , initializing the Flash , and then reading the OS from the Flash into the DDR , and then starting the OS ( uboot has no effect after the OS is started ) .


The boot process of embedded system and PC is almost the same, except that BIOS becomes uboot and hard disk becomes Flash .

 

3. Android system startup process

(1) The startup of the android system is almost the same as that of the Linux system, except that it is different after the root file system is loaded after the kernel is started.

(2) It can be considered that the startup process is divided into two stages: the first stage is from uboot to OS startup; the second stage is to load the rootfs into the command line after the OS starts.



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324588850&siteId=291194637