Skip to content

flatcar-4459: backport "sys-kernel/coreos-modules: Install external mod build files with script"#3838

Merged
tormath1 merged 2 commits intoflatcar-4459from
tormath1/4459/zfs-kmod
Mar 18, 2026
Merged

flatcar-4459: backport "sys-kernel/coreos-modules: Install external mod build files with script"#3838
tormath1 merged 2 commits intoflatcar-4459from
tormath1/4459/zfs-kmod

Conversation

@tormath1
Copy link
Contributor

@tormath1 tormath1 commented Mar 17, 2026

In this PR, we backport #3445 to flatcar-4459 (current Stable). This should fix an issue with zfs-kmod compilation in last Kernel patch releases:

Configuring source in /build/amd64-usr/var/tmp/portage/sys-fs/zfs-kmod-2.3.3/work/zfs-2.3.3 ...
...
 checking whether CONFIG_MODULES is defined... no
 configure: error: 
 		*** This kernel does not include the required loadable module
 		*** support!
 		***
 		*** To build OpenZFS as a loadable Linux kernel module
 		*** enable loadable module support by setting
 		*** `CONFIG_MODULES=y` in the kernel configuration and run
 		*** `make modules_prepare` in the Linux source tree.
 		***
 		*** If you don't intend to enable loadable kernel module
 		*** support, please compile OpenZFS as a Linux kernel built-in.
 		***
 		*** Prepare the Linux source tree by running `make prepare`,
 		*** use the OpenZFS `--enable-linux-builtin` configure option,
 		*** copy the OpenZFS sources into the Linux source tree using
 		*** `./copy-builtin <linux source directory>`,
 		*** set `CONFIG_ZFS=y` in the kernel configuration and compile
 		*** kernel as usual.

chewi added 2 commits March 17, 2026 17:27
The kernel now includes a script for installing the files needed to
build out-of-tree modules, rendering our existing code obsolete. The
layout is different, but we were following Ubuntu's non-standard layout
when there was no need to. Ubuntu's approach is seemingly designed to
save space by symlinking common files across different platforms, but
Flatcar doesn't need to do this.

More importantly, our previous approach relied on a kernel patch we have
carried for years that no longer applies from v6.13. The patch cannot
simply be reworked as the underlying mechanism has changed.

This clears the last major blocker for the arm64 SDK as the previous
approach also relied on implicit execution by QEMU.

There has been concern that this may break compatibility with some
modules, but I have not seen any issues in practise. I have symlinked
`source` to `build` even though we don't install the full kernel sources
because this is what Fedora does, and it makes the layout resemble
Ubuntu a little more. Should any issues arise, I will gladly work with
upstreams to resolve them or otherwise make adjustments.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
@tormath1 tormath1 merged commit 10392a2 into flatcar-4459 Mar 18, 2026
4 of 5 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Testing / in Review to Implemented in Flatcar tactical, release planning, and roadmap Mar 18, 2026
@tormath1 tormath1 deleted the tormath1/4459/zfs-kmod branch March 18, 2026 10:04
@tormath1
Copy link
Contributor Author

tormath1 commented Mar 18, 2026

Cherry-picked to:

  • flatcar-4081

@sayanchowdhury I would recommend to carefully check the next LTS nightlies to see if something looks weird, the patch was not cherry-picking correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants