I am trying to install a driver for a wireless adapter I have.

I am using amped-wireless-aca1-linux driver on github.

Hoping it should work on a raspberry pi as well.

I get the following error when trying to build it

make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.4.13-v7+/build     M=/home/pi/rtl8812au  modules
make[1]: *** /lib/modules/4.4.13-v7+/build: No such file or directory.      Stop.
Makefile:1052: recipe for target 'modules' failed
make: *** [modules] Error 2

I figured, oh, maybe some part of the raspberry pi doesn't make this compatible. So, I then tried rtl8812au driver. Same error. Even with the flag active here

I am not sure how I suppose to build the specific module for the wireless adapter. I have done update, upgrade and rpi-update

The directory of /lib/modules/4.4.13-v7+/ contains

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

It is obviously looking for a build directory, but in the /lib/modules/4.4.13-v7+/ there is no indication one can be built. So, either something needs to be added or it is done elsewhere independently.

  • sorry not enough rep for links.

5 Answers 5


To build this module from source, I did the following on my RPI2.

Install build tools:

# apt install build-essential bc git wget

Get kernel source code

# cd /usr/src
# git clone --depth 1 https://github.com/raspberrypi/linux.git
# ln -s linux $(uname -r)
# ln -s /usr/src/linux /lib/modules/$(uname -r)/build

Prepare linux build headers

# cd linux
# wget -O Module.symvers https://raw.githubusercontent.com/raspberrypi/firmware/master/extra/Module7.symvers
# KERNEL=kernel7
# make bcm2709_defconfig
# make prepare
# make modules_prepare

Download driver and build, (replace the module with the one you want build)

# cd ~
# git clone https://github.com/gnab/rtl8812au.git
# cd rtl8812au
# KERNEL=kernel7
# make


# make install

NOTE: the above should work for RPI2/3, check here for the KERNEL and Module.symvers file. BTW: I've build this ko on RPI2 on 4.4.13-v7+, you can download it from my dropbox

  • This worked. Thank you very much. I am also trying to get this driver to build as well. It uses a modified version of rtl8812au. I did exactly the same thing and made the make file compatible with RPI using this. I am still having errors building it for this specific driver.
    – DKJ
    Commented Jun 24, 2016 at 20:10
  • I get this error. I change the makefile to make it go into the correct directory and I get even more errors. So, that possibility isn't the correct approach, to manual rewire the paths.
    – DKJ
    Commented Jun 24, 2016 at 20:20
  • Error when I modify Makefile with new path.
    – DKJ
    Commented Jun 24, 2016 at 20:27
  • @DKJ the first error looks like arm-linux-gnueabi-gcc is not in your PATH, I am not cross compiling it. Doing this on RP2 only takes few minutes. The second error just you are not using the right path.
    – Mayli
    Commented Jun 24, 2016 at 23:48

I have followed this and a few other pages to install the usb wifi device (RTL8821AU/RTL8812AU) - the right method is documented by MrEngman on https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=66499&start=175. Go all the way to page 8 for the correct link since the dropbox link expired. I pasted the steps below. It takes 1 minutes to see wifi alive (ifconfig), whereas all other solutions consumed me 2+ days in vain (ex : installing many packages and updating all the libraries). My USB has ID 0bda:a811 Realtek Semiconductor Corp with > lsusb command.

  1. sudo wget http://www.fars-robotics.net/install-wifi -O /usr/bin/install-wifi
  2. sudo chmod +x /usr/bin/install-wifi

  3. sudo install-wifi -h (remove -h to run the installation)


In Makefile you must edit line:








This will enable configuration for Raspberry Pi. Also you need to install kernel-headers:

sudo apt-get install raspberrypi-kernel-headers
  • I did this and still get the following error: make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.4.13-v7+/build M=/home/pi/rtl8812au modules make[1]: *** /lib/modules/4.4.13-v7+/build: No such file or directory. Stop. Makefile:1052: recipe for target 'modules' failed make: *** [modules] Error 2
    – DKJ
    Commented Jun 23, 2016 at 17:22
  • Check my edit about installing kernel headers.
    – Huczu
    Commented Jun 23, 2016 at 19:42
  • currently doing it now. takes a while. Will edit with more news.
    – DKJ
    Commented Jun 23, 2016 at 20:47
  • I installed the kernel headers. I still get the same error. It wants the build directory, but nothing in libs/modules/... shows anything to build one.
    – DKJ
    Commented Jun 23, 2016 at 21:21

That procedure works for me.

1) Update your raspberry pi

sudo apt full-upgrade

2) Restart your system

sudo reboot

3) Get the firmware from this repo

sudo git clone https://github.com/gnab/rtl8812au.git

4)Modify the Make file according to with your system

sudo nano Makefile



5) Compile

sudo make

6) Installing

sudo cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless

Does the driver have a cmake? .It may have cmakelist file. Try this, create a build directory then on command prompt go to the build directory and type "cmake .." without the quotes. Then type make.

  • There is no cmake related files when I download the driver.
    – DKJ
    Commented Jun 23, 2016 at 17:53

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.