anbox / anbox-modules

Anbox kernel modules
327 stars 224 forks source link

ubuntu 20.04 内核5.11.0-42-generic 编译失败(bad exit status: 2) #87

Open jgxjgx opened 2 years ago

jgxjgx commented 2 years ago

$ sudo cp anbox.conf /etc/modules-load.d/ $ sudo cp 99-anbox.rules /lib/udev/rules.d/ $ sudo cp -rT ashmem /usr/src/anbox-ashmem-1 $ sudo cp -rT binder /usr/src/anbox-binder-1 $ sudo dkms install anbox-ashmem/1

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make -j4 KERNELRELEASE=5.11.0-42-generic all KERNEL_SRC=/lib/modules/5.11.0-42-generic/build....(bad exit status: 2) ERROR (dkms apport): binary package for anbox-ashmem: 1 not found Error! Bad return status for module build on kernel: 5.11.0-42-generic (x86_64) Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.

$ sudo dkms install anbox-binder/1

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make -j4 KERNELRELEASE=5.11.0-42-generic all KERNEL_SRC=/lib/modules/5.11.0-42-generic/build...(bad exit status: 2) ERROR (dkms apport): binary package for anbox-binder: 1 not found Error! Bad return status for module build on kernel: 5.11.0-42-generic (x86_64) Consult /var/lib/dkms/anbox-binder/1/build/make.log for more information.

SoulInfernoDE commented 2 years ago

Do not try to compile the modules for newer kernels as it is not possible anymore. Instead you need to compile THE KERNEL itself with the modules options enabled in the config file as the modules had been migrated to the newer kernels but some code had been removed that prevents you from building/using the modules standalone for security reasons.

You can look at my tutorial/notice i wrote down to address the issue for myself or use my precompiled kernels (with the android config options pre-enabled) if you are using a ubuntu distribution. https://github.com/anbox/anbox-modules/issues/75#issuecomment-794079944

sickcodes commented 2 years ago

Working fork for 5.10 thru 5.15 @SoulInfernoDE @jgxjgx

https://github.com/choff/anbox-modules/

agenbite commented 2 years ago

@sickcodes, it doesn't work on my 5.13.0-21-generic kernel:

/tmp/anbox-modules$ ./INSTALL.sh 

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.13.0-21-generic all KERNEL_SRC=/lib/modules/5.13.0-21-generic/build....
Signing module:
 - /var/lib/dkms/anbox-ashmem/1/5.13.0-21-generic/x86_64/module/ashmem_linux.ko
Secure Boot not enabled on this system.
cleaning build area...

DKMS: build completed.

ashmem_linux.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.13.0-21-generic/updates/dkms/

depmod.....

DKMS: install completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.13.0-21-generic all KERNEL_SRC=/lib/modules/5.13.0-21-generic/build....(bad exit status: 2)
ERROR (dkms apport): binary package for anbox-binder: 1 not found
Error! Bad return status for module build on kernel: 5.13.0-21-generic (x86_64)
Consult /var/lib/dkms/anbox-binder/1/build/make.log for more information.
binder_linux          204800  0
ashmem_linux           20480  0
ls: cannot access '/dev/binder': No such file or directory
crw------- 1 root root 10, 122 dic  8 15:18 /dev/ashmem
SoulInfernoDE commented 2 years ago

Working fork for 5.10 thru 5.15 @SoulInfernoDE @jgxjgx

https://github.com/choff/anbox-modules/

Its the way it should not be done anymore. It has been removed as a external function for good. It is included in the kernel itself.