Repository navigation
feat(kernel): drop firmware-less Wi-Fi, Bluetooth and GPU drivers; compress vmlinuz with zstd - #491
Conversation
…mpress vmlinuz with zstd The image ships no /usr/lib/firmware, so Wi-Fi, Bluetooth and the amdgpu, radeon, nouveau and xe GPU drivers cannot drive the hardware they match. patches/freedesktop-sdk/0009 appends to FSDK's fdsdk-config.sh after 0007: it removes WLAN, CFG80211, MAC80211, BT, DRM_AMDGPU, DRM_RADEON, DRM_NOUVEAU and DRM_XE, and switches KERNEL_GZIP to KERNEL_ZSTD. FSDK's module/enable lines put those drivers in expected-configs, so the block snapshots the expected options that are set, runs olddefconfig, and drops from the check only the ones that went from set to unset (192, listed in the build log; matching a local Kconfig run of 7.2.6). Every other expected option is still checked. CEC_CORE/MEDIA_CEC_RC go too: only amdgpu's display code selected them. Measured against a local build of main (b3e4b0d, same dev keys): usr.raw 211,357,696 -> 187,297,792 (-24.1 MB) disk UKI 79,671,296 -> 75,356,672 (-4.3 MB) netboot UKI 79,671,808 -> 75,357,184 (-4.3 MB) .linux 20,685,824 -> 16,372,736 (gzip -> zstd; cfg80211, mac80211 and the Bluetooth core are no longer built in) Against v26.10.1215 (before projectbluefin#489): usr.raw 215,330,816, disk UKI 93,467,568. Modules gone: 201 files / 23.9 MB (Wi-Fi 160 / 13.0 MB, amd 6.1 MB, xe 1.9 MB, nouveau 1.3 MB, radeon 0.9 MB, Bluetooth 27 / 0.6 MB, cec, five DRM helpers only these drivers used, qmi_helpers). Added: libarc4.ko (was built in via mac80211). Kept: i915, simpledrm, virtio-gpu, hyperv_drm, vmwgfx, vboxvideo, gma500, RFKILL (x86 platform drivers use it), DEBUG_INFO_BTF; sound, media, IIO and input module counts unchanged. ast, mgag200 and bochs were not built before this change and still are not. Verified: 0001/0006/0007/0008/0009 git apply cleanly on the freedesktop-sdk-26.08.2 tag; just validate; just export-image (kernel rebuilt, expected-config check passed); just check-image vs 1215 and main; just dogfood-check (Secure Boot diskless boot, failed=0). Assisted-by: Claude Fable 5.1 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Patch 0009 stops building nouveau, so no driver holds an NVIDIA GPU when the driver sysext merges. nvidia-load's eviction (`modprobe -r nouveau` only when nouveau holds a GPU, sysfs unbind otherwise) is now a no-op and stays as a guard for a kernel that does build nouveau; update the skill and the helper and unit comments to say so. No behaviour change. Assisted-by: Claude Fable 5.1 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
This change shrinks the server kernel by turning off drivers whose hardware can never work here (the image ships no firmware files) and by switching the kernel image to a tighter compression. The result is a smaller download and boot image. The kernel-config block does what the description says, and the trick for keeping the upstream "expected options" check honest is sound. One real problem: the compression switch is written for 64-bit Intel/AMD machines only, and it will break the kernel build on the 64-bit Arm target this project also declares. One shipped comment is now stale.
correctness
enable KERNEL_ZSTDis unguarded and will fail the aarch64 kernel build.patches/freedesktop-sdk/0009-linux-server-no-firmware-hw.patch:59-60runremove KERNEL_GZIP; enable KERNEL_ZSTDfor every arch. FSDK'senable()(files/linux/config-utils.sh:26-29) appends the name toexpected-configsunconditionally, andlinux.bst:81-88fails the build onx86_64|aarch64when an expected option is unset. arm64 has no in-kernel decompressor:arch/arm64/Kconfighas zeroHAVE_KERNEL_*selects, so the "Kernel compression mode" choice (init/Kconfig:305-308) is not visible andolddefconfigleavesKERNEL_ZSTDunset. The block's own filter cannot save it — it only strips options that went set→unset (patch line 62), andKERNEL_ZSTDwas never set inwas_set. Net effect on aarch64:Missing KERNEL_ZSTDand a failed build — the exact class of break that issue #377 hit and that0007guards withcase "$arch" in x86_64)(and that FSDK itself uses forDRM_XE/DRM_I915,fdsdk-config.sh:666-670). aarch64 is declared inproject.conf:18-20but not built in CI today (docs/skills/architecture-roadmap.md:43), so this PR's checks stay green. Fix: wrap lines 59-60 in the samecase "$arch" in x86_64) … ;; esacas 0007, and extendtests/unit/test_kernel_no_firmware.pywith the arch-guard assertiontest_kernel_watchdog.py:183-194already uses.
docs-currency
- The PR says the nouveau "docs and comments" were updated, but
files/nvidia/sysext/modprobe-nvidia.conf:1-3(shipped in the sysext) still states "udev binds nouveau to the GPUs before that; nvidia-load.service evicts an already bound nouveau first", which is no longer true on the base kernel.tests/unit/test_nvidia_sysext.py:257-259carries the same stale comment. Reword both likenvidia-load:6-13did ("on a kernel that does build it…").
No findings from: security, intent-alignment, style.
Confidence: 3/5 (needs attention) — 1 medium finding; 2 perspectives requested changes
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
45caadf
|
arm64 selects no HAVE_KERNEL_*, so `enable KERNEL_ZSTD` stays unset there and FSDK's expected-configs check would fail the aarch64 kernel build with "Missing KERNEL_ZSTD". Wrap the gzip->zstd switch in an x86_64 case, like 0007 does for the x86-only watchdogs, and test both arches. Reword the modprobe-nvidia.conf comment and its test to say the base kernel no longer builds nouveau. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
da6862f
|
Follows #489 with the kernel-side half of the size review. −24 MB usr.raw, −4.3 MB per UKI vs current main; the trimmed image boots in
just dogfood-check(Secure Boot, verity,lockdown=integrity,failed=0).What
New
patches/freedesktop-sdk/0009-linux-server-no-firmware-hw.patch, appended after 0007. The image ships no/usr/lib/firmware, so Wi-Fi (CFG80211/MAC80211+ every WLAN driver),BT, andDRM_AMDGPU/RADEON/NOUVEAU/XEcannot bind the hardware they drive; they areremoved from the kernel config.KERNEL_GZIP→KERNEL_ZSTD. The kernel is already built off FSDK's cache because of 0006/0007, so this adds no new cache miss — but every full build after this PR rebuilds the kernel once (18 min locally).The subtle part: FSDK's own config lines put ~190 of those drivers into its
expected-configscheck, which fails the build on any unset option. The patch snapshots which expected options are set, applies the removes +olddefconfig, and drops from the check exactly the options that went set→unset (192, printed in the build log) — everything else FSDK expects is still enforced. A stub-helper test proves only true dependents leave the check and an expected-but-missing option still fails.Kept / not touched
DEBUG_INFO_BTF(Cilium CO-RE),RFKILL(x86 platform drivers),i915,simpledrm,virtio-gpu,hyperv_drm,vmwgfx,vboxvideo,ttm/gpu-sched. Sound (360 modules), media (212), IIO (127), input (73) are unchanged — that is the separate "M2" product decision.ast/mgag200/bochswere never built in this kernel, so there was nothing to keep. One side effect:cec.ko(HDMI-CEC, 40 KB) also drops because only amdgpu's display code selectedCEC_CORE.Removed: 201 module files / 23.9 MB (Wi-Fi 160 / 13.0 MB, amdgpu 6.1, xe 1.9, nouveau 1.3, radeon 0.9, Bluetooth 27 / 0.6). Added:
libarc4.ko(5 KB; was built in via mac80211). Nouveau's absence makesnvidia-load'smodprobe -r nouveaua no-op; docs and comments updated, code unchanged.b3e4b0d)usr.raw.linuxin UKIVerification
0001/0006/0007/0008/0009 apply in order on a clean
freedesktop-sdk-26.08.2with no offsets;just validate;just export-image(kernel rebuilt; FSDK's expected-config check passed);just check-imagevs both v26.10.1215 and main baselines;just dogfood-checkpasses; pytest 1501 (newtest_kernel_no_firmware.py, patch-chain fixture extended, build-trigger case); ruff, docs-checks.patches/README.mdrow +bump-fsdk-version.mdupdated — this patch will need refreshing on FSDK bumps that touchfdsdk-config.sh's tail, same as 0006/0007.full-buildadded for CI's boot-test.