-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Not working scripts for native compiling kernel modules #4125
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
Comments
Tryed this: https://forum.loverpi.com/discussion/555/how-to-fix-dkms-error-bin-sh-1-scripts-basic-fixdep-exec-format-error |
Cross Compiling make M=scripts clean
patch -p1 < headers-byteshift.patch
echo 'y' | make -s scripts
echo 'y' | make -s M=scripts/mod/ |
I originally got the patch from Armbian, but I don't believe they created it and there is no official patch for the Pi.
https://github.com/raw/pyavitz/rpi-img-builder/master/patches/headers-byteshift.patch
I created packaging patches for kernel builds and included it in the build process.
You can review the patches here: https://github.com/pyavitz/rpi-img-builder/tree/master/patches/cc
|
Thanks a lot, my friend. Armbian patch and making of "scripts" and "scripts/mod" solved the problem. All the best to you🙋♂️. Ok, later I will research your repo🤓. |
Describe the bug
The
fixdep
command as provided in the armhf header file is a x86-64 version which cannot run on armhf and arm64. This break native compilation of kernel modules. I am compiled my own kernel end headers with preemt-rt patch. UsedCROSS COMPILE HOST: Linux VirtualBox 5.8.0-41-generic #46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
DEVICE: Pi3B+
I tryed to compile end test 4 different options :
Two of 4 tested configs:
kernel 5.10.13-rt26-v7+ with rt-preemt patch 5.10.12-rt26
kernel 5.4.83-v8+ with rt-preemt patch 5.4.84-rt47
As base SD image i used this and just put my headers, modules, dts and kernel into it:
Error when trying to compile "hello world" kernel module:
The text was updated successfully, but these errors were encountered: