-
Notifications
You must be signed in to change notification settings - Fork 96
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
Cannot cross-compile on an x86_64 PC #112
Comments
I encountered this problem as well. After doing some research, I found out that for kernel versions after 6.0 it's mandatory that the version of the gcc used to compile that kernel (and its modules) be over 12. However the latest version of arm-linux-gnueabihf-gcc that I could get from apt-get was version 9.4, so it seems that you need to build your own toolchain where the version of gcc is over 12. I used buildroot to build the kernel, so I had access to its toolchain as well and managed to successfully compile the driver with this command. |
I don't think this is why I am encountering this problem, I have checked and I am using version 14: gcc version 14.1.1 20240507 (Red Hat Cross 14.1.1-1) (GCC) gcc-aarch64-linux-gnu-14.1.1-1.fc40.x86_64 I think that the problem might be related to the following configurations found within kernel-devel-6.8.9-300.fc40.x86_64 [atorregr@p15s /usr/src/kernels/6.8.9-300.fc40.x86_64]$ grep -B1 record-mcount Makefile The .config file does not contain that definition under kernel-devel-6.9.12-200.fc40.aarch64. |
I can download and compile the rtl8189fs driver on an ARM64 device. However I wasn't able to cross-compile on an x86_64 device, such as my own PC with Fedora 40.
Steps to reproduce: on a PC with Fedora or some other Linux distribution with all the necessary compiling tools installed (kernel-devel, make, git-core, gcc-aarch64-linux-gnu), give the following commands:
git clone https://github.com/jwrdegoede/rtl8189ES_linux.git
cd rtl8189ES_linux
git checkout -B rtl8189fs origin/rtl8189fs
make -j1 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- KSRC=/usr/src/kernels/$(uname -r)
The last command produces an error output:
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mrecord-mcount’
The same commands on an ARM64 device compiles the driver.
To be honest, I'm not sure whether this is a problem in this product's makefile, or that of kernel-devel.
The text was updated successfully, but these errors were encountered: