-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
virtualbox: Includes the necessary patches for the build in the 5.10 kernel #108285
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
@blitz can you take a look at this (and possibly at the virtualbox tests, which don't seem to run for me) |
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.
Thanks for taking this up! If I understand the upstream ticket, correctly the single patch is not sufficient to get full functionality. Fortunately, the changes for 5.10 support have already been added to their subversion repo.
I suggest picking these official patches instead of only the single one from the ticket description:
I think this will not use the patched kernel modules. To update your system using a local nixpkgs checkout you can do |
I tried your branch and can confirm that:
Kernel: |
No problem, after work I will add the other patches and test again.
No problem, I like living on the edge, I just hope I don't have to compile a lot lol, and yes after some tests I realized that the result is unable to load any driver (even if this version of virtualbox is already in my env.pkgs).
Thanks for testing! |
Guys just to update, I included the relevant patches from svn referecing this issue (the 3 that @blitz linked here) I and did get a bunch of compile errors, this week has been a little to busy so I did not have enough time to debug yet , so sorry for that. |
No worries. The easiest option would be to wait until the VBox people make a new release that includes these fixes. That would spare us the pain of backporting. They had a "once-per-month" cadence, but only until October. Not sure what's happening on their end that prevents a new release. I would guess though that NixOS is not the only customer poking them about 5.10. If having a potentially slightly b0rken VirtualBox on Linux 5.10 is better than no VirtualBox at all, I'd be in favor of only using the partial backport from the original bug report. |
…kernel It includes all of the necessary patches for the virtualbox to work on the 5.10 (latest) kernel, tested on Vanilla and Zen, 5.10 and 5.9. In the original issue there are other patches for graphics and shared folders, however, during my tests none of them were necessary, the virtualbox worked perfectly with only the initial patch (linux-5.10-r0drv-memobj-fix-r0.patch). Yet, It includes the others available on SVN that reference this problem. Ref: https://www.virtualbox.org/ticket/20055 Signed-off-by: Bryan A. S <bryanasdev000@gmail.com>
e00cf52
to
0f100bb
Compare
Guys, I think I managed to fix the errors, it seems that there was something with the drm patch that was failing in the I used a fragment of Sergio's git patch(sergiomb2/VirtualBox@b6c765d) and it worked via For testing you can use a override, overlay or just cherry-pick the latest commit. Example with override in nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: rec {
virtualbox = pkgs.virtualbox.overrideAttrs (attrs: {
patches = attrs.patches
++ [ /root/linux-5.10-r0drv-memobj-fix-r0.patch /root/linux-5.10-regops.patch /root/linux-5.10-drm.patch ];
});
#xen = pkgs.xen.overrideAttrs (attrs: {
# patches = attrs.patches
# ++ [ /root/xen-tools-4.13.0-ipxe-gcc10.patch ];
#});
};
};
}; Make sure to have the files at the described path. |
Guys, in the current master my system build fails with a package not related to Virtualbox, in the branch that I committed the build is working 100%. I did all the tests that I mentioned in the original issue, on my side everything is functional. |
New version 6.18 is released. I think we can move on to that now. |
One word to that, LOL. @Magicloud you will a open a PR? |
FWIW I have been using the changes from this PR for a while and it's working fine. I have tested the latest changes now and it still builds and works fine. |
Can we bump to 6.18 directly, if it's released and fixes it too? |
Yep! 6.1.18 already fixes this issue.
Thanks! :D |
I tried the easy way but
I will try to update by hand. |
Opened #110550. |
@bryanasdev000 appreciate the effort you made on this PR, I've also been using the upstream patch with your changes. |
Thanks @gvolpe! Happy to help! |
Motivation for this change
Make VirtualBox work in >= 5.10.
It includes one of the necessary patches for the virtualbox to work on the 5.10 (latest) kernel, tested on Vanilla and Zen, 5.10 and 5.9 (just for sure).
In the original issue there are other patches for graphics and shared folders, however, during my tests none of them were necessary, the virtualbox worked perfectly with only the initial patch.
Ref: https://www.virtualbox.org/ticket/20055
Patch: https://www.virtualbox.org/attachment/ticket/20055/linux-5.10-r0drv-memobj-fix-r0.patch
I am not sure how to test directly from nixpkgs (without changing NIX_PATH) however, after the patch and a
nix-build -A virtualbox
I managed to build and check the graphical interface of virtualbox (result/bin/VirtualBox
).I have used it on my machine the way I described it at #107648 (comment) and it has worked perfectly.
I hope I put the patch in the right place.
Once merged, it closes #107648
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)