Bug 29611 - Android modules (ashmem, binder) not enabled
Summary: Android modules (ashmem, binder) not enabled
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
: 31724 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-11-01 11:38 CET by Buchan Milne
Modified: 2023-10-30 22:24 CET (History)
6 users (show)

See Also:
Source RPM: dkms-anbox
CVE:
Status comment:


Attachments
make log for module (8.08 KB, text/plain)
2023-02-18 22:41 CET, sturmvogel
Details
make log for module on MGA9 (1.48 KB, text/plain)
2023-02-18 22:45 CET, sturmvogel
Details
Make log for module ashmem on MGA9 (859 bytes, text/plain)
2023-09-17 21:15 CEST, Daniel Tartavel
Details
Make log for module binder on MGA9 (4.31 KB, text/plain)
2023-09-17 21:16 CEST, Daniel Tartavel
Details

Description Buchan Milne 2021-11-01 11:38:42 CET
Description of problem:

I was wanting to try waydroid and/or anbox. The current anbox-modules (https://github.com/anbox/anbox-modules) don't compile on kernel > 5.7, failing with: "ERROR: modpost: "kallsyms_lookup_name" undefined".

Similar reports (https://github.com/anbox/anbox-modules/issues/49) indicate that the drivers are now available upstream, and could be enabled, see e.g.:

https://wiki.archlinux.org/title/Anbox#Building_a_kernel

If this isn't possible, I could package a fork that uses Kprobes: https://github.com/choff/anbox-modules

Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1. # zgrep -E '(CONFIG_ASHMEM|+CONFIG_ANDROID_BINDER_DEVICES=)' /proc/config.gz
2. Search for ASHEMEM or BINDER in http://svnweb.mageia.org/packages/cauldron/kernel/current/SOURCES/defconfig-x86_64-desktop?view=markup
3.
Comment 1 Marja Van Waes 2021-11-01 17:38:33 CET
Assigning

CC: (none) => marja11
Assignee: bugsquad => kernel

Comment 2 Buchan Milne 2021-11-06 12:55:40 CET
I have succeeded with out-of-tree modules (dkms package), however I got stuck with:

11-06 10:00:19.105   427   427 E libpsi  : No kernel psi monitor support (errno=2)

So, regardless of enabling ashmem and binder, for the purposes of using waydroid (at least, possibly anbox as well), pressure stall information must also be enabled, at least:

CONFIG_PSI=y

In this case, psi must be enabled via kernel command line by appending `psi=1`, otherwise add:

CONFIG_PSI_DEFAULT_DISABLED=n

See https://github.com/waydroid/waydroid/issues/136
Comment 3 Thomas Backlund 2021-11-06 15:04:52 CET
I've enabled PSI in next kernel build (4.14.17-1 currently building), and you need to enable it with "psi=1"...

I need to think a bit about the other android bits
Comment 4 Buchan Milne 2021-11-06 15:33:29 CET
I built a kernel with only the following changes:

[root@buchan-desktop ~]# zgrep PSI /proc/config.gz 
CONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
[root@buchan-desktop ~]# cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-5.10.75-1.mga8custom root=UUID=466aceb7-8be9-434c-ae3d-4247a70fd06f ro splash quiet noiswmd resume=/dev/VGsys/swap audit=0 psi=1 vga=791


With the rest of what I've packaged so far for waydroid (including ashmem_linux and binder_linux from https://github.com/choff/anbox-modules as a dkms package), this was sufficient to get an android container to start (on Mageia 8). I'll try and get what I've done uploaded later today, so we don't necessarily need them enabled in the kernel package.
Comment 5 Thierry Vignaud 2022-02-09 06:19:05 CET
Were you able to run anbox?

CC: (none) => thierry.vignaud

Comment 6 Buchan Milne 2022-02-13 11:28:49 CET
I didn't try anbox itself, I wanted these changes for waydroid:

http://svnweb.mageia.org/packages/cauldron/waydroid/current/SPECS/waydroid.spec?revision=1754269&view=markup

I have been successfully running waydroid on Mageia 8 since I uploaded it. On Mageia 8 you need:
* to add `psi=1` to your boot parameters
* install kernel >= kernel-5.14.17-1.mga8 (e.g. current kernel from updates should work)
* install waydroid from backports/testing (urpmi waydroid)
* Run `waydroid init` to install an android runtime
* systemctl start waydroid-container as root


To run an android container:
* Be logged into a wayland session (plasma or Gnome)
* waydroid session start
* waydroid show-full-ui

Similar steps should work on Cauldron with less effort.
Comment 7 Daniel Tartavel 2022-12-07 22:14:30 CET
dkms-anbox do not compile in Mageia 9
kernel 6.0.11-destop-1

logs of installation:

Creating symlink /var/lib/dkms/anbox-ashmem/0.0.2-2.mga9/source ->
                 /usr/src/anbox-ashmem-0.0.2-2.mga9

DKMS: add Completed.

Preparing kernel 6.0.11-desktop-1.mga9 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
/sbin/dkms: ligne 939: avertissement :substitution de commande: octet nul ignoré en entrée
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
make -j4 KERNELRELEASE=6.0.11-desktop-1.mga9 all KERNEL_SRC=/lib/modules/6.0.11-desktop-1.mga9/build....(bad exit status: 2)

Error! Bad return status for module build on kernel: 6.0.11-desktop-1.mga9 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/anbox-ashmem/0.0.2-2.mga9/build/ for more information.

Error! Could not locate ashmem_linux.ko.xz for module anbox-ashmem in the DKMS tree.
You must run a dkms build for kernel 6.0.11-desktop-1.mga9 (x86_64) first.

Creating symlink /var/lib/dkms/anbox-binder/0.0.2-2.mga9/source ->
                 /usr/src/anbox-binder-0.0.2-2.mga9

DKMS: add Completed.

Preparing kernel 6.0.11-desktop-1.mga9 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
/sbin/dkms: ligne 939: avertissement :substitution de commande: octet nul ignoré en entrée
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
make -j4 KERNELRELEASE=6.0.11-desktop-1.mga9 all KERNEL_SRC=/lib/modules/6.0.11-desktop-1.mga9/build....(bad exit status: 2)

Error! Bad return status for module build on kernel: 6.0.11-desktop-1.mga9 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/anbox-binder/0.0.2-2.mga9/build/ for more information.

Error! Could not locate binder_linux.ko.xz for module anbox-binder in the DKMS tree.
You must run a dkms build for kernel 6.0.11-desktop-1.mga9 (x86_64) first.
attention : %post(dkms-anbox-0.0.2-2.mga9.noarch) scriptlet échoué, état de sortie 4
ERROR: 'script' failed for dkms-anbox-0.0.2-2.mga9.noarch

CC: (none) => contact

Comment 8 Buchan Milne 2022-12-10 18:46:37 CET
Please try dkms-anbox-0.0.3-1.mga9.noarch when it is available on your mirror.

(My local mirror is out-of-date and my cauldron VM doesn't have the matching kernel-devel package installed, so I haven't tried it myself on a 6.0.x kernel yet)

Status: NEW => NEEDINFO

Comment 9 Buchan Milne 2022-12-11 12:30:57 CET
My mirror has caught up, and I was able to install waydroid on my Cauldron VM, including the compilation of the anbox modules:

[root@cauldron-vm ~]# urpmi waydroid
unable to access synthesis file of "Core Release (cdrom-1)", medium ignored
unable to access synthesis file of "Nonfree Release (cdrom-2)", medium ignored
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release (cauldron-1)")
  dkms                           2.0.19       45.mga9       noarch  
  dkms-anbox                     0.0.3        1.mga9        noarch  
  dkms-minimal                   2.0.19       45.mga9       noarch  
  dnsmasq                        2.88         1.mga9        x86_64  
  lib64gbinder1                  1.1.13       2.mga9        x86_64  
  lib64libglibutil1              1.0.56       2.mga9        x86_64  
  lib64lxc1                      4.0.12       1.mga9        x86_64  
  lib64nftables1                 1.0.2        2.mga9        x86_64  
  lxc                            4.0.12       1.mga9        x86_64  
  nftables                       1.0.2        2.mga9        x86_64  
  python-gbinder                 1.0.0        3.mga9        x86_64  
  python3-pyclip                 0.5.4        3.mga9        noarch  
  waydroid                       1.2.0        2.mga9        noarch  
23MB of additional disk space will be used.
3.9MB of packages will be retrieved.
Proceed with the installation of the 13 packages? (Y/n) y


    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/dkms-2.0.19-45.mga9.noarch.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/nftables-1.0.2-2.mga9.x86_64.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/lib64libglibutil1-1.0.56-2.mga9.x86_64.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/lib64gbinder1-1.1.13-2.mga9.x86_64.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/lxc-4.0.12-1.mga9.x86_64.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/waydroid-1.2.0-2.mga9.noarch.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/dkms-minimal-2.0.19-45.mga9.noarch.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/dkms-anbox-0.0.3-1.mga9.noarch.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/dnsmasq-2.88-1.mga9.x86_64.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/lib64lxc1-4.0.12-1.mga9.x86_64.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/python-gbinder-1.0.0-3.mga9.x86_64.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/python3-pyclip-0.5.4-3.mga9.noarch.rpm
    http://ftp.sun.ac.za/ftp/pub/mirrors/mageia/distrib/cauldron/x86_64/media/core/release/lib64nftables1-1.0.2-2.mga9.x86_64.rpm
installing dkms-anbox-0.0.3-1.mga9.noarch.rpm dnsmasq-2.88-1.mga9.x86_64.rpm python-gbinder-1.0.0-3.mga9.x86_64.rpm lib64lxc1-4.0.12-1.mga9.x86_64.rpm lib64nftables1-1.0.2-2.mga9.x86_64.rpm python3-pyclip-0.5.4-3.mga9.noarch.rpm lib64libglibutil1-1.0.56-2.mga9.x86_64.rpm nftables-1.0.2-2.mga9.x86_64.rpm dkms-2.0.19-45.mga9.noarch.rpm lxc-4.0.12-1.mga9.x86_64.rpm lib64gbinder1-1.1.13-2.mga9.x86_64.rpm dkms-minimal-2.0.19-45.mga9.noarch.rpm waydroid-1.2.0-2.mga9.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     #################################################################
     1/13: dkms-minimal          #################################################################
     2/13: dkms                  #################################################################
     3/13: dkms-anbox            #################################################################

Creating symlink /var/lib/dkms/anbox-ashmem/0.0.3-1.mga9/source ->
                 /usr/src/anbox-ashmem-0.0.3-1.mga9

DKMS: add Completed.

Preparing kernel 6.0.12-desktop-1.mga9 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
make -j2 KERNELRELEASE=6.0.12-desktop-1.mga9 all KERNEL_SRC=/lib/modules/6.0.12-desktop-1.mga9/build....
cleaning build area....
cleaning kernel tree (make mrproper)....

DKMS: build Completed.
Running module version sanity check.

ashmem_linux.ko.xz:
 - Installation
   - Installing to /lib/modules/6.0.12-desktop-1.mga9/dkms/updates/

depmod......

DKMS: install Completed.

Creating symlink /var/lib/dkms/anbox-binder/0.0.3-1.mga9/source ->
                 /usr/src/anbox-binder-0.0.3-1.mga9

DKMS: add Completed.

Preparing kernel 6.0.12-desktop-1.mga9 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
make -j2 KERNELRELEASE=6.0.12-desktop-1.mga9 all KERNEL_SRC=/lib/modules/6.0.12-desktop-1.mga9/build.....
cleaning build area....
cleaning kernel tree (make mrproper)....

DKMS: build Completed.
Running module version sanity check.

binder_linux.ko.xz:
 - Installation
   - Installing to /lib/modules/6.0.12-desktop-1.mga9/dkms/updates/

depmod.....

DKMS: install Completed.
     4/13: lib64libglibutil1     #################################################################
     5/13: lib64gbinder1         #################################################################
     6/13: python-gbinder        #################################################################
     7/13: python3-pyclip        #################################################################
     8/13: lib64nftables1        #################################################################
     9/13: nftables              #################################################################
    10/13: lib64lxc1             #################################################################
    11/13: lxc                   #################################################################
    12/13: dnsmasq               #################################################################
    13/13: waydroid              #################################################################
[root@cauldron-vm ~]#

Status: NEEDINFO => RESOLVED
Resolution: (none) => FIXED

Comment 10 sturmvogel 2023-02-18 22:40:39 CET
Broken again on MGA8 and MGA9.

Creating symlink /var/lib/dkms/anbox-ashmem/0.0.1-2.mga8/source ->
                 /usr/src/anbox-ashmem-0.0.1-2.mga8

DKMS: add Completed.

Preparing kernel 5.15.88-desktop-1.mga8 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare.....

Building module:
cleaning build area....
make -j2 KERNELRELEASE=5.15.88-desktop-1.mga8 all KERNEL_SRC=/lib/modules/5.15.88-desktop-1.mga8/build....
cleaning build area....
cleaning kernel tree (make mrproper)....

DKMS: build Completed.
Running module version sanity check.

ashmem_linux.ko.xz:
 - Installation
   - Installing to /lib/modules/5.15.88-desktop-1.mga8/dkms/updates/

depmod......

DKMS: install Completed.

Creating symlink /var/lib/dkms/anbox-binder/0.0.1-2.mga8/source ->
                 /usr/src/anbox-binder-0.0.1-2.mga8

DKMS: add Completed.

Preparing kernel 5.15.88-desktop-1.mga8 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
make -j2 KERNELRELEASE=5.15.88-desktop-1.mga8 all KERNEL_SRC=/lib/modules/5.15.88-desktop-1.mga8/build.....(bad exit status: 2)

Error! Bad return status for module build on kernel: 5.15.88-desktop-1.mga8 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/anbox-binder/0.0.1-2.mga8/build/ for more information.

Error! Could not locate binder_linux.ko.xz for module anbox-binder in the DKMS tree.
You must run a dkms build for kernel 5.15.88-desktop-1.mga8 (x86_64) first.
warning: %post(dkms-anbox-0.0.1-2.mga8.noarch) scriptlet failed, exit status 4
ERROR: 'script' failed for dkms-anbox-0.0.1-2.mga8.noarch

Source RPM: kernel-5.10.20-2.mga8.src.rpm => kernel-5.15.88-desktop-1.mga8 /
Status: RESOLVED => REOPENED
Assignee: kernel => bgmilne
Resolution: FIXED => (none)

Comment 11 sturmvogel 2023-02-18 22:41:26 CET
Created attachment 13705 [details]
make log for module
Comment 12 sturmvogel 2023-02-18 22:45:55 CET
Created attachment 13706 [details]
make log for module on MGA9
sturmvogel 2023-02-18 22:46:18 CET

Whiteboard: (none) => MGA8TOO

sturmvogel 2023-02-18 22:46:59 CET

Source RPM: kernel-5.15.88-desktop-1.mga8 / => kernel-5.15.88-desktop-1.mga8 / kernel-6.1.12-desktop-1.mga9

Comment 13 sturmvogel 2023-03-24 09:03:44 CET
*** Bug 31724 has been marked as a duplicate of this bug. ***
Comment 14 Daniel Tartavel 2023-09-17 21:13:19 CEST
on MGA9 
kernel 6.4.15-desktop-1.mga9 #1 SMP PREEMPT_DYNAMIC

anbox-ashmem and anbox-binder does not compile.
Comment 15 Daniel Tartavel 2023-09-17 21:15:41 CEST
Created attachment 13996 [details]
Make log for module ashmem on MGA9
Comment 16 Daniel Tartavel 2023-09-17 21:16:58 CEST
Created attachment 13997 [details]
Make log for module binder on MGA9
Comment 17 Chris Denice 2023-10-09 23:11:00 CEST
Confirmed. Update to latest git snapshot fixes the build of binder. Ashmem still fails, but I succeeded initializing waydroid without it.

----

Update advisory:

dkms-0.0.3-1.1.mga9 landing in core/updates_testing. This version fixes build failure of the binder module against kernel 6.4.*

RPMS
dkms-anbox-0.0.3-1.1.mga9.noarch.rpm

SRPMS:
dkms-anbox-0.0.3-1.1.mga9.src.rpm

CC: (none) => eatdirt

Chris Denice 2023-10-10 16:02:12 CEST

Assignee: bgmilne => qa-bugs

Comment 18 Marja Van Waes 2023-10-10 16:44:25 CEST
Advisory from comment 17 uploaded. I assume this won't be fixed for Mageia 8, since nothing was pushed for Mageia 8?

Keywords: (none) => advisory
Source RPM: kernel-5.15.88-desktop-1.mga8 / kernel-6.1.12-desktop-1.mga9 => dkms-anbox

Marja Van Waes 2023-10-10 16:48:46 CEST

Whiteboard: MGA8TOO => (none)

Marja Van Waes 2023-10-10 16:49:39 CEST

Version: Cauldron => 9

Comment 19 Chris Denice 2023-10-10 16:53:05 CEST
I don't know the latest kernel version of mga8, if there are in 6.3.* or 6.4.*, I could push an update indeed!?
Comment 20 Thomas Andrews 2023-10-17 04:14:14 CEST
Backported kernels in mga8 went as high as 6.1.45, but "regular" kernel is 5.15.126. IMO, anyone who needed the backported kernels because of newer hardware should have upgraded to mga9 by now.

But then, I can't decide these things by myself.

CC: (none) => andrewsfarm

Comment 21 Thomas Andrews 2023-10-17 04:24:21 CEST
MGA9-64 Plasma in VirtualBox.

I downloaded dkms-anbox using qarepo, then used urpmi to successfully install waydroid. I watched part of a short video on waydroid, discovering I should have been using wayland for success, but I forged ahead anyway.

I enabled the waydroid-container service, then ran "waydroid init." Lots of stuff was downloaded and stored locally, and when finished, it quit. Seemed normal enough, as far as I went. I would say it was enough to show that the modules were built.

Giving this an OK, and validating.

Whiteboard: (none) => MGA9-64-OK
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 22 Mageia Robot 2023-10-17 16:07:19 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2023-0089.html

Resolution: (none) => FIXED
Status: REOPENED => RESOLVED

Comment 23 Chris Denice 2023-10-30 22:24:04 CET
Let me add a little comment, I've pushed further my attempts to run waydroid, and even though this update has fixed the problem with anbox, we have other problems with two other packages that prevents waydroid to successfully start: python-gbinder and libgbinder. I will open other reports for them to fix that.

NB: All that because my new battery charger from Traxxas (Live Peak) is utterly sh... You have to download an android app to control it, even though it comes with buttons. How stupid is that??? I still cannot believe some enginners manades to come with such a crazy idea...

On the bright side, that's why I am going to make waydroid working :)

Note You need to log in before you can comment on or make changes to this bug.