gateway-dk-ask: build kernel modules in-tree for CI compatibility#9650
Conversation
On Armbian CI, kernel builds and image assembly run on different runners. The ASK extension's post_install_kernel_debs module build assumed the kernel source worktree was available, which fails on the image runner. Fix: build all ASK kernel modules (CDX, FCI, auto-bridge, sfp-led, lp5812) in-tree during kernel compilation. Module sources are copied into the kernel tree during custom_kernel_config (after patching, before olddefconfig), following the pattern used by existing Armbian drivers. Modules ship inside linux-image .deb automatically. Changes: - Add custom_kernel_config hook to copy module sources and enable configs - Kbuild files for CDX/FCI/auto-bridge come from the ASK repo - Board-specific modules (sfp-led, lp5812) use Kbuild files from BSP dir - Remove post_install_kernel_debs module build (no longer needed) - gateway-dk-ask .deb becomes userspace-only (tools, configs, services) - Pin ASK repo to commit with Kbuild files
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis pull request migrates kernel module builds from host-based cross-compilation to in-tree kernel integration. The extension script is refactored to copy module sources into the kernel tree during configuration, removing separate host build logic. Supporting Kbuild files replace standalone Makefiles, and new Kconfig options enable board-specific modules (SFP LED controller and LP5812 LED matrix driver). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Looks good to me. Only comment from my side would be to move the enable extension from board to family config. @rpardini agree? |
rpardini
left a comment
There was a problem hiding this comment.
Nice. Let's get this in and see what CI thinks.
It is worth fixing the framework hook-wise so this is done less painful way in the future (fix the make/git-clean vs copy hook ordering) -- it would also be needed for eg refactoring wifi drivers to extensions.
|
✅ This PR has been reviewed and approved — all set for merge! |
At this stage, 1 board, 1 family, 1 extension, so, little difference, lets see what the future brings. Will happen naturally. |
|
Adding the |
|
Thanks! |
On Armbian CI, kernel builds and image assembly run on different runners. The ASK extension's
post_install_kernel_debsmodule build assumed the kernel source worktree was available, which fails on the image runner.Fix: build all ASK kernel modules (CDX, FCI, auto-bridge, sfp-led, lp5812) in-tree during kernel compilation. Module sources are copied into the kernel tree during
custom_kernel_config(after patching, before olddefconfig), following the pattern used by existing Armbian drivers (e.g., Khadas meson-s4t7). Modules ship insidelinux-image.deb automatically.Changes
custom_kernel_confighook to copy module sources into the kernel tree and enableCONFIG_ASK_*optionsdrivers/net/ethernet/freescale/(inserted beforeendif)kernel_config_modifying_hashesinvalidates kernel cache when ASK source changespost_install_kernel_debsmodule build (no longer needed)pre_package_kernel_headershook (no longer needed)gateway-dk-ask.deb becomes userspace-only (tools, configs, services)Why
custom_kernel_configinstead ofkernel_copy_extra_sourceskernel_copy_extra_sourcesruns beforekernel_maybe_clean, which doesgit clean -xfdqwhenCLEAN_LEVEL=make-kernel— wiping all copied files.custom_kernel_configruns after patching and cleaning, beforeolddefconfig, so files survive.How Has This Been Tested?
ARTIFACT_IGNORE_CACHE=yes CLEAN_LEVEL=make-kernel,images,debslinux-image.deb contains all 5.ko.zstmodules underkernel/drivers/net/ethernet/freescale/ask/gateway-dk-ask.deb contains no kernel modules (userspace only)Checklist:
Summary by CodeRabbit