-
Notifications
You must be signed in to change notification settings - Fork 177
Compile error on Raspbian #29
Comments
I tried commenting out the "mfloat-abi=hard" in the Makefile. Ran "make clean" and tried compiling again. Same error. |
root@raspberrypi:/opt/rtl8821CU# uname -a |
Got it working by doing a manual "make" and "make install". Seems the dkms-part is broken. |
Can you please explain how got it working with the manual install? I'm getting gcc: error: unrecognized command line option '-mgeneral-regs-only' |
I did not do anything special. Just ran "make" instead of compiling through dkms. |
hi im having the same problem and manual sudo make doesnt work.. Any suggestions? |
I get the same error
My environment: Orange Pi Zero, Kernal 4.19.62-sunxi, Ubuntu 18.04.3 boinic
I find the same error too. I run just "make" too. But the problem persists. |
I managed to solve the compilation issue. https://github.com/sunzone93/rtl8821CU All the best! |
@sunzone93 was this on rpi3b? |
@shivan thanks for the check. I fixed the spaces. |
@sunzone93 would be great to have this working, as I already tried several other sources, with bad luck :-( |
Hi @shivan I managed to compile the library for RPi3b with following steps.
*Don't update the Makefile for CONFIG_PLATFORM_ARM_RPI3 = y. Keep the default options. When this option is enabled (error: unrecognized command line option ‘-mgeneral-regs-only’) gcc error occurs. You may follow this.
Make sure I updated my repository to fix several bugs. So you may re-clone my repo again! Please let me know how it goes~ |
Hi, thanks for your update. Now I get this:
What's the problem now? looks like it is missing some libraries? |
@sunzone93 oops, sorry. Ok, used your fork.
But not better. Why is it missing that directory. Solution in the web is mostly to install raspberrypi-kernel-headers. Which is already installed. |
can you try to compile as the superuser (after |
if you can, also test after changing Makefile line 1923 with |
mhm something interesting...
exists. but uname -r returns so my modules are newer than the running kernel? I'll reboot... |
wohoo reboot... now "make" is doing something :) (I removed the folders which were created by getting kernel sources from that other link) my lession for today: and the driver is now present...
time to test the adapter again :) Next update: after calling
my adapter now switched to network device mode and yeeha: There it is:
There it is connected:
GREAT! MANY THANKS!! so your description here was the solution |
I tried sunzone93's solution on raspi CM3, it works! |
I seem to get near the end of sunzone's method and I get an error saying that it can't locate the 8821cu.ko file. Anyone else had this or know the fix? |
@AverageMaker please share your test environment |
I'm using a Raspberry Pi 3B+ with a clean (new) copy of the latest Raspberry Pi OS installed from a new NOOBS image (3.4.0). I'll need to check kernel versions when I get home. Nothing else is attached apart from keyboard and mouse. Using this RTL8811cu adapter: https://thepihut.com/products/raspberry-pi-dual-band-5ghz-2-4ghz-usb-wifi-adapter-with-antenna |
Also noticed that this is likely to do with the latest (20th Aug) Raspberry Pi OS version shipping with Linux kernel 5.4.51, whereas previously this was on 4.19.118. Since that kernel change the driver no longer works., I'm no expert on drivers and kernels - is this something that can easily be resolved? Do we need to wait for Realtek to release an updated driver or can we tweak the current driver to work with the newer Linux kernel? |
Yes. Currently the driver doesn't support the new kernel. |
|
I have changed the Makefile to build for RPI. Still I get error that "armv71" dir does not exist.
Adding "ARCH=arm" in front of the build command fixed this error, but introduces another compile error.
DKMS make.log for rtl8821CU-5.2.5.3 for kernel 4.14.98-v7+ (armv7l)
Sun 21 Apr 19:57:20 BST 2019
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.14.98-v7+/build M=/var/lib/dkms/rtl8821CU/5.2.5.3/build modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.98-v7+'
Makefile:646: arch/armv7l/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/armv7l/Makefile'. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.14.98-v7+'
Makefile:1923: recipe for target 'modules' failed
make: *** [modules] Error 2
DKMS make.log for rtl8821CU-5.2.5.3 for kernel 4.14.98-v7+ (armv7l)
Sun 21 Apr 19:59:56 BST 2019
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.98-v7+/build M=/var/lib/dkms/rtl8821CU/5.2.5.3/build modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.98-v7+'
CC [M] /var/lib/dkms/rtl8821CU/5.2.5.3/build/core/rtw_cmd.o
gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together
scripts/Makefile.build:326: recipe for target '/var/lib/dkms/rtl8821CU/5.2.5.3/build/core/rtw_cmd.o' failed
make[2]: *** [/var/lib/dkms/rtl8821CU/5.2.5.3/build/core/rtw_cmd.o] Error 1
Makefile:1535: recipe for target 'module/var/lib/dkms/rtl8821CU/5.2.5.3/build' failed
make[1]: *** [module/var/lib/dkms/rtl8821CU/5.2.5.3/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.98-v7+'
Makefile:1923: recipe for target 'modules' failed
make: *** [modules] Error 2
The text was updated successfully, but these errors were encountered: