- Getting kernel sources:
mkdir src && cd src
git clone --depth 500 https://github.com/raspberrypi/linux.git
git clone --depth 15 https://github.com/raspberrypi/firmware.git
Link sources:
sudo ln -s /home/pi/src/linux /lib/modules/$(uname -r)/build
sudo ln -s /home/pi/src/linux/arch/arm /home/pi/src/linux/arch/armv6l
Preparing to compile modules:
zcat /proc/config.gz > /home/pi/linux/.config
make mrproper && make modules_prepare
cp /home/pi/src/firmware/extra/Module.symvers /home/pi/src/linux
Get drivers and compile:
git clone https://github.com/gnab/rtl8812au
cd rtl8812au/
*edit Makefile for raspberry*
make clean && make && make install
Insert fresh module:
insmod 8812au.ko
Compiling 8812au module on Raspberry Pi 2 and Raspbian
I've been trying for over a week to get the 8812au module compiled and installed on my Pi2 running 3.18.7-v7+ and just can't get it to work. It seems to compile ok, but when doing insmod I get "8812au: disagrees about version of symbol module_layout". I'm thinking i'm pulling the wrong version of the source but i'm not sure.. Here's the steps from my last attempt:
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I'm not sure what's wrong on your end, but I just did this so here's a rough summary of what I did.
Somewhere in there I also created and/or updated initramfs:
Code: Select all
cd ~
mkdir software && cd software
mkdir build && cd build
git clone https://github.com/raspberrypi/linux.git
cd linux
make mrproper
zcat /proc/config.gz > .config
make oldconfig
make menuconfig
sudo apt-get install libncurses5 libncurses5-dev
make menuconfig
make -j5
make modules
sudo make modules_install
Code: Select all
cd ~/software/build
git clone https://github.com/raspberrypi/tools.git
cd ~/software/build/linux/arch/arm/boot/
/home/ktb/software/build/tools/mkimage/mkknlimg zImage kernel7_new.img
sudo cp kernel7_new.img /boot/kernel-3.18.7-v7+.img
sudo nano /boot/config.txt
Code: Select all
...
kernel=kernel-3.18.7-v7+.img
...
Code: Select all
sudo reboot
Code: Select all
cd ~/software/build
git clone https://github.com/gnab/rtl8812au.git
cd rtl8812au
nano Makefile
Code: Select all
...
CONFIG_AUTOCFG_CP = n
CONFIG_MULTIDRV = n
CONFIG_RTL8192C = n
CONFIG_RTL8192D = n
CONFIG_RTL8723A = n
CONFIG_RTL8188E = n
CONFIG_RTL8812A = y
CONFIG_RTL8821A = y
CONFIG_RTL8192E = n
CONFIG_RTL8723B = n
CONFIG_USB_HCI = y
CONFIG_PCI_HCI = n
CONFIG_SDIO_HCI = n
CONFIG_GSPI_HCI = n
CONFIG_MP_INCLUDED = n
CONFIG_POWER_SAVING = n
CONFIG_USB_AUTOSUSPEND = n
CONFIG_HW_PWRP_DETECTION = n
CONFIG_WIFI_TEST = n
CONFIG_BT_COEXIST = n
CONFIG_RTL8192CU_REDEFINE_1X1 = n
CONFIG_INTEL_WIDI = n
CONFIG_WAPI_SUPPORT = n
CONFIG_EFUSE_CONFIG_FILE = n
CONFIG_EXT_CLK = n
CONFIG_FTP_PROTECT = n
CONFIG_WOWLAN = n
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_JB_X86 = n
CONFIG_PLATFORM_ARM_S3C2K4 = n
CONFIG_PLATFORM_ARM_PXA2XX = n
CONFIG_PLATFORM_ARM_S3C6K4 = n
CONFIG_PLATFORM_ARM_RPI = y
CONFIG_PLATFORM_MIPS_RMI = n
CONFIG_PLATFORM_RTD2880B = n
CONFIG_PLATFORM_MIPS_AR9132 = n
CONFIG_PLATFORM_RTK_DMP = n
CONFIG_PLATFORM_MIPS_PLM = n
CONFIG_PLATFORM_MSTAR389 = n
CONFIG_PLATFORM_MT53XX = n
CONFIG_PLATFORM_ARM_MX51_241H = n
CONFIG_PLATFORM_FS_MX61 = n
CONFIG_PLATFORM_ACTIONS_ATJ227X = n
CONFIG_PLATFORM_TEGRA3_CARDHU = n
CONFIG_PLATFORM_TEGRA4_DALMORE = n
CONFIG_PLATFORM_ARM_TCC8900 = n
CONFIG_PLATFORM_ARM_TCC8920 = n
CONFIG_PLATFORM_ARM_TCC8920_JB42 = n
CONFIG_PLATFORM_ARM_RK2818 = n
CONFIG_PLATFORM_ARM_URBETTER = n
CONFIG_PLATFORM_ARM_TI_PANDA = n
CONFIG_PLATFORM_MIPS_JZ4760 = n
CONFIG_PLATFORM_DMP_PHILIPS = n
CONFIG_PLATFORM_TI_DM365 = n
CONFIG_PLATFORM_MSTAR_TITANIA12 = n
CONFIG_PLATFORM_SZEBOOK = n
CONFIG_PLATFORM_ARM_SUNxI = n
CONFIG_PLATFORM_ARM_SUN6I = n
CONFIG_PLATFORM_ACTIONS_ATM702X = n
CONFIG_PLATFORM_ACTIONS_ATV5201 = n
CONFIG_DRVEXT_MODULE = n
...
Code: Select all
make
sudo cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless
sudo depmod
Code: Select all
update-initramfs -c -k `uname -r` -v
update-initramfs -u -k `uname -r` -v
Code: Select all
sudo nano /boot/config.txt
Code: Select all
...
kernel=kernel-3.18.7-v7+.img
initramfs initrd.img-3.18.7-v7+ followkernel
...
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
if i'm reading your process correctly, if looks like you rebuilt your kernel to get this to work. I was hoping to avoid that, but it may not be a choice I guess
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Yes. I'm sorry, I usually rebuild the kernel. It should be possible without, but I haven't done that in a while. What I posted is mostly just pulled from my .bash_history and I thought it might help.zolakk wrote:if i'm reading your process correctly, if looks like you rebuilt your kernel to get this to work. I was hoping to avoid that, but it may not be a choice I guess
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
No, thank you. It may not have been the easy solution I was looking for but it got me going and that's what matters 

Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Hello, I'm having the exact same issue. Trying to use Rasbian and Edimax EW-7811UTC, without success.
I'm a newbie in Linux and I didn't really understand your discussion.
I know that my current kernel is 3.18.7v7 and for some reason I didn't succeed to compile the 8812au.ko file.
Is this thread is intended for me too? Did you find any solution instead of rebuilding the kernel (which I don't really know how it would affect me).
Thanks
I'm a newbie in Linux and I didn't really understand your discussion.
I know that my current kernel is 3.18.7v7 and for some reason I didn't succeed to compile the 8812au.ko file.
Is this thread is intended for me too? Did you find any solution instead of rebuilding the kernel (which I don't really know how it would affect me).
Thanks
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I gave up on finding a solution that didn't involve recompiling the kernel, there doesn't seem to be much support for compiling driver modules with the stock kernel for some reason. It wasn't that hard, I just followed ktb's post line by line with the exception of doing the 'sudo apt-get install libncurses5 libncurses5-dev' first and needing to run 'sudo make -j5'. I didn't do the initramfs part either and everything seems to run just fine for me. If you're worried you can always pick up a spare SD card to test it out on.
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
For the past couple hours my raspberry pi is working by the order that ktb suggested. hope to get a good result!
is there any commands that I won't be able to use anymore (I heard that if I use update or something like that it'll return to the bad driver).
is there any commands that I won't be able to use anymore (I heard that if I use update or something like that it'll return to the bad driver).
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Well, you shouldn't do an rpi-update as that will replace your custom kernel and modules/drivers with the latest "bleeding-edge" version.
If you do apt-get [dist-]upgrade, it may want to install a later raspberrypi-bootloader package, which will replace your custom drivers with the current standard ones. You can get around that by holding the raspberrypi-bootloader package
That should prevent the package from being updated, but keep a watch out when you do any apt-get upgrades, just to check that neither that package or any other kernel-related packages are to be updated, and don't use the "-y" option to automatically accept the upgrades.
If you do apt-get [dist-]upgrade, it may want to install a later raspberrypi-bootloader package, which will replace your custom drivers with the current standard ones. You can get around that by holding the raspberrypi-bootloader package
Code: Select all
sudo apt-mark hold raspberrypi-bootloader
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
When I use this command:
This is the result that I have:
Code: Select all
pi@raspberrypi ~/software/build/linux/arch/arm/boot $ /home/pi/software/build/tools/mkimage/mkknlimg zImage kernel7_new.img
Code: Select all
* File 'zImage' not found
Usage: mkknlimg [--dtok] <vmlinux|zImage|bzImage> <outfile>
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
When you did the did you run it as like I suggested? That fixed it for me when I had that error. If you didn't, no worries, you can do it now and then try again. You may have to run the again too, as that may have failed if the main make didn't complete properly
Code: Select all
make -j5
Code: Select all
sudo make -j5
Code: Select all
sudo make modules_install
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I didn't succeed to do it yet. I've seen that when I used the command:
sudo zcat /proc/config.gz > .config
The result was:
bash: .config: Permission denied
Is there any way to fix this problem?
sudo zcat /proc/config.gz > .config
The result was:
bash: .config: Permission denied
Is there any way to fix this problem?
- DougieLawson
- Posts: 42641
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
sudo sh -c 'zcat /proc/config.gz > .config'
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I tried to run all of the commands again, still with the same problem:
command:
sudo /home/pi/software/build/tools/mkimage/mkknlimg zImage kernel7_new.img
result:
* File 'zImage' not found
Usage: mkknlimg [--dtok] <vmlinux|zImage|bzImage> <outfile>
(Used sudo in every stage)
command:
sudo /home/pi/software/build/tools/mkimage/mkknlimg zImage kernel7_new.img
result:
* File 'zImage' not found
Usage: mkknlimg [--dtok] <vmlinux|zImage|bzImage> <outfile>
(Used sudo in every stage)
-
- Posts: 1
- Joined: Fri Mar 13, 2015 10:54 am
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I am having the exact same problem, for kernel 3.18.7 on both RPI 1 and RPI 2. Could someone share the 8812au.ko file ?
I compiled it before on 3.12.28+ without any problems (on RPI 1). If anyone would like to have the compiled binary of this, just let me know.
I compiled it before on 3.12.28+ without any problems (on RPI 1). If anyone would like to have the compiled binary of this, just let me know.
-
- Posts: 2
- Joined: Sun Mar 15, 2015 2:33 pm
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I failed to compile the 8812au.ko driver on raspberry pi2, too.
I have compiled using the latest version 3.18.9-v7+ #767 SMP PREEMPT Sat Mar 7 21:52:35 GMT 2015 armv7l GNU/Linux
I changed the Makefile to compile on raspberry pi
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
I used Module7.symvers as Module.symvers because of the pi2 (BCM2709) which is an arm 7 architecture.
On insmod I get some syslogd message:
Has anyone an idea, what I have to change in configuration?
There are some differences in the .config file on 'make bcm2709_defconfig' and 'zcat /proc/config.gz >.config', but skipping the 'zcat ..' didn't change anything
I have compiled using the latest version 3.18.9-v7+ #767 SMP PREEMPT Sat Mar 7 21:52:35 GMT 2015 armv7l GNU/Linux
Code: Select all
umask 0
mkdir src
cd src
git clone --depth=1 https://github.com/raspberrypi/linux.git
git clone --depth=1 https://github.com/raspberrypi/firmware.git
git clone --depth=1 https://github.com/gnab/rtl8812au.git
sudo ln -s /home/pi/src/linux /lib/modules/`uname -r`/build
sudo ln -s /home/pi/src/linux /lib/modules/`uname -r`/source
cd linux
make clean
make bcm2709_defconfig
make modules_prepare
zcat /proc/config.gz >.config
cp ../firmware/extra/Module7.symvers Module.symvers
cd ../rtl8812au
vi Makefile
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
Code: Select all
make clean
make
sudo insmod 8812au.ko
On insmod I get some syslogd message:
Code: Select all
Message from syslogd@berry1 at Mar 15 14:53:09 ...
kernel:[ 2521.415542] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
kernel:[ 2521.514032] Process insmod (pid: 6241, stack limit = 0x95bc2238)
kernel:[ 2521.521240] Stack: (0x95bc3e88 to 0x95bc4000)
kernel:[ 2521.526808] 3e80: 7f1582e4 00007fff 8008d234 95bc2000 95bc3f34 bccc1000
kernel:[ 2521.537360] 3ea0: 00000000 95bc3f7c 95bc3f50 000015a9 bcdb1310 7f1582e4 95bc2008 7f158320
kernel:[ 2521.548013] 3ec0: 7f158448 00000000 95bc2000 808986ac 76d50000 ba7b96bc 0000046d 00000000
kernel:[ 2521.558756] 3ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
kernel:[ 2521.569519] 3f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000080 0016746d
kernel:[ 2521.580320] 3f20: 76bf7000 76ec9948 00000080 8000ed44 95bc2000 00000000 95bc3fa4 95bc3f48
kernel:[ 2521.591231] 3f40: 80090a4c 8008e968 bccc1000 0016746d bcdb0d48 bcdb0bc5 bce18948 000f0e48
kernel:[ 2521.602240] 3f60: 000fc728 00000000 00000000 00000000 00000025 00000026 0000001a 0000001e
kernel:[ 2521.613338] 3f80: 0000000e 00000000 00000000 7e81871c 00000000 77fc5030 00000000 95bc3fa8
kernel:[ 2521.624506] 3fa0: 8000eac0 8009096c 7e81871c 00000000 76bf7000 0016746d 76ec9948 76bf7000
kernel:[ 2521.635695] 3fc0: 7e81871c 00000000 77fc5030 00000080 77fc4f80 0016746d 76ec9948 00000000
kernel:[ 2521.646937] 3fe0: 00000000 7e8186c4 76ec0fb4 76e2bab4 60000010 76bf7000 0a4d524f 00000011
kernel:[ 2521.680410] Code: e51bc084 e15c0005 e2455008 0a000009 (e5953014)
There are some differences in the .config file on 'make bcm2709_defconfig' and 'zcat /proc/config.gz >.config', but skipping the 'zcat ..' didn't change anything
Kind Regards
Matthias Breuer, Cologne, Germany
Matthias Breuer, Cologne, Germany
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Hello, I still haven't succeeded to solve this issue.
I heard that there is an option to compile this module in a different linux machine (which uses Intel processor), and use the ko file in the RPI.
Any ideas how?
I heard that there is an option to compile this module in a different linux machine (which uses Intel processor), and use the ko file in the RPI.
Any ideas how?
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
http://www.raspberrypi.org/forums/viewt ... au#p721331
This worked for me, did the job without any rebuliding the kernel and that type of solutions.
This worked for me, did the job without any rebuliding the kernel and that type of solutions.

-
- Posts: 2
- Joined: Sun Mar 15, 2015 2:33 pm
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I solved the problem by crosscompiling.
My linux host is an ubuntu 14.04 server and I installed the cross compile toolchain according to the description on the raspberry pi page http://www.raspberrypi.org/documentatio ... uilding.md
1. installing the sources
change the rtl8812au/Makefile:
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
make destination dirs
mkdir arm
mkdir arm7
2.1 cross compile for raspberry pi2
8812au.ko for raspberry pi2 has 1441396 Bytes
2.2 crosscompile for raspberry pi1
8812au.ko for raspberry pi1 has 1468377 bytes
My linux host is an ubuntu 14.04 server and I installed the cross compile toolchain according to the description on the raspberry pi page http://www.raspberrypi.org/documentatio ... uilding.md
1. installing the sources
Code: Select all
git clone --depth=1 https://github.com/raspberrypi/linux.git
git clone --depth=1 https://github.com/raspberrypi/firmware.git
git clone --depth=1 https://github.com/gnab/rtl8812au.git
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
make destination dirs
mkdir arm
mkdir arm7
2.1 cross compile for raspberry pi2
Code: Select all
cd linux
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_prepare
cp ../firmware/extra/Module7.symvers Module.symvers
cd ../rtl8812au
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KSRC=../linux
cp 8812au.ko ../arm7
cd ..
2.2 crosscompile for raspberry pi1
Code: Select all
cd linux
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_prepare
cp ../firmware/extra/Module.symvers .
cd ../rtl8812au
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KSRC=../linux
cp 8812au.ko ../arm
cd ..
Kind Regards
Matthias Breuer, Cologne, Germany
Matthias Breuer, Cologne, Germany
-
- Posts: 10
- Joined: Tue Aug 13, 2013 5:24 pm
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Would it be possible to share the compiled package?
I just purchased an Alfa AWUS036AC
Thanks!
I just purchased an Alfa AWUS036AC
Thanks!
-
- Posts: 3
- Joined: Wed Mar 18, 2015 11:48 pm
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
I compiled this based on the 4.3.8 version of the driver, test it with insmod 8812au.kostefaanbolle wrote:Would it be possible to share the compiled package?
I just purchased an Alfa AWUS036AC
Thanks!
Works great with my Pi2:
3.18.9-v7+ #768 SMP PREEMPT Sun Mar 15 19:41:56 GMT 2015
With my Asus USB-AC56
https://www.dropbox.com/s/mkl4gm065ma9p ... au.ko?dl=0
-
- Posts: 4
- Joined: Mon Mar 23, 2015 11:32 am
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
HI MathewMatthiasBreuer wrote:I solved the problem by crosscompiling.
My linux host is an ubuntu 14.04 server and I installed the cross compile toolchain according to the description on the raspberry pi page http://www.raspberrypi.org/documentatio ... uilding.md
1. installing the sourceschange the rtl8812au/Makefile:Code: Select all
git clone --depth=1 https://github.com/raspberrypi/linux.git git clone --depth=1 https://github.com/raspberrypi/firmware.git git clone --depth=1 https://github.com/gnab/rtl8812au.git
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
make destination dirs
mkdir arm
mkdir arm7
2.1 cross compile for raspberry pi28812au.ko for raspberry pi2 has 1441396 BytesCode: Select all
cd linux make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_prepare cp ../firmware/extra/Module7.symvers Module.symvers cd ../rtl8812au make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KSRC=../linux cp 8812au.ko ../arm7 cd ..
2.2 crosscompile for raspberry pi18812au.ko for raspberry pi1 has 1468377 bytesCode: Select all
cd linux make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_prepare cp ../firmware/extra/Module.symvers . cd ../rtl8812au make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- clean make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KSRC=../linux cp 8812au.ko ../arm cd ..
I have been trying to do same. I followed all of the steps on my build server exactly as you mention above and built 8812au.ko (size 14,68,777). I am also using Ubuntu 14.04.1 LTS distribution package for cross compiling. I have raspberry model B board with raspberry debian wheezy package and created a samba share of home directory. In order to load compiled module on RPI, i did following steps:
1. cd /home/pi/
2. copy 8812au.ko
3.sudo insmod 8812au.ko
insmod returns with "Error: could not insert module 8812au.ko: Invalid module format". Could you also please tell if this module loading was successful on your RPI 1 board? if yes, then whats am missing.
I eventually want to create my own kernel driver and run it on RPI but having a hard time to make any module runnable on Pi. Any working solution will help. I have been struggling with this issues since 3 days and read all of the forums to find out what it needs to have a working development platform of my driver on Pi.
On Pi, i only have distribution package , do i need to download anything else?
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Hi !
first thanks for all this information !
I've spent about all evenings this week trying to figure out how to make work my DWA-171 USB adapter. By how to make work I mean compile it the first place.
I finally managed to compile it and make it run. I've uploaded a copy, feel free to download it from here: http://www.xphoto.ch/8812au.ko.gz
This is compiled and works on the following kernel version:
What I did it simply follow above instructions for CROSS-COMPILE from MatthiasBreuer and did it on a Debian Linux PC.
Compiling the whole thing on the PI2 never made it. Everytime I got a Kernel Panic when tried to do
Now it loads fine and shows in 'lsmod'
enjoy !
edit: This driver is compiled only for Pi2 module !
first thanks for all this information !


I've spent about all evenings this week trying to figure out how to make work my DWA-171 USB adapter. By how to make work I mean compile it the first place.
I finally managed to compile it and make it run. I've uploaded a copy, feel free to download it from here: http://www.xphoto.ch/8812au.ko.gz
This is compiled and works on the following kernel version:
Code: Select all
$ uname -avr
Linux raspberrypi 3.18.11-v7+ #776 SMP PREEMPT Mon Apr 6 13:19:43 BST 2015 armv7l GNU/Linux
Compiling the whole thing on the PI2 never made it. Everytime I got a Kernel Panic when tried to do
Code: Select all
sudo insmod 8812au.ko
Code: Select all
pi@raspberrypi ~/src/rtl8812au $ sudo insmod 8812au.ko
pi@raspberrypi ~/src/rtl8812au $ sudo lsmod
Module Size Used by
8812au 1077557 0
snd_bcm2835 18665 0
snd_pcm 73475 1 snd_bcm2835
snd_seq 53078 0
snd_seq_device 5628 1 snd_seq
snd_timer 17784 2 snd_pcm,snd_seq
snd 51038 5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
uio_pdrv_genirq 2958 0
uio 8119 1 uio_pdrv_genirq
edit: This driver is compiled only for Pi2 module !
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Hi xphoto,
Just downloaded your driver and I am amazed that I can now use my EW-7811UTC on my Pi 2B. Absolutely brilliant, thanks very much.
I am really surprised though that the driver when cross compiled on a PC works but when compiled on the Pi it causes the kernel to crash. I have been compiling several different drivers on the Pi, 8188eu, 8192eu, 8812au and mt7601 and generally they all work if compiled for the Pi 1 or Pi 2, but when using the 8812au driver with the EW-7811UTC it crashes when used on the Pi 2B. Compiling the driver for the Pi 1 and the EW-7811UTC works OK.
I am really interested to try and find out why the driver does not work on the Pi 2B when compiled on a Pi but is OK when cross compiled on a Linux PC because I do not have a PC with Linux and have to rely on my Pi to compile modules on.
Can you tell me the version of gcc is used on your Debian Linux PC? Did you need to apply any patches to the driver to get it to compile or did you get any errors when compiling?
Well done, guys, for finding a solution to the driver crashing the pi 2B. If anyone has any clue as to why it doesn't work when compiled on the PI I would be really interested to hear any suggestions.
MrEngman
PS. Just one issue. The driver is continually outputting a hugh amount of data to dmesg.
Just downloaded your driver and I am amazed that I can now use my EW-7811UTC on my Pi 2B. Absolutely brilliant, thanks very much.
I am really surprised though that the driver when cross compiled on a PC works but when compiled on the Pi it causes the kernel to crash. I have been compiling several different drivers on the Pi, 8188eu, 8192eu, 8812au and mt7601 and generally they all work if compiled for the Pi 1 or Pi 2, but when using the 8812au driver with the EW-7811UTC it crashes when used on the Pi 2B. Compiling the driver for the Pi 1 and the EW-7811UTC works OK.
I am really interested to try and find out why the driver does not work on the Pi 2B when compiled on a Pi but is OK when cross compiled on a Linux PC because I do not have a PC with Linux and have to rely on my Pi to compile modules on.
Can you tell me the version of gcc is used on your Debian Linux PC? Did you need to apply any patches to the driver to get it to compile or did you get any errors when compiling?
Well done, guys, for finding a solution to the driver crashing the pi 2B. If anyone has any clue as to why it doesn't work when compiled on the PI I would be really interested to hear any suggestions.
MrEngman
PS. Just one issue. The driver is continually outputting a hugh amount of data to dmesg.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Please post ALL technical questions on the forum. Please Do Not send private messages.
Please post ALL technical questions on the forum. Please Do Not send private messages.
Re: Compiling 8812au module on Raspberry Pi 2 and Raspbian
Hi MrEngman,
I've found this options to make good use to avoid all the log in the dmesg abou enter/quit power save mode. I've added this file to modprobe.d folder:
I've found this options to make good use to avoid all the log in the dmesg abou enter/quit power save mode. I've added this file to modprobe.d folder:
Code: Select all
more /etc/modprobe.d/8812au.conf
options 8812au rtw_power_mgnt=0
I didn't apply any patch (I think...) and i got a lot of warnings at some point but it went thru.gcc version 4.7.2 (Debian 4.7.2-5)