Buildroot
Analyze Buildroot-based embedded Linux projects with FOSSA through the FOSSA CLI's native Buildroot support.
Overview
Buildroot builds complete embedded Linux systems. The Buildroot source tree itself is the package catalog: every package is a package/<name>/<name>.mk makefile in that tree or in a BR2_EXTERNAL tree, and the project's .config selects which packages are built.
FOSSA supports Buildroot natively. Buildroot analysis is performed with the FOSSA CLI as part of a normal fossa analyze run, with no conversion scripts or fossa-deps file required.
Tool support
| Tool | Quick Import (app.fossa.com) | CLI (fossa-cli) |
|---|---|---|
| Buildroot | N/A | Makefile and Buildroot .config |
Analyzing with the CLI
Requirements
| Requirement | Detail |
|---|---|
fossa-cli | Version 3.24.0 or greater. |
| Buildroot | Version 2020.02 or newer, which provides the show-info target. |
| Build environment | The same environment that runs make for the project: a configured Buildroot tree and the host tools Buildroot checks for. |
Analysis is dynamic only: it runs make in the project directory. The project does not need to have been built, only configured, because make show-info evaluates the package makefiles without compiling anything.
Running the analysis
Install the latest release of fossa-cli:
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bashThen run fossa analyze from your configured Buildroot project directory.
Analysis strategies
| Strategy | Direct Deps | Transitive Deps | Edges | Container Scanning |
|---|---|---|---|---|
| show-info | ✅ | ✅ | ✅ | ❌ |
- ✅, Supported when relevant data is available
- ❌, Not supported
Project discovery
A Buildroot project is a directory containing both:
- a
Makefile, and - a
.configwhose header comment is# Buildroot <release> Configuration.
This matches both in-tree builds (the Buildroot checkout itself) and out-of-tree builds (an O= directory, which holds a generated Makefile wrapper). Other Kconfig-style .config files, such as the kernel's, are ignored. Nothing below a discovered project directory is walked, since it holds the extracted sources and the built root filesystem of every package.
Analysis
FOSSA CLI runs make -s show-info in the project directory and reads the JSON it prints. Each entry describes one package: its type (target, host or rootfs), version, dependencies, whether it is virtual, and which virtual packages it provides.
The graph closely follows how Buildroot's own utils/generate-cyclonedx builds its SBOM. The one difference is that virtual packages are also resolved when provides is missing:
| Package kind | Reported | Notes |
|---|---|---|
Non-virtual target | Yes | Cross-compiled and installed into the image. |
Non-virtual host | Only with --include-unused-deps | Build tooling for the build machine. See Target and host packages. |
rootfs | No | Filesystem image generators with no name or version. |
Virtual (openssl, zlib, skeleton, toolchain) | No | Selection points with no source of their own. Dependencies on them are rewired to their providers. |
- Every non-virtual
targetandhostpackage becomes a dependencybuildroot+<name>$<release>#<version>, for examplebuildroot+busybox$2025.02.18#1.37.0.<name>is the package as Buildroot names it (libopenssl, not theopensslvirtual it provides) and<release>is the Buildroot release from the.configheader. - A dependency on a virtual package is rewired to the packages that provide it, so
libcurl -> opensslis reported aslibcurl -> libopenssl. Providers are read fromprovideswhen present; otherwise they are the virtual package's own non-virtual dependencies of the same type. A virtual package with no provider, such astoolchain, is dropped along with its edges. - A package that no other package depends on is a direct dependency.
- Packages with no version of their own (
skeleton-init-sysv,initscripts,urandom-scripts, ...) are defined by the Buildroot tree itself, so their revision is just the Buildroot release from the.configheader, with no#<version>part, for examplebuildroot+initscripts$2025.02.18.
Target and host packages
Only target packages, which are cross-compiled and installed into the image, are reported by default. host packages are built for the build machine and used only as build tooling (host-gcc-final, host-pkgconf, ...); the set of host packages also varies with the machine the build runs on. They are labeled as development dependencies and are included when fossa analyze is run with --include-unused-deps, in which case they appear below the target packages that need them.
Limitations
- Package versions are taken from show-info as-is. Packages whose version is chosen in
.config(the kernel, bootloaders, the toolchain) report that chosen version, which may becustomfor a custom tarball or git checkout. - Packages built with
<PKG>_OVERRIDE_SRCDIRor from alocalsite, such as in-house packages in aBR2_EXTERNALtree, are reported like any other package. Nothing in show-info marks them as first-party.