From 97ac8e853d486445b1b0ec025856ef6b39aae5f7 Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Fri, 28 Aug 2026 07:44:16 +0100 Subject: [PATCH 1/4] bundle-dkms-modules: print make.log in full on a build failure On failure the script printed tail -n 300 of make.log and nothing else, which is the wrong end of the file for any module whose build helper keeps going after a failure. Such a helper reports only at the very end, so a compile error early on sits thousands of lines above the tail and never appears in the build log, while the tail shows the routine output of whatever ran last and reads as though nothing went wrong. Print the whole log instead, prefixed with its path and length. The private dkms tree is deleted on EXIT, so the inline copy is the only surviving record in CI and there is nothing to be gained by truncating it. Signed-off-by: Christopher Obbard --- debian/scripts/bundle-dkms-modules.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/scripts/bundle-dkms-modules.sh b/debian/scripts/bundle-dkms-modules.sh index c2649f0..d84944e 100755 --- a/debian/scripts/bundle-dkms-modules.sh +++ b/debian/scripts/bundle-dkms-modules.sh @@ -17,7 +17,7 @@ set -euo pipefail # 3. Builds the module with `dkms build` against the staged kernel headers, # using a private --dkmstree (mktemp) to avoid writing to /var/lib/dkms/. # 4. Judges the outcome by artifact presence, not dkms exit code. -# On failure: prints make.log tail (build failure) or BUILD_EXCLUSIVE gate +# On failure: prints make.log in full (build failure) or BUILD_EXCLUSIVE gate # analysis (skip), then hard-fails — a manifest entry is a presence contract. # 5. For each produced .ko: # - Collision-checks against already-bundled modules and in-tree modules. @@ -371,8 +371,8 @@ for name in $DKMS_MODULES; do mklog="$(find "$DKMS_TREE/$PKG_NAME/$PKG_VER" -name make.log 2>/dev/null \ | head -1 || true)" if [[ -n "$mklog" ]]; then - log_error "dkms build failed for $PKG_NAME/$PKG_VER on kernel $KVER (dkms exit $dkms_rc); make.log tail:" - tail -n 300 "$mklog" | sed 's/^/ | /' >&2 + log_error "dkms build failed for $PKG_NAME/$PKG_VER on kernel $KVER (dkms exit $dkms_rc); make.log:" + sed 's/^/ | /' "$mklog" >&2 else log_error "$PKG_NAME/$PKG_VER produced no module for kernel $KVER; dkms attempted no build (dkms exit $dkms_rc)." gates="$(grep -E '^[[:space:]]*BUILD_EXCLUSIVE' "$conf" 2>/dev/null || true)" From 415885b47496cf8d9301d16debf25cf9b2016760 Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Fri, 28 Aug 2026 07:44:16 +0100 Subject: [PATCH 2/4] bundle-dkms-modules: report each BUILD_EXCLUSIVE_CONFIG option separately BUILD_EXCLUSIVE_CONFIG may name several kernel options, space separated, all of which must be set for dkms to build the module. The gate report tested the whole string as a single symbol, which never matches, so every gate was reported as unset: | CONFIG_ARCH_QCOM CONFIG_PM_DEVFREQ CONFIG_SYNC_FILE is NOT set That is worse than saying nothing: it accuses the kernel config whatever the real cause was, and it did exactly that while the actual failure was a broken source tree. Both kgsl and iris-vpu declare multi-option gates, so the report was wrong for every module that reached it. Evaluate each option separately. Signed-off-by: Christopher Obbard --- debian/scripts/bundle-dkms-modules.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/debian/scripts/bundle-dkms-modules.sh b/debian/scripts/bundle-dkms-modules.sh index d84944e..e83383c 100755 --- a/debian/scripts/bundle-dkms-modules.sh +++ b/debian/scripts/bundle-dkms-modules.sh @@ -386,11 +386,15 @@ for name in $DKMS_MODULES; do | sed -n 's/^[[:space:]]*BUILD_EXCLUSIVE_CONFIG=//p' \ | tr -d '"')" [[ -n "$c" ]] || continue - if grep -q "^${c}=[ym]" "$kernel_config" 2>/dev/null; then - echo " | $c is set in this kernel's config" >&2 - else - echo " | $c is NOT set in this kernel's config" >&2 - fi + # BUILD_EXCLUSIVE_CONFIG may name several options, space + # separated, all of which must be set. + for one in $c; do + if grep -q "^${one}=[ym]" "$kernel_config" 2>/dev/null; then + echo " | $one is set in this kernel's config" >&2 + else + echo " | $one is NOT set in this kernel's config" >&2 + fi + done done <<< "$gates" echo " This kernel: $KVER, dkms arch $DKMS_ARCH." >&2 else From 9392d9eac3aa140b0bd309b473172582ebdd80d3 Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Fri, 28 Aug 2026 07:44:16 +0100 Subject: [PATCH 3/4] packaging: bundle the camx DKMS module Add camx to debian/dkms-modules so the Qualcomm camx driver is built against the kernel being packaged and shipped inside linux-image--qcom and declare camx-dkms in Build-Depends. Signed-off-by: Christopher Obbard --- debian/control.in | 2 +- debian/dkms-modules | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control.in b/debian/control.in index 0a3650a..3531968 100644 --- a/debian/control.in +++ b/debian/control.in @@ -6,7 +6,7 @@ Standards-Version: 4.6.2 Build-Depends: debhelper-compat (= 13), bc, bison, flex, libssl-dev, libelf-dev, dwarves, python3, kmod, cpio, rsync, pkg-config, gcc, make, - dkms, kgsl-dkms + dkms, kgsl-dkms, camx-dkms Homepage: https://kernel.org Rules-Requires-Root: binary-targets diff --git a/debian/dkms-modules b/debian/dkms-modules index 1b11c8d..dc9e854 100644 --- a/debian/dkms-modules +++ b/debian/dkms-modules @@ -10,3 +10,4 @@ # To disable a module temporarily: comment out the line with #. # debian/rules and debian/scripts/bundle-dkms-modules.sh are untouched in either case. kgsl +camx From 8740d78cd9ef091e9cf567aa538c778f4e80c862 Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Fri, 28 Aug 2026 07:44:16 +0100 Subject: [PATCH 4/4] packaging: bundle the iris-vpu DKMS module Add iris-vpu to debian/dkms-modules so the Qualcomm video accelerator driver is built against the kernel being packaged and shipped inside linux-image--qcom and declare iris-vpu-dkms in Build-Depends. Signed-off-by: Christopher Obbard --- debian/control.in | 2 +- debian/dkms-modules | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control.in b/debian/control.in index 3531968..cc617c0 100644 --- a/debian/control.in +++ b/debian/control.in @@ -6,7 +6,7 @@ Standards-Version: 4.6.2 Build-Depends: debhelper-compat (= 13), bc, bison, flex, libssl-dev, libelf-dev, dwarves, python3, kmod, cpio, rsync, pkg-config, gcc, make, - dkms, kgsl-dkms, camx-dkms + dkms, kgsl-dkms, camx-dkms, iris-vpu-dkms Homepage: https://kernel.org Rules-Requires-Root: binary-targets diff --git a/debian/dkms-modules b/debian/dkms-modules index dc9e854..0aae7db 100644 --- a/debian/dkms-modules +++ b/debian/dkms-modules @@ -11,3 +11,4 @@ # debian/rules and debian/scripts/bundle-dkms-modules.sh are untouched in either case. kgsl camx +iris-vpu