Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amlogic .S905l2 "linux-headers-6.1.80-ophub" does not compile #2135

Closed
fari2000 opened this issue Mar 3, 2024 · 3 comments
Closed

Amlogic .S905l2 "linux-headers-6.1.80-ophub" does not compile #2135

fari2000 opened this issue Mar 3, 2024 · 3 comments

Comments

@fari2000
Copy link

fari2000 commented Mar 3, 2024

I have been trying to compile wifi module rtl8189ES, but I am getting an error:

###################################
make ARCH=arm64 CROSS_COMPILE= -C /usr/src/linux-headers-6.1.80-ophub/ M=/root/rtl8189ES_linux/ modules
make: Entering directory '/usr/src/linux-headers-6.1.80-ophub'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009
You are using: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
MODPOST /root/rtl8189ES_linux/Module.symvers
/bin/sh: 1: scripts/mod/modpost: Exec format error
make[1]: *** [scripts/Makefile.modpost:127: /root/rtl8189ES_linux/Module.symvers] Error 126
make: *** [Makefile:1962: modpost] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.80-ophub'
#####################################
obtaining header files linux-headers-6.6.16-current-meson64 through "armbian-config->...->Kernel headers" and applying:
make ARCH=arm64 CROSS_COMPILE= -C /usr/src/linux-headers-6.6.16-current-meson64/ M=/root/rtl8189ES_linux/ modules
I get a successful compilation , but I can not bind the module due to mismatch of headers and kernel ( I am guessing)
insmod 8189es.ko
insmod: ERROR: could not insert module 8189es.ko: Invalid module format

########################
cat /etc/armbian-release

BOARD=odroidn2
BOARD_NAME="Aml.S905l2"
BOARDFAMILY=meson-g12b
BUILD_REPOSITORY_URL=https://github.com/armbian/build.git
BUILD_REPOSITORY_COMMIT=1739542
LINUXFAMILY=meson64
ARCH=arm64
IMAGE_TYPE=rebuild
BOARD_TYPE=diy
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
FORCE_BOOTSCRIPT_UPDATE=no
FORCE_UBOOT_UPDATE=
VENDOR="Armbian-unofficial"
VENDORDOCS="https://docs.armbian.com/"
VENDORURL="https://duckduckgo.com/"
VENDORSUPPORT="https://community.armbian.com/"
VENDORBUGS="https://armbian.atlassian.net/"
FORCE_BOOTSCRIPT_UPDATE="no"
BOOTSCRIPT_DST="boot.cmd"
VERSION=24.5.0
REVISION=24.5.0-trunk
BRANCH=current

@ophub
Copy link
Owner

ophub commented Mar 4, 2024

The error message is as written in your log: the compiler is not the same. You can try updating to the dev series kernel first, then attempt to compile again

armbian-update -u dev -k 6.1.79

@fari2000
Copy link
Author

fari2000 commented Mar 4, 2024

Thanks for your feedback!
I did
armbian-update -u dev -k 6.1.79
was successful, the only linux/src is still linux-headers-6.1.79-ophub

uname -a
Linux i3Mega 6.1.79-ophub #1 SMP Tue Feb 27 17:53:13 CST 2024 aarch64 aarch64 aarch64 GNU/Linux

make ARCH=aarch64 CROSS_COMPILE= -C /usr/src/linux-headers-6.1.79-ophub/ M=/home/pi/rtl8189ES_linux modules
make: Entering directory '/usr/src/linux-headers-6.1.79-ophub'
Makefile:774: arch/aarch64/Makefile: No such file or directory
make: *** No rule to make target 'arch/aarch64/Makefile'. Stop.
make: Leaving directory '/usr/src/linux-headers-6.1.79-ophub'

The same error as before
If I try with ARCH=arm64, than I get the error "The kernel was built by: aarch64-none-linux-gnu-gcc"
So the problem is the missing aarch64 folder in the linux-headers... only arm64 folder exists in linux-headers
Updating the kernel and sources with armbian-config does't solve the problem

MY Guess: It looks like the kernel was compiles with aarch64, but the linux-headers do not contain the aarch64 folder!

@fari2000
Copy link
Author

fari2000 commented Mar 8, 2024

Any idee, where to get the right headers with aarch64 folder?

@ophub ophub closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants