-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
virtualbox: Fix build for manual kernel. #109
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
Conversation
Okay, seems there are some issues, se please do not merge yet. |
@aszlig Can you close and then reopen when it's ready for merge? No need to open a new PR, just reopen the closed one. |
Sorry, fell asleep just after pushing. Going to test and/or fixup further tomorrow. |
Fixed, and tested against generic kernel aswell. |
@@ -42,10 +56,11 @@ stdenv.mkDerivation { | |||
''; | |||
|
|||
configurePhase = '' | |||
sourcedir="$(pwd)" |
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.
This shouldn't be necessary, the standard unpackPhase sets $sourceRoot
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.
Unfortunately, it is necessary, as $sourceRoot is not an absolute path.
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.
Ah, OK. I wonder if that should be changed in stdenv-updates... @edolstra?
Don't rely on VirtualBox's in-tree build scripts to set include paths correctly and use the official way of the Linux kernel to build the modules. That way we don't need to make ugly symlinks in the kernel tree or heavily patch VirtualBox.
The for loop didn't find $curdir, because it was set _after_ the directory has been changed. The variable is now called $srcroot and is set before the installPhase is changing directories.
The scripts/depmod.sh checks whether the path in $DEPMOD is executable and only executes it if that's the case. So, by setting DEPMOD to "/do_not_use_depmod" the destination path doesn't exist _and_ thus isn't executable aswell.
First of all, modules won't install when there is no "make modules" prior to it, so we're doing this now with a new function called forEachModule, so we can avoid duplication as much as possible. In addition this sets $sourcedir to the current directory of the configurePhase, so we're able to find the source tree later on, after several chdir()s.
The "include/generated" stuff is already added to the search path by the kernel modules build system, so no need to hack it in like this.
We're the host so we don't need the kernel modules for the guest additions, as they're build with in a separate derivation anyway.
Copy all symbol versions from the ones generated in the vboxdrv build.
Thanks to @shlevy for mentioning this.
Rebased without the checkPhase in |
Do not evaluate /etc/bashrc on non-interactive shells
Add support for more rust targets
changelog: https://github.com/fdw/rofi-rbw/releases 1.5.1: Fix release process Latest Unfortunately, the new automatic build process with uv was broken, resulting in useless wheel files. 1.5.0: It's time Changed Fields are shown in plain text or hidden based on their type. (NixOS#17) Stopped support for Python 3.8. Added Show a notification after copying TOTP. (NixOS#101) Support for fuzzel. (NixOS#109) Support cards.
This should fix building VirtualBox against kernels made using the new manual kernel configuration system.
In addition, this adds a small test case to the manual kernel, to ensure that modules can be built properly using kbuild.
And the latter (kbuild) is also used in the VirtualBox derivation, so we shouldn't trap into problems even with generic kernels (which i didn't test, yet so it would make sense to test it before merging...).