Role of the boot loader

The boot loader is a piece of early initialization code and is responsible for initializing the board so that other programs can run later, mostly we run embedded linux.

So it needs to:
0. Reset, most of architecture fetch code on physical address 0x0 (or other fixed address), which is locate on flash; Enable MMU, setup L1 cache, exception vectors;
1. Initialize base hardware – CPU speed, DRAM controller, interrupts, detect ram size;
2. Initialize any devices it needs to use for reading the kernel and root images and other on board peripherals;
3. Arrange a block of contiguous physical memory for the kernel, starting at a particular address, and another for the root (ramdisk/initramfs), also contiguous, but not necessarily adjacent to that for the kernel;
4. ROM-to-RAM; Copy the kernel and initrd into RAM;
5. Call the kernel with r0=0, r1=machine architecture number with the MMU and caches turned off. (arm)

Many open-source boot loaders are available, DAS U-Boot and eCos RedBoot ROM monitor are most popular of them.


About xlcwu

Self-employed (One-man Company), Developer/Chief Designer/Consultant, Embedded Linux/NAS/Storage/Platform/Devices, Xcode/Cocos2D/Cocoa/Objective-C, at Joe’s Lab – Newland ESP (TM).
This entry was posted in Embedded and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s