-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
nixos/anbox: use mainline drivers when available #102341
Conversation
I've fixed the build inputs, fixed up some stuff like .desktop file and app menu category, and added a test for the service module. |
d8b4923
to
173259a
Compare
Rebased and fixed the nixos test to be reliable. Are there any concerns since this changes the kernel? |
@@ -130,7 +135,8 @@ in | |||
--container-network-gateway=${cfg.ipv4.gateway.address} \ | |||
--container-network-dns-servers=${cfg.ipv4.dns} \ | |||
--use-rootfs-overlay \ | |||
--privileged | |||
--privileged \ | |||
--daemon |
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.
don't you have to add Type=fork
if you use daemon here?
You are adding it only to avoid the warning or any other reason?
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.
I did add it to avoid the warning but the process doesn't fork anyways, or at least doesn't exit.
@mvnetbiz thanks, that looks pretty good. |
I don't know what considerations should be taken for adding drivers to the default kernel, or if there is an alternative option. |
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.
Amazing work!
Working as wellpoorly as upstream allows AFAICT. Tested on linux_zen 5.9. Networking works too.
|
||
services.udev.extraRules = '' |
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.
Shouldn't this stay but put behind a conditional for useAnboxModules
?
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.
As far as I can tell these rules don't do anything anyways.
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.
I can't recall but they either don't run or anbox works correctly with the default mode anyways.
nixos/tests/anbox.nix
Outdated
virtualisation.anbox.enable = true; | ||
virtualisation.memorySize = 1500; | ||
|
||
programs.adb.enable = true; |
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.
Nixpkgs' adb has a proprietary license, not sure whether we could run this test in hydra.
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.
Will that just cause an evaluation error or any other problems? I am assuming it is still okay to keep the test here.
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.
(Will probably adapt to the new PR)
I think it's time we have a non-SDK package for adb, fastboot and friends.
And there is one!
This is currently in use by Alpine Linux
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.
Ping @mvnetbiz |
This enables ashmem, binder so waydroid/anbox works with the provided linux kernel Cherry-picked from NixOS#102341
This enables ashmem, binder so waydroid/anbox works with the provided linux kernel Cherry-picked from NixOS#102341
This enables ashmem, binder so waydroid/anbox works with the provided linux kernel Cherry-picked from NixOS#102341
This enables ashmem, binder so waydroid/anbox works with the provided linux kernel Cherry-picked from NixOS#102341
This enables ashmem, binder so waydroid/anbox works with the provided linux kernel Cherry-picked from NixOS#102341
This enables ashmem, binder so waydroid/anbox works with the provided linux kernel Cherry-picked from NixOS#102341
As noted in NixOS#102341 this is not actually running as a forked process. It only tells the process that it is running "as a daemon, so shut the warning up". See `daemon_` here - https://github.com/anbox/anbox/blob/9de4e87cdd05135e1c71e6eadb68bf82719cebdf/src/anbox/cmds/container_manager.cpp#L38-L79 It is **strictly** used to hide that message. Co-authored-by: Matt Votava <mvnetbiz@gmail.com>
As noted in NixOS#102341 this is not actually running as a forked process. It only tells the process that it is running "as a daemon, so shut the warning up". See `daemon_` here - https://github.com/anbox/anbox/blob/9de4e87cdd05135e1c71e6eadb68bf82719cebdf/src/anbox/cmds/container_manager.cpp#L38-L79 It is **strictly** used to hide that message. Co-authored-by: Matt Votava <mvnetbiz@gmail.com>
Motivation for this change
virtualisation.anbox is broken on Linux 5.x
Things done
I have confirmed this working with Linux 4.19, 5.4, 5.7
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)