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
Build all kernel modules for ARM and Aarch64 #24229
Conversation
This allows to use kernelAutoModules but still compile in any options that are set so in template config. It's helpful for ARM and maybe other platforms where defaul configurations are useful because they compile in modules that we and udev cannot autodetect now.
We don't require initrd in some cases but still most boot sequences including ARM use it.
It's not entirely clear to me from the description - what does "prefer builtin" do? |
It's a supplementary flag to "auto modules". Currently if you have auto modules enabled all configuration options that have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally managed to compile for ARMv6 RPi, ARMv7 Jetson TK1, aarch64 RPi3 && the Cavium ThunderX box. Seems to work well.
Regarding @edolstra's comment, maybe scoping the name a bit would make it clearer that it only affects the automodules option/logic. E.g. name it |
A better name should help, yeah -- but I can't definitely say which option (including current) is better, too. Any little preference from anyone will sway me towards it :D |
Motivation for this change
Make all kernel modules available for ARM. This includes iptables, accounting (iotop), USB drivers and much more which was absent before.
Also enable initrd in kernel by default (some configurations disable it while we rely on it for most boot sequences excluding containers).
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)My first approach was to just enable
kernelAutoModules
. However it turned out that a lot of modules is unknown to udev and it's a huge pain to get a board working. You need to figure out manually which storage (MMC in my case) modules you need, how to get USB working, LEDs etc. This would hugely degrade our multiplatformeness if done now.Therefore I did something else -- we can now specify that we want all options compiled as modules in a kernel, but if a template config (
armv7_multiplatform_defconfig
, for example) specifies that something should be compiled it it would be left as is. This gives us the best of both worlds.While I have tested this on an ARMv7 board I have not tested it on Aarch44. I expect that since all modules now available it's not needed to compile in network adapter drivers for ThunderX -- but this should be tested.