0

I want to install the rtl8192 linux driver in order to use my TP-Link TL-W823N USB adapter but when I execute sudo dkms install rtl8192eu/1.0 then I get gcc error messages.

$ cat /var/lib/dkms/rtl8192eu/1.0/build/make.log
DKMS make.log for rtl8192eu-1.0 for kernel 6.1.21-v8+ (aarch64)
Thu 16 May 2024 12:30:48 PM CEST
make ARCH=arm CROSS_COMPILE= -C /lib/modules/6.1.21-v8+/build M=/var/lib/dkms/rtl8192eu/1.0/build  modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
  CC [M]  /var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
gcc: error: unrecognized command-line option ‘-mapcs’
gcc: error: unrecognized command-line option ‘-mno-sched-prolog’
gcc: error: unrecognized command-line option ‘-msoft-float’
make[2]: * [scripts/Makefile.build:250: /var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o] Error 1
make[1]: * [Makefile:2012: /var/lib/dkms/rtl8192eu/1.0/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
make: * [Makefile:2287: modules] Error 2

My goal is to create a second wifi interface wlan1.

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented May 18 at 17:54

2 Answers 2

0

It looks to me like you are running a 32-bit system with a 64-bit kernel, which is fine, but this means it cannot natively compile a 64-bit kernel module.

You can confirm this with, eg., file /bin/bash. You can also have a look at the output of gcc -Q --help=target -c which will show some of those switches disabled for the target architecture (or with platform specific alternatives, eg., -msoft-float should be -mfloat-abi=soft, but there is no point in trying to hack the makefile or something, again, you simply cannot build the driver with an arm7 compiler).

The easiest way out of this would be use a 32-bit kernel instead; there should be one in /boot/firmware; you want kernel7l.img. You can do this by putting one or the other (or both) of:

kernel=kernel7l.img
arm_64bit=0

in /boot/firmware/config.txt.

Alternately, you could install the full 64-bit OS which runs fine on a Pi 4. If you don't want to do that but don't want to use the 32-bit kernel and you have a spare SD card, you could install the 64-bit version, put it in the Pi and compile the driver on it, then copy that to your current system.

3
  • Thanks, I will take look at your proposals. I'm currently using the 64-bit OS.
    – Jan
    Commented May 21 at 7:44
  • And file /bin/bash confirms that? Note that there is a difference between running a 64-bit kernel (which you are) and a 64-bit OS, sometimes people are confused by this as you can do the former without having to do the latter.
    – goldilocks
    Commented May 21 at 13:25
  • It's both 64 bit. OS and arm64
    – Jan
    Commented May 23 at 9:47
0

I found a solution. I had to pass the correct env variable like here described.

I had to execute make ARM=arch64 in order to pass the correct CPU architecture for this driver.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 5 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.