Generate a Kernel Build List

Updated Nov 15, 2026

A Linux kernel source tree contains far more code than any one product compiles. Most kernel vulnerabilities are fixed in a driver or subsystem that your configuration leaves out, but a scan of the SBOM alone cannot tell. The kernel build list fills this gap: it lists the files your build actually compiled.

When a vulnerability's fix only changes source files that are not in your list, Nuxy suggests Not Affected with the justification Code Not Present. You review each suggestion and accept it or not. Nuxy never changes a triage on its own.

What Nuxy Needs

A plain text file with one path per line:

  • Object files (.o) or source files (.c, .S). For an object file, Nuxy counts both the matching .c and .S file as compiled.
  • Paths can be relative (./net/ipv4/tcp.o) or absolute. Nuxy ignores everything before the top-level kernel directory, such as arch/, drivers/, fs/ or net/.
  • Empty lines and lines that start with # are ignored.

The list belongs to one SBOM, and the SBOM must contain the Linux kernel as a component. Build the list from the same kernel build that the SBOM describes.

# Kernel 6.6.30, board rev B
./arch/arm64/kernel/setup.o
./drivers/net/ethernet/stmicro/stmmac/stmmac_main.o
./fs/ext4/inode.o
./net/ipv4/tcp.o

Any Kernel Build

After the kernel build finishes, list every object file in the kernel build directory. This is the source tree, or the directory you passed to make O=....

cd /path/to/kernel-build
find . -name '*.o' | sort > kernel-build-list.txt

Built-in code and loadable modules (=m) both produce object files, so both are included. Run the command after a full build, not after make clean.

Yocto Project

The kernel recipe builds in its own build directory, ${B}. Find it with:

bitbake -e virtual/kernel | grep '^B='

After bitbake virtual/kernel or an image build, run the generic command in that directory.

To produce the list with every build, add a .bbappend for your kernel recipe in your own layer, for example recipes-kernel/linux/linux-yocto_%.bbappend:

do_deploy:append() {
    (cd ${B} && find . -name '*.o' | sort) > ${DEPLOYDIR}/kernel-build-list.txt
}

The list is then written to tmp/deploy/images/<machine>/ next to the kernel image. On releases older than Honister (3.4), write do_deploy_append instead of do_deploy:append.

If your build uses rm_work, the object files are deleted after the build. Either create the list in do_deploy as shown above, or keep the kernel's work directory with RM_WORK_EXCLUDE += "linux-yocto" (use your kernel recipe's name).

Buildroot

Buildroot builds the kernel inside its own source directory, output/build/linux-<version>/ (linux-custom/ when the kernel comes from a Git repository or a local directory). Run the generic command there:

cd output/build/linux-6.6.30
find . -name '*.o' | sort > kernel-build-list.txt

To produce the list with every build, add a post-image script (BR2_ROOTFS_POST_IMAGE_SCRIPT):

#!/bin/sh
KERNEL_DIR=$(ls -d "$BUILD_DIR"/linux-* | grep -v '/linux-headers-' | head -n 1)
(cd "$KERNEL_DIR" && find . -name '*.o' | sort) > "$BINARIES_DIR/kernel-build-list.txt"

The list is then written to output/images/.

Upload the List

  1. Open Vulnerabilities → SBOMs, expand the product version and select the SBOM's name.
  2. Above the component table, find Kernel Build List and choose Upload.
  3. Select the text file. Nuxy shows how many files it read.

The Kernel Build List row on the SBOM page, with the Upload link

This row only appears when the SBOM contains the Linux kernel. To change the list later, choose Replace.

Review the Suggestions

At the top of the Vulnerabilities page, select Suggestions to Accept to list the vulnerabilities with a suggestion. Open one to see it: the suggestion names the files the fix changes, none of which is in your list. Choose Accept to use the suggestion, or triage the vulnerability yourself.

Nuxy does not make a suggestion when:

  • The fix also changes header files, because a header can be used by any compiled file.
  • Any changed file is in your list.
  • An affected product version has an SBOM without a kernel build list.
  • The vulnerability has already been triaged.

Keep the List Current

Upload a new list whenever the kernel version or the kernel configuration changes. When the SBOM is updated to a different kernel version, the SBOM page shows that the list was uploaded for the old version.