Guo Xiaoxing
Weibo: Guo Xiaoxing's Sina Weibo
Email:[email protected]
Blog: http://blog.csdn.net/allenwells
Github:https://github.com/allenwells
One system power up and boot ROM
NOR Flash as the boot ROM system boot process
- Nor flash at the beginning of the startup code, the program from nor Flash started.
- Configure the EMI registers to set the address and access rules for each memory.
- Configure the Power management module. Power up each module.
- The boot code copies the official running code in nor flash into memory. To improve operational efficiency.
- Set the PC pointer to a fixed address in nor flash.
- Set the address map to map to memory RAM space with 0 addresses.
- Set the PC pointer to the initialization code in RAM. Start running the code.
NAND Flash as the boot ROM system startup process
- Power on the initial. The DMA default setting moves the data stored in the first page of NAND flash into internal RAM, and then sets the address of the PC to the beginning of the internal RAM. Start running the code.
- Set the interrupt vector and hardware configuration in the startup code.
- Move the running code to an external SDRAM or DDR=RAM, leaving the location of the startup code.
- Move the boot code to the first address in the SDRAM or Ddr-ram.
- Set the remap. Maps the 0 address to the SDRAM or Ddr-ram first address again.
- Set the PC pointer and start running the official run code.
Two bootloader boot three Linux kernel boot
Non-compressed kernel: Image
Compression cores: Zimage
- Kernel initialization
- Device initialization
- Boot the kernel
- Mount File System
- Start the user space process
Four Init initialization system services
- Initializing the log system
- Parse the/init.rc and/init.%hardware%.rc files, run the Early-init, and run the parsed init, early-boot, boot, and execute property actions.
- For device initialization, property server initializes and opens the property service.
- Enter the wireless loop to wait for property settings or child process exit events.
Linux system startup Process analysis