1

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.
DKJ
  • 13
  • 1
  • 2
  • 5

5 Answers5

4

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

Install

# 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

Mayli
  • 156
  • 2
  • 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 Jun 24 '16 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 Jun 24 '16 at 20:20
  • Error when I modify Makefile with new path. – DKJ Jun 24 '16 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 Jun 24 '16 at 23:48
1

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)

VictorL
  • 111
  • 1
0

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

CONFIG_PLATFORM_I386_PC = n

CONFIG_PLATFORM_ARM_RPI = y

5) Compile

sudo make

6) Installing

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

In Makefile you must edit line:

CONFIG_PLATFORM_ARM_RPI = n

to:

CONFIG_PLATFORM_ARM_RPI = y

and

CONFIG_PLATFORM_I386_PC = y

to:

CONFIG_PLATFORM_I386_PC = n

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

sudo apt-get install raspberrypi-kernel-headers
Huczu
  • 1,251
  • 9
  • 13
  • 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 Jun 23 '16 at 17:22
  • Check my edit about installing kernel headers. – Huczu Jun 23 '16 at 19:42
  • currently doing it now. takes a while. Will edit with more news. – DKJ Jun 23 '16 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 Jun 23 '16 at 21:21
-1

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.