Barebox

I will complete this chapter with a look at another bootloader that has the same roots as U-Boot but takes a new approach to bootloaders. It is derived from U-Boot and was actually called U-Boot v2 in the early days. The Barebox developers aimed to combine the best parts of U-Boot and Linux, including a POSIX-like API and mountable filesystems.

The Barebox project website is www.barebox.org and the developer mailing list is .

To get Barebox, clone the git repository and check out the version you want to use:

The layout of the code is similar to U-Boot:

Barebox has used kconfig/kbuild for a long time. There are default configuration files in arch/[architecture]/configs. As an example, assume that you want to build Barebox for the BeagleBoard C4. You need two configurations, one for the SPL, and one for the main binary. Firstly, build MLO:

The result is the secondary program loader, MLO.

Next, build Barebox:

Copy both to an SD card:

Then, boot up the board and you should see messages like these on the console:

Barebox is continuing to evolve. At the time of writing, it lacks the breadth of hardware support that U-Boot has, but it is worth considering for new projects.