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
linux kernel generic: use passAsFile for kernelConfig #38626
Conversation
looks good, why the hardlink instead of symlink ? |
Years of bad habits, happy to change that if there is any preference. |
Just means that it rebuilds all kernels times all kernel modules. That's why it builds > 500 packages. |
@@ -104,7 +105,7 @@ let | |||
|
|||
# Create the config file. | |||
echo "generating kernel configuration..." | |||
echo "$kernelConfig" > "$buildRoot/kernel-config" | |||
cp -l "$kernelConfigPath" "$buildRoot/kernel-config" |
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.
Symlinks are less surprising because it is clear, where they came from.
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.
Sure thing. Repushed with ln -s
instead, and retested with sandbox.
lrwxrwxrwx 1 nixbld1 nixbld 49 Apr 9 18:30 /tmp/nix-build-linux-config-4.14.32.drv-0/linux-4.14.32/build/kernel-config -> /tmp/nix-build-linux-config-4.14.32.drv-0/.attr-0
Otherwise get the error 'Argument list too long' when running builder with a very long kernelConfig
ce25a24
to
b64f407
Compare
FYI, there's also |
Aye, I found that file/function/derivation(?) but I haven't the faintest idea of how to use it. I'm somewhat new to nix but had no problem whatsoever tweaking other packages or the config in general, partly because I've been doing what nix does with my /opt manually for ages so it feels great to have this automated, but I've really been struggling with the kernel these past few days. Anyway, I'm just mostly venting out at this point but it's been quite frustrating, these kernel packages could use some documentation love eventually and I'll get back to it .... later. |
The kernel configuration in nixpkgs is a mess... |
Otherwise get the error 'Argument list too long' when running builder
with a very long kernelConfig
Motivation for this change
I have a Very Big kernelConfig, because I want DEBUG_INFO so need to rebuild but don't want to spend too long rebuilding (so doing a minimalistic kernel with thousands of 'foo n' options) and that seemed simpler than manual-config.nix at the time.
Also, hi! Nix looks great except for building a custom kernel :P
I couldn't find any "proper" test for this but I think that won't cause too many side effect out of the building the kernel config itself, which appears to work for me (still fiddling with the config itself but it finds the file etc)
The only arguable point is that I make a hardlink (cp -l), not sure what's recommended there but it should work on all platforms nix targets, probably?
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)