Chapter 6: Linux Initialization
The previous chapter evaluated the process of U-BOOT booting the Linux kernel. During this lifecycle, the primary tasks accomplished by U-BOOT include initializing all physical RAM banks, importing the core kernel modules into the appropriate physical memory destinations, provisioning the runtime boot argument vectors to be passed to the kernel, and resolving the active CPU type. Furthermore, if required by the target platform topology, it loads the initial RAM disk (initrd), brings up a primary serial console and display device, configures the appropriate hardware registers, and executes a definitive jump into the kernel image. For the ARM architecture, these operations constitute the fundamental baseline requirements imposed upon the U-BOOT bootstrap layer.
Upon executing the jump to the Linux kernel entry vector, the ARM processor state must strictly comply with the following hardware constraint matrix:
-
Register r0 must be initialized explicitly to 0.
-
Register r1 must store the unique logical architecture machine type identifier (CPU type index).
-
Register r2 must store the absolute physical baseline pointer address targeting the Flattened Device Tree (.dtb) blob, or the legacy boot arguments buffer (on platforms compiled without Device Tree capabilities).
-
The CPU core must operate within Supervisor (SVC) mode.
-
All asynchronous external hardware interrupts (IRQ and FIQ) must be completely disabled.
-
The Memory Management Unit (MMU) must be turned off.
-
The internal instruction cache (I-Cache) must be turned off.
-
The data cache (D-Cache) can be either turned off or left enabled depending on platform-specific pre-boot optimizations.
Once U-BOOT relinquishes absolute platform control and hands over execution to the Linux kernel, the kernel drives system initialization forward. It configures the processing CPU cores, aligns internal data caches, and provisions the low-level virtual memory management sub-blocks. Following this phase, it dynamically inserts core device driver modules, executes probe loops to initialize all integrated peripherals and IO channels, and ultimately mounts and boots the Linux root filesystem (rootfs). The subsequent chapters systematically analyze the exhaustive matrix of engineering tasks executed by the Linux kernel from the exact moment it captures system control up to the definitive launch of the first user-space process (init).
The absolute software entry point of the compiled Linux kernel is declared within the low-level assembly source module git/arch/arm/kernel/head.S. This file houses the definitive initial program sequence executed by the Linux kernel, written in raw ARM assembly language to complete all hardware-dependent and architecture-specific initializations.