Page MenuHomeVyOS Platform

Kernel: missing firmware files after enabling module compression
Closed, ResolvedPublicBUG

Description

Hi,

The find glob in build-linux-firmware.sh is *.ko and with the kernel configured to compress modules the firmware list comes up empty:

find .../kernel/drivers/net -name '*.ko' | wc -l
0
find .../kernel/drivers/net -name '*.ko*' | wc -l
272
Widening the pattern would be enough to include them.

I came over this issue during a native build a few days ago, checked against latest (0f03d0a), still present. The proposed fix:

diff --git a/scripts/package-build/linux-kernel/build-linux-firmware.sh b/scripts/package-build/linux-kernel/build-linux-firmware.sh
index 948a06fd..a8479bdb 100755

  • a/scripts/package-build/linux-kernel/build-linux-firmware.sh

+++ b/scripts/package-build/linux-kernel/build-linux-firmware.sh
@@ -20,7 +20,7 @@ if [ ! -d ${LINUX_FIRMWARE} ]; then
fi

  1. Retrieve firmware blobs from source files

-FW_FILES=$(find ${KERNEL_DIR}/debian/linux-image-${KERNEL_VERSION}${KERNEL_SUFFIX}/lib/modules/${KERNEL_VERSION}${KERNEL_SUFFIX}/kernel/drivers/net -name *.ko | xargs modinfo | grep "^firmware:" | awk '{print $2}')
+FW_FILES=$(find ${KERNEL_DIR}/debian/linux-image-${KERNEL_VERSION}${KERNEL_SUFFIX}/lib/modules/${KERNEL_VERSION}${KERNEL_SUFFIX}/kernel/drivers/net -name '*.ko*' | xargs modinfo | grep "^firmware:" | awk '{print $2}')

  1. Debian package will use the descriptive Git commit as version GIT_COMMIT=$(cd ${CWD}/${LINUX_FIRMWARE}; git describe --always)

--

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)
Forum thread
https://forum.vyos.io/t/vyos-build-kernel-collecting-firmware-from-compressed-modules/17604

Event Timeline

c-po changed the task status from Open to In progress.
c-po claimed this task.
c-po triaged this task as Normal priority.