Open mynameistony opened 9 years ago
Did you modify the Makefile? https://github.com/gnab/rtl8812au#building
I changed the following:
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
Are you doing a native (on the Pi) or cross (on a PC) compile?
Mine is failing, too:
$ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/3.12.35+/build M=/home/pi/rtl8812au modules
make[1]: Entering directory '/lib/modules/3.12.35+/build'
make[1]: *** No rule to make target 'modules'. Stop.
make[1]: Leaving directory '/lib/modules/3.12.35+/build'
Makefile:1051: recipe for target 'modules' failed
make: *** [modules] Error 2
I'm trying to build for the Raspberry Pi on the Raspberry Pi.
$ uname -a
Linux wardrivingpi 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l GNU/Linux
I'm probably just missing packages, but I'm not sure what I need to install beyond linux-headers-rpi
.
Strange... the directories with /lib/modules
on my installation have a different layout:
$ ls /lib/modules/3.12.35+/
kernel modules.alias.bin modules.builtin.bin modules.dep.bin modules.order modules.symbols
modules.alias modules.builtin modules.dep modules.devname modules.softdep modules.symbols.bin
$ ls -lah /lib/modules/3.12-1-rpi/
total 8.0K
drwxr-xr-x 2 root root 4.0K Jan 30 23:01 .
drwxr-xr-x 5 root root 4.0K Jan 30 23:01 ..
lrwxrwxrwx 1 root root 33 Jan 5 03:11 build -> /usr/src/linux-headers-3.12-1-rpi
lrwxrwxrwx 1 root root 36 Jan 5 03:11 source -> /usr/src/linux-headers-3.12-1-common
$ ls -lah /lib/modules/3.2.0-4-rpi/
total 8.0K
drwxr-xr-x 2 root root 4.0K Jan 30 22:29 .
drwxr-xr-x 5 root root 4.0K Jan 30 23:01 ..
lrwxrwxrwx 1 root root 34 Oct 19 2013 build -> /usr/src/linux-headers-3.2.0-4-rpi
lrwxrwxrwx 1 root root 37 Oct 19 2013 source -> /usr/src/linux-headers-3.2.0-4-common
I was able to get it compiled after installing and using the raspbian-packaged kernel installed via sudo apt-get install linux-image-rpi-rpfv linux-headers-rpi-rpfv
. This however installs what appears to be an older kernel, so I'm not sure if this is a tenable solution.
The chief problem seems to be that the Makefile for this driver relies on the Debian /lib/modules/$(uname -r)/build
directory, which isn't present OOTB on raspbian.
Aaaand it's working.
For my problem, just needs a clarification on what to install, or modification to the Makefile to account for the differences in how Raspbian ships its headers.
Got this compiled, but when I insert the built module, the kernel tanks. CPU load ramps up and I have to hard power cycle the RPi.
BTW, I'm on kernel 3.18.5+ and I used headers I got from http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/
Seems like there may be two different issues under discussion. I can't get past the "*\ No rule to make target 'modules'." failure. There looks to be a 'modules' target in the Makefile, but still.
Should have mentioned: Linux sdr 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux
Also... the KVER directory on my Pi appears to be '/lib/modules/3.18.7-v7', so getting it from 'uname -r' doesn't work. And then there's no /build in that folder. And then when I make one and try make again:
make ARCH=arm CROSS_COMPILE= -C /lib/modules/3.18.7-v7+/build M=/home/acb/rtl8812au-master modules make[1]: Entering directory '/lib/modules/3.18.7-v7+/build' make[1]: * No rule to make target 'modules'. Stop. make[1]: Leaving directory '/lib/modules/3.18.7-v7+/build' Makefile:1051: recipe for target 'modules' failed make: * [modules] Error 2
Confirmed. 4 years after...
pi@raspberrypi:~/rtl8812au $ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.9.59+/build M=/home/pi/rtl8812au modules
make[1]: *** /lib/modules/4.9.59+/build: No such file or directory. Stop.
Makefile:1064: recipe for target 'modules' failed
make: *** [modules] Error 2
PI is a PiZero W (ARM6).
pi@raspberrypi:~/rtl8812au $ uname -r
4.9.59+
EDIT: Yes, I did
sudo apt-get install raspberrypi-kernel-headers
Anybody?
Any updates on this issue?
Anybody?
Try
make ARCH="arm64"
@mbwmbw1337 - That fixed it for me; was able to compile on both Ubuntu Server 20.04 (which is 64-bit only) and Pi OS 64 bit beta on the Raspberry Pi 4. Thanks!
When trying build for the pi, the build fails with this output:
make ARCH=arm CROSS_COMPILE= -C /lib/modules/3.13.0-24-generic/build M=/home
/path/to/rtl8812au modules
make[1]: Entering directory
/usr/src/linux-headers-3.13.0-24-generic'CC [M] /path/to/rtl8812au/core/rtw_cmd.o
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mapcs’
gcc: error: unrecognized command line option ‘-mno-sched-prolog’
make[2]: *** [/path/to/rtl8812au/core/rtw_cmd.o] Error 1
make[1]: *** [_module_/path/to/rtl8812au] Error 2
make[1]: Leaving directory
/usr/src/linux-headers-3.13.0-24-generic'`make: *** [modules] Error 2