Contribution: This work is part of my master thesis work at NXP Semiconductors. I also
thank Catalin Marinas from ARM for reviewing and acknowledging this article.
Booting ARM Linux SMP on MPCore
It is important to understand what happens from the time the power button is switched on
until the popup of the command shell environment with all the 4 CPU cores running. The
boot process of an embedded Linux kernel differs from the PC environment, typically because
the environment setting and the available hardware change from one platform to another. For
example, an embedded system doesn’t have a hard disk or a PC BIOS, but include a boot
monitor and flash memories. So basically, the main difference between each architecture’s
boot process is in the application used to find and load the kernel. Once the kernel is in the
memory, the same sequence of events occurs for all the CPU architectures, with some
overloaded functionalities specific to each of them.
The Linux boot process can be represented in 3 stages as shown in Figure 1:
Figure 1 Linux boot process
When we press the system power on, a Boot Monitor code executes from a predefined address
location from the NOR flash memory (0x00000000). The Boot Monitor initializes the
PB11MPCore hardware peripherals’, and then launches the real bootloader U-Boot in case an
automatic script is provided; else the user runs U-Boot manually by entering the appropriate
command in the Boot Monitor command shell. U-Boot initializes the main memory and
copies the compressed Linux kernel image (uImage), which is located either on the on-board
NOR flash memory, MMC, CompactFlash or on a host PC, to the main memory to be
executed by the ARM11 MPCore, after passing some initialization parameters to the kernel.
Then the Linux kernel image decompresses itself, starts initializing its data structures, creates
some user processes, boots all the CPU cores and finally runs the command shell environment
in the user-space.
This was a brief introduction to the whole boot process. In the next sections, we will explain
each stage in details and highlight the Linux source code that is executing the corresponding
stage.
评论0