Next Previous Contents
The Linux boot sequence is more complicated than your average embedded operating system, and there are many more options for configuring things. In general, the boot sequence goes like this:
- Processor comes out of reset and branches to the ROM startup code.
- The ROM startup code initialises the CPU and memory controller, performing only minimal initialisation of on-chip devices, such as the console serial port (typically SMC1 on 8xx devices) to provide boot diagnostic messages. It also sets up the memory map for the kernel to use in a format that is consistent across platforms, and then jumps to the boot loader.
- The boot loader decompresses the kernel into RAM, and jumps to it.
- The kernel sets up the caches, initialises each of the hardware devices via the init function in each driver, mounts the root file system and execs the
init
process, which is the ultimate parent of all user mode processes, typically /sbin/init
.
- Executing the first program linked against the shared C runtime library (often
init
) causes the shared runtime library to be loaded.
- In a typical Linux system,
init
reads /etc/inittab
to execute the appropriate run control script from /etc/rc.d
, which execute the start scripts to initialise networking and other system services.
In minimal embedded systems, init
is commonly replaced with a simple C program or shell script to start the appropriate services and/or application programs, since the conventional rc scripts are often overkill.
Next Previous Contents