Skip to content

linux: CONFIG_ASHMEM=y, CONFIG_ANDROID=y#145768

Merged
mkg20001 merged 1 commit intoNixOS:stagingfrom
mkg20001:anbox-waydroid-modules
Dec 3, 2021
Merged

linux: CONFIG_ASHMEM=y, CONFIG_ANDROID=y#145768
mkg20001 merged 1 commit intoNixOS:stagingfrom
mkg20001:anbox-waydroid-modules

Conversation

@mkg20001
Copy link
Member

@mkg20001 mkg20001 commented Nov 13, 2021

This enables ashmem, binder so waydroid/anbox works with
the provided linux kernel

Cherry-picked from #102341

Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: kernel The Linux kernel label Nov 13, 2021
@ofborg ofborg bot added 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Nov 13, 2021
@mkg20001 mkg20001 force-pushed the anbox-waydroid-modules branch from cd3bcd4 to 5e5fad4 Compare November 14, 2021 13:17
@CajuM
Copy link

CajuM commented Nov 14, 2021

Tested waydroid with linux_latest, works fine.

This enables ashmem, binder so waydroid/anbox works with
the provided linux kernel

Cherry-picked from NixOS#102341
@mkg20001 mkg20001 force-pushed the anbox-waydroid-modules branch from 5e5fad4 to c2e142d Compare November 17, 2021 22:00
@Artturin
Copy link
Member

@mkg20001
Copy link
Member Author

A sync object driver that uses a 32bit counter to coordinate synchronization. Useful when there is no hardware primitive backing the synchronization.

WARNING: improper use of this can result in deadlocking kernel drivers from userspace. Intended for test and debug only.

https://cateee.net/lkddb/web-lkddb/SW_SYNC.html

I don't see why it would be good to have it

@mkg20001 mkg20001 changed the base branch from master to staging December 3, 2021 12:00
@mkg20001 mkg20001 merged commit 0c287b0 into NixOS:staging Dec 3, 2021
@mkg20001 mkg20001 deleted the anbox-waydroid-modules branch December 3, 2021 12:01
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2021

Successfully created backport PR #148442 for staging-21.11.

@asdf8dfafjk
Copy link
Contributor

asdf8dfafjk commented Jan 2, 2022

@CajuM , others:

The check seems to be >5.0, so I wonder if it would only work with linux_latest? I am on unstable from yesterday and even after reboot I get an error when running sudo waydroid init: Module binder_linux not found (short form)

$ uname -a

Linux memechine 5.10.88 #1-NixOS SMP Wed Dec 22 08:31:00 UTC 2021 x86_64 GNU/Linux

$ sudo waydroid init

[11:59:03] Failed to load binder driver
[11:59:03] modprobe: FATAL: Module binder_linux not found in directory /run/current-system/kernel-modules/lib/modules/5.10.88
[11:59:03] ERROR: Binder node "binder" for waydroid not found
[11:59:03] See also: <https://github.com/waydroid>
Run 'waydroid log' for details.

@CajuM
Copy link

CajuM commented Jan 2, 2022

That check was copied from Anbox, if I recall correctly. But, it should work on other linuxPackages, most of them are above 5.0. This patch hasn't made it into unstable, yet. It's currently in staging. Waydroid used to work on unstable with xanmod, but it was broken by de06c5e.

@asdf8dfafjk
Copy link
Contributor

Thank you

@Mindavi Mindavi mentioned this pull request May 10, 2022
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: kernel The Linux kernel 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants