VOOZH about

URL: https://thenewstack.io/bootloaders-for-embedded-linux-systems/

⇱ Bootloaders for Embedded Linux Systems - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2020-10-16 12:00:09
Bootloaders for Embedded Linux Systems
contributed,sponsor-linux-foundation-training,sponsored,sponsored-post-contributed,
Linux / Software Development

Bootloaders for Embedded Linux Systems

Embedded Linux systems almost always include a bootloader; while technically it's not a part of Linux, bootloaders are key in the embedded Linux experience.
Oct 16th, 2020 12:00pm by John Bonesio
👁 Featued image for: Bootloaders for Embedded Linux Systems
Linux Foundation Training sponsored this post.
This is part of a series on using Linux for embedded systems. For a list of other articles in this series, check out the introductory post.

The Linux Foundation sponsored this post.

John Bonesio
John is a Linux Instructor at The Linux Foundation.

Embedded Linux systems almost always include a bootloader. Technically it’s not a part of Linux, but bootloaders are an essential part of the embedded Linux experience.

While it is technically possible to make an embedded system start running the Linux kernel right out of reset, this is generally not done. Embedded systems generally separate out the responsibility for performing initial start-up code and Power On Self Test (POST) from the operating system and into a separate bootloader.

When embedded systems are powered on, the CPU runs the initial code — which is a bootloader. The bootloader will initialize necessary hardware, then find the next program to run, load that program into memory, and jump into that program, executing it. At this point, the bootloader code will not be run again, so it is discarded from memory.

That next program to run can be anything. It is not uncommon to have bootloaders load a next bootloader, which loads yet another bootloader. Eventually, for the system to be useful, it finally loads the operating system code — which in this case is the Linux kernel. A simple system will run the bootloader after CPU reset, and then load and run the operating system.

Having a separate bootloader, rather than just running the kernel straight away, provides flexibility; now the kernel can reside in various locations, to be found and loaded by the bootloader. This makes it so the same bootloader can be used from early development to production of the embedded system, just by storing different configurations in the bootloader. For example, in early development, the embedded platform can boot entirely from the network; while in later development it may boot from an SD card and production systems can boot from NAND flash.

Parameters can also be passed to the kernel, based on the hardware configuration, and we can now have the same kernel binary run on different embedded hardware systems based on the same platform.

U-Boot

The most common bootloader for embedded Linux systems is U-Boot. U-Boot is officially named Das U-Boot, but everyone just calls it U-Boot. It has support for many CPU architectures — including 68k, ARM, MicroBlaze, MIPS, Nios, SuperH, PPC, RISC-V, x86, and more. It also contains code to support many existing embedded development boards.

U-Boot is an open-source bootloader. For your custom embedded systems, the U-Boot code can be modified to support your specific hardware.

U-Boot also has a lot of drivers, which means it can find the kernel from many different locations. U-Boot has drivers for FTP, NAND flash, MMC, i2c, and more. It also contains filesystem drivers for FAT, ext2/3/4, Cramfs, Squashfs, JFFS2, UBIF, ZFS, btrfs, and more. This means that the kernel binary can reside in one of many locations — including inside one of these filesystems on media somewhere — and U-Boot will find it.

U-Boot’s boot configuration is stored in the form of environment variables. U-Boot usually stores these environment variables in flash memory, where their values can persist across reboots. When U-Boot runs, it looks for the environment variable named ‘bootcmd’. U-Boot then expands this variable and runs whatever commands are in it.

U-Boot contains a command line with a Unix-like syntax. In this command line environment, you can modify the environment variables and store the new values in flash — to be used on subsequent boots.

In practice, you can use U-Boot in early development; for example, configured to boot the kernel over TFTP using NFS for the root filesystem. Then as you get closer to release, you can change it to boot from an SD card over MMC using ext4. And as you get even closer to production, you can change U-Boot to boot from NAND flash inside the board using UBIFS.

Another important feature in U-Boot is the support for device trees. Device trees are a newer way to describe hardware to the kernel. Embedded systems rarely have run-time discoverable hardware. The kernel can’t just query the hardware to find out what is available. The kernel has to be told what devices are present. Rather than hardware information being hardcoded, the kernel can read the device tree which describes the hardware and load appropriate drivers. This allows the same kernel binary to run on different boards based on the same architecture.

As you can see with the large support for devices and filesystems, coupled with its flexibility, U-Boot is an easy choice to use for embedded systems. To get more information on U-Boot, you can go to the project’s website: https://www.denx.de/wiki/U-Boot

Other Bootloaders

While U-Boot is pretty common, other bootloaders are possible for embedded systems. While it is too much information to cover all possible ones, I will mention a couple of other common open source bootloaders.

Barebox is a derivative of U-Boot. It has a lot of the same flexibility as U-Boot but strives to be more Linux-like. It uses a driver architecture similar to the Linux kernel and includes the use of an internal filesystem including device nodes in /dev.

RedBoot is a bootloader from Red Hat. It uses eCos RTOS technology internally and provides support for debugging applications over a serial cable or ethernet.

These are some of the more common options for bootloaders on embedded Linux systems. While they’re technically part of Linux itself, it’s not uncommon to have to build and configure the bootloader. This should give at least an introduction to the world of embedded bootloaders.

Feature image via Pixabay.

The Linux Foundation is the world’s leading home for collaboration on open source software, hardware, standards, and data. Linux Foundation projects are critical to the world’s infrastructure including Linux, Kubernetes, Node.js, ONAP, Hyperledger Foundation, PyTorch, RISC-V, and more.
Learn More
The latest from Linux Foundation Training
TRENDING STORIES
John is a Linux Instructor at The Linux Foundation.
Read more from John Bonesio
Linux Foundation Training sponsored this post.
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.