Open pc-magas opened 3 months ago
So far I have installed NDK and tried:
make CC=${NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android34-clang ARCH=x86_64 CROSS_COMPILE=x86_64-linux-android- KERNEL_SRC=$KERNEL_SRC
Upon master branch but I got:
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-android'
make[2]: *** [scripts/Makefile.build:297: /home/pcmagas/dlink-decompile/rtl8188eus/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1911: /home/pcmagas/dlink-decompile/rtl8188eus] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-112-generic'
make: *** [Makefile:2065: modules] Error 2
How I can fix this?
Sorry for the delay, GitHub is not giving me notifications.
I don't know about compiling it for Android, using Android's tools, but once I got a driver working on Nethunter by compiling with the given headers. I might have been a chrooted environment.
From my Nexus 5, using postmarketOS, I had a related problem where the kernel version showed 6.9.1
but the headers were 5.8
. Of course I tried everything, but it didn't seemed to work. I had to rely on compiling the kernel all over again just to move the folder to /lib/modules/6.9.1
and rename it to build
.
What I would recommend for you is doing the same. Trying to find the source of this Android you downloaded and compile again the 6.1.23-android14-4-00257-g7e35917775b8-ab9964412
kernel version.
For some reason, most Linux environment don't have the given headers to build other drivers which is SO annoying.
I have launched an Android VM via android's emulator:
Where the device is:
Via obtaining a shell access upon the device
I got:
And I attempt to crossbuild in my host linux and load it at the Android Running upon emulator. But I am stuck on theese: