-
Notifications
You must be signed in to change notification settings - Fork 76
sys-kernel/coreos-modules: Install external mod build files with script #3445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: James Le Cuirot <jlecuirot@microsoft.com>
chewi
added a commit
to chewi/GPU-Driver-Container
that referenced
this pull request
Nov 5, 2025
This is no longer necessary following flatcar/scripts#3445. In fact, it breaks because the files are already there. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
krnowak
approved these changes
Nov 5, 2025
...ainer/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.12.54.ebuild
Show resolved
Hide resolved
chewi
added a commit
to chewi/GPU-Driver-Container
that referenced
this pull request
Nov 13, 2025
This is no longer necessary. In older releases, at least as far back as Flatcar LTS 4081.3.6, the symlinks are already there. More recently, flatcar/scripts#3445 restructures things so that the files are in build to begin with. Trying to create new symlinks just breaks the script. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Install external mod build files with script
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
sourcetobuildeven 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.How to use
Try triggering a build of the NVIDIA drivers or manually building custom kernel modules. For the latter, don't install coreos-sources, as that wouldn't be testing this change. Only ebuilds insist on the full kernel sources. I'll update the documentation later.
You can also try using the NVIDIA GPU Driver Container. You'll need my changes in jepio/GPU-Driver-Container#1. Note that this was already previously broken, so the changes there aren't solely to make the changes here work. The steps are basically:
On any system:
Copy that container image into Flatcar. Give the VM 8GB RAM or thereabouts.
If you attach a GPU, you can load the driver, but you'll need to
sudo systemctl mask nvidiaquickly on the first boot. It seems to rebuild when loading the driver, which it shouldn't, but I believe that is unrelated because I also saw this happen without these changes.Testing done
Jenkins is all green. There is a lot of churn in the change reports, but it's mostly files moving from
sourcetobuild. I previously did a comparison that showed only unnecessary files have been dropped such as the device tree sources. These aren't needed to build modules, and Flatcar doesn't use them anyway.I've also done all the above. That included attaching a GPU to ensure the freshly built NVIDIA driver actually loaded. I built a large handful of out-of-tree modules using the dev container, some with Portage (with a little force) but most manually using vanilla upstream sources. They all worked, except for a couple that failed for unrelated reasons.
changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.