linuxembeddedarmbootloader

Why do we need a bootloader in an embedded device?


I'm working with ELinux kernel on ARM cortex-A8.

I know how the bootloader works and what job it's doing. But i've got a question - why do we need bootloader, why was the bootloader born?

Why we can't directly load the kernel into RAM from flash memory without bootloader? If we load it what will happen? In fact, processor will not support it, but why are we following the procedure?


Solution

  • A boot loader is a computer program that loads the main operating system or runtime environment for the computer after completion of the self-tests.

    ^ From Wikipedia Article

    So basically bootloader is doing just what you wanted - copying data from flash into operating memory. It's really that simple.

    If you want to know more about boostrapping the OS, I highly recommend you read the linked article. Boot phase consists, apart from tests, also of checking peripherals and some other things. Skipping them makes sense only on very simple embedded devices, and that's why their bootloaders are even simpler:

    Some embedded systems do not require a noticeable boot sequence to begin functioning and when turned on may simply run operational programs that are stored in ROM.

    The same source