The Bootloader is a piece of software that is executed every time the hardware device is powered up. It is executable machine code and thus ARCH-specific. It's quite heavily device-specific because its main task is to initialize all the low-level hardware details. The bootloader can be contained on a separate EEPROM (very seldom) or directly on flash storage (most common).
Being a piece of software, the bootloader is considered part of the firmware, but the bootloader is not part of OpenWrt!
Only on seldom occasions a change of the bootloader settings or the bootloader code is necessary to allow for booting/installing OpenWrt
There are a number of bootloaders under diverse software licenses
The bootloader's main function is to initialize the hardware, pass an abstraction of the initialized hardware, a hardware description, to and execute the Kernel. (A very nice technical example can be seen here.) After that the bootloader is done and not needed in memory any longer. Most bootloaders offer additional functions.
It's not. A bootloader is not required to boot Linux. The use of one (or several) bootloaders in a row to chainload (or bootstrap) a Kernel is not a categorical necessity, it is merely a very crafty method to start an operating system. The main advantage for OpenWrt is, that the existence of a bootloader offers users and developers additional possibilities to debrick a device.
Some bootloader or implementation of universal bootloaders come with certain limitation implemented by the OEM, such as:
The reasons are variable, from simple ineptitude of the creators to the willful sabotage of the users' attempts to run free software on their own property.
The bootloader can be more or less sophisticated, and offer none to many additional functions. In many situations additional functions would give the user a huge advantage, so most bootloaders offer them, such as:
kmod-fs-ext4to read/write to a EXT3 filesystem, so a bootloader requires such a module to do the same. GRUB2 has this functionality implemented, so with it, you can very comfortably configure your boot options and also update and maintain your OS. The lightweight bootloaders we use with OpenWrt, usually do not have this functionality. But see Flash Layout for further reference. One exception is the U-Boot implementation of the dockstar. It can not only initialize the USB (like all the rest of the hardware) but additionally utilize the USB and also understand the EXT2 filesystem. Thus, the dockstar can be booted directly from an ext2-formated harddisc/usb-stick connected to any of it's USB-ports.
→ boot process should give a more detailed description of whole boot procedure. The bootloader is the beginning.
| Please use