Sample Header Ad - 728x90

How I can point the `rtl8188eus` build towards the cloned android kernel source instead of the system one?

1 vote
1 answer
94 views
I try to build the https://github.com/aircrack-ng/rtl8188eus driver for android so I can load it into the emulator. So far I have installed both android sdk, afterwards I have installed ndk
sdkmanager "ndk;27.0.11902837"
And I have exported the following environmental variables:
export ANDROID_SDK_ROOT=/home/pcmagas/Android
export ANDROID_HOME=/home/pcmagas/Android

export PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator

export NDK_HOME=$ANDROID_HOME/ndk/27.0.11902837
export PATH=$PATH:$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
Then I cloned the common kernel:
git clone https://android.googlesource.com/kernel/common.git 
cd common
git checkout android14-6.1-2024-04_r11
Then I cloned the driver source:
cd ~
git clone https://github.com/aircrack-ng/rtl8188eus.git 
cd rtl8188eus
 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-android- CC=$TOOLCHAIN/x86_64-linux-android25-clang
But I get the error:
make: Entering directory '/usr/src/linux-headers-5.15.0-112-generic'
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
make: /x86_64-linux-android25-clang: Δεν υπάρχει τέτοιο αρχείο ή κατάλογος
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  You are using:           
/bin/sh: 1: /x86_64-linux-android25-clang: not found
(standard_in) 1: syntax error
  CC [M]  /home/pcmagas/dlink-decompile/rtl8188eus/core/rtw_cmd.o
/bin/sh: 1: /x86_64-linux-android25-clang: not found
make: *** [scripts/Makefile.build:297: /home/pcmagas/dlink-decompile/rtl8188eus/core/rtw_cmd.o] Error 127
make: *** [Makefile:1911: /home/pcmagas/dlink-decompile/rtl8188eus] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.0-112-generic'
make: *** [Makefile:2065: modules] Error 2
As you can see it is pointed towards the linuxc kernel and not towards the android kernel. How I can fix this?
Asked by Dimitrios Desyllas (143 rep)
Jun 10, 2024, 07:51 AM
Last activity: Jun 19, 2024, 05:27 PM