What Goes Into a Board Support Package

A processor vendor supplies software that runs on its evaluation board. A product board has different memory, power and peripherals, and the board support package fills the gap. For embedded Linux it covers the bootloader, the kernel and its configuration, the hardware description and the tools to build and flash the result. This article sets out what a complete BSP contains.

At a glance

U-Boot
The most widely used open-source bootloader for embedded Linux boards.
Device tree
The data structure that tells the Linux kernel what hardware the board has.
Defconfig
A saved kernel or bootloader configuration that rebuilds the same setup every time.
BSP layer
In Yocto, a BSP is packaged as a layer holding the machine configuration and board recipes.

The problem

A BSP is often treated as the vendor’s reference software with a few edits. Those edits accumulate as untracked patches on a fixed kernel version, and when a security fix or a new feature needs a newer kernel, nobody can say exactly what was changed or why.

Gaps show up late. Memory timing that works on most boards but not all, a regulator enabled too late, or a missing display driver can each stall a project just when application work should start.

Treat the BSP as a product in its own right, with its own source control, tests and maintenance plan.

What a complete BSP includes

At the bottom is the boot chain: a first-stage loader that initialises DRAM, often the U-Boot SPL, and the main bootloader that loads the kernel. Above that sit the kernel source with any board patches, a kernel configuration, a device tree for the board and any out-of-tree drivers or firmware files the peripherals need.

A usable BSP also includes the means to build and deploy it: build recipes or scripts, a flashing method for the factory and a record of what was tested. On a microcontroller the term covers the equivalent pieces: start-up code, clock and pin configuration, linker script and drivers.

What good looks like

Start from the vendor BSP for the processor, and list every difference between the evaluation board and yours: memory, boot media, power and peripherals.

Adapt the bootloader and memory configuration first, then the device tree and kernel configuration, bringing up one interface at a time.

Keep every change as a tracked patch or layer in version control, and record which kernel and bootloader versions the BSP is based on.

Parts of an embedded Linux BSP
ComponentRoleUsually derived from
First-stage loaderInitialises DRAM and loads the bootloaderVendor code or U-Boot SPL
BootloaderLoads the kernel, device tree and root filesystemU-Boot
Kernel and configurationDrivers, scheduler and system servicesVendor or mainline kernel
Device treeDescribes the board hardware to the kernelSoC include file plus a board file
Firmware filesBinary images some peripherals load at start-upPeripheral vendor
Build and flash toolingBuilds images and programs them in the factoryYocto layer, Buildroot or scripts
A typical breakdown. Some processors add further boot stages or trusted firmware.

From evaluation board to product board

  1. Vendor BSP: Runs on the evaluation board
  2. Memory and boot: DRAM settings, boot media, console
  3. Device tree: Describe the product board
  4. Drivers: Enable and test each interface
  5. Package: Layer, build scripts, flashing
Bring up one layer at a time; each depends on the one before.

What it changes

Bootable Hardware

The board runs a maintained kernel with every interface working.

Maintainability

Tracked changes can be carried onto newer kernels for security fixes.

Reproducible Builds

Anyone on the team can rebuild the exact image that shipped.

Clean Handover

Application developers start on a stable, documented platform.

Where to go next

Prefer drivers that are already in the mainline kernel. Out-of-tree drivers have to be carried forward by hand at every kernel update.

Check the vendor’s kernel support plan before choosing the processor. A BSP tied to an old kernel limits the supported life of the product.

Problems this prevents

  • Untracked patches on an old vendor kernel
  • Boards that fail with marginal memory settings
  • No record of how the shipped image was built
  • Drivers that block every kernel upgrade

Discuss your project

Email support@aavico.com or use Get in Touch when the website finishes loading.