Day 3 — Linux Boot Process¶
Goal¶
Understand the boot process of an embedded Linux system.
Linux Boot Flow¶
Boot Components¶
Boot ROM¶
Code stored inside the SoC.
Responsibilities:
- Locate boot device
- Load bootloader
Bootloader¶
Example:
U-Boot
Responsibilities:
- Initialize hardware
- Load kernel
- Load device tree
- Start kernel
Kernel¶
Responsibilities:
- Initialize memory
- Start scheduler
- Load drivers
Device Tree¶
Describes hardware configuration of the board.
Examples:
- UART
- SPI
- GPIO
- interrupts
Root Filesystem¶
Provides the user-space environment.
Contains:
- /bin
- /etc
- /usr
- /lib
init¶
First user-space process started by the kernel.
Example:
systemd
Lab¶
Kernel version¶
Kernel command line¶
Output:
reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory numa_policy=interleave nvme.max_host_mem_size_mb=0 numa=fake=8 system_heap.max_order=0 iommu_dma_numa_policy=interleave smsc95xx.macaddr=88:A2:9E:BF:5C:4C vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 console=ttyAMA10,115200 console=tty1 root=PARTUUID=be722d08-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=TW