LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 10-06-2017, 02:26 PM   #1
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 239

Rep: Reputation: 20
Question 8812au driver on raspi 2


Dear all,

I got a Realtek RTL8812AU 802.11a/b/g/n/ac WLAN Adapter but I'm not able to compile the module provided in the cdrom.

The platform type is not in the Makefile list.
When I try to build it from sources I get from github the compilation crash because the 'build' folder doesn't exist.

I'm wondering if anyone has successfully built and used this module.

Thank you.
 
Old 10-06-2017, 05:25 PM   #2
petelq
Member
 
Registered: Aug 2008
Location: UK
Distribution: openSUSE(Leap and Tumbleweed) and, at the moment, leap 15 alpha
Posts: 233

Rep: Reputation: Disabled
I'm sure you'll find a workable driver to compile on github. Search "github rtl8812au raspberry pi" or something similar.
 
Old 10-06-2017, 05:50 PM   #3
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 239

Original Poster
Rep: Reputation: 20
I git cloned https://github.com/zebulon2/rtl8812au-driver-5.2.9

then did a make,make install

But modprobe returns:
Quote:
modprobe -v 8812au
insmod /lib/modules/4.9.50-v7+/kernel/drivers/net/wireless/8812au.ko
modprobe: ERROR: could not insert '8812au': Exec format error
I checked dmesg
Quote:
8812au: disagrees about version of symbol module_layout
Any idea about what's going wrong here ?
 
Old 10-06-2017, 09:57 PM   #4
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware x86 & ARM
Posts: 135

Rep: Reputation: 42
@aihaike

I suppose you're running the kernel from Raspbian on your Pi2. The issue you came across trying to load the module you've just compiled:
Quote:
8812au: disagrees about version of symbol module_layout
is caused by the fact that the kernel is compiled with CONFIG_MODVERSIONS set and the module symbols from your driver are different from the ones in the other (depending) kernel modules/kernel. This CONFIG_MODVERSIONS option was introduced in the kernel some time ago for consistency checking of the loadable modules and it was meant to be used optionally and only on productions systems (where you wouldn't let anyone play around / tamper / taint with the kernel ). Nowadays it is enabled by default in all kernel compilations, I'm still asking myself why, and it is a BIG (to be read catastrophic) pain in the A$$!
https://www.kernel.org/doc/Documenta...ld/modules.txt

Your only option is to get at least the kernel headers corresponding to your kernel from Raspbian, which includes the Module.symvers file and try to compile your module in the kernel headers tree. Theoretically. In practice, although a lot of people are showing off that they have their own "magic" scripts for doing that, I've never seen one actually posting some of those scripts, nor explaining how they achieve it through compiler/environmental variables.
Recently I was in the same situation like yours and found out that not even the "gurus" could have helped me and I had to recompile the whole kernel for a simple driver (I was registered as geronimo):
https://discourse.osmc.tv/t/kernel-d...-2-hd-ci/38459

Under Slack ARM there is no way you can get the kernel headers / kernel source from Raspbian and your only alternative is to get them directly under a running Raspbian - check the following post for the how-to (I was justme123 - before they banned me ):
https://www.raspberrypi.org/forums/v...me123#p1156462

Since the kernel version is not something the folks at Raspberry really care about, you need to check your actual running kernel version with uname -a under Slackware and then guess which Raspbian Image came with it... or maybe you remember what release you have used in the first place:
https://downloads.raspberrypi.org/ra...ease_notes.txt

Raspbian Images Repository:
https://downloads.raspberrypi.org/raspbian/images/
or Raspbian Lite Images Repository:
https://downloads.raspberrypi.org/raspbian_lite/images/

My advice will be to compile your driver directly under Raspbian and then move the compiled ko to your Slackware like I was documenting in this post:
https://www.linuxquestions.org/quest...8/#post5750237
You haven't specified what Slack ARM version you run on (14.2 / current), nor the kernel version. You should pay attention at the ending of your running kernel - if it's armv6 or armv7 - for example 4.4.50+ for armv6 and 4.4.50-v7+ for armv7 and not mix them, that's stay on the same kernel version on both Raspbian / Slack.
Personally, I'm also compiling a patched DVB-S2 driver file directly under Slackware with only having the kernel headers available, but I'm using (hacking) the media_build script and just substituting the original source file with my patched one. If you're into such an approach, then you'll need the kernel .config file and to not forget to prepare the kernel headers first.
- to get the .config file from your running kernel run the following:
Code:
modprobe configs
cp /proc/config.gz /usr/src/linux-headers-VERSION
rmmod configs
cd /usr/src/linux-headers-VERSION
gunzip config.gz
- VERSION should be completed with your actual version
- then prepare the kernel headers
Code:
cd /usr/src/linux-headers-VERSION
make -j 4 oldconfig && make -j 4 prepare
make -j 4 modules_prepare
... finally build your driver in a way that it reads/respects the Module.symvers

Last edited by abga; 10-07-2017 at 01:53 PM. Reason: kernel diffs armv6 - armv7
 
1 members found this post helpful.
Old 10-07-2017, 08:13 AM   #5
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 239

Original Poster
Rep: Reputation: 20
Thank you abga for your reply,

That's not a good news though.
I'll try to compile on a friend's raspian.

Why is this module so complicated to build?

Thanks again.
 
Old 10-07-2017, 06:49 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,987

Rep: Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217
Excellent reply.
I recently built 8814au on x86_64 (I have no need for it on ARM), but this might become a PITA. It looks like it will need a rebuild again for 4.11.
 
Old 10-16-2017, 11:59 AM   #7
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,168
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Question

Other than that, the sources seem to requiure a tweak in the Makefile and a few others (did a superficial read across the net).

Final outcome?

Ordered an Atheros b/g/n Dongle instead :/
 
Old 11-24-2017, 02:41 PM   #8
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 239

Original Poster
Rep: Reputation: 20
Unhappy

Hey SCerovec,

I finally gave up.
 
Old 11-25-2017, 02:37 AM   #9
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,168
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
By buying an Atheros dongle like me?
 
Old 11-26-2017, 08:18 AM   #10
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 239

Original Poster
Rep: Reputation: 20
No, using Power-line communication (PLC)
 
Old 11-27-2017, 01:59 PM   #11
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware x86 & ARM
Posts: 135

Rep: Reputation: 42
@aihaike
I thought it's easier to compile a driver module (8812au in your case) under Debian (Raspbian), that's why I've advised you to do so.
With all their convenient/aiding automation and scripting it doesn't look to work after all:
https://www.raspberrypi.org/forums/v...?f=29&t=101920
 
Old 11-28-2017, 04:08 PM   #12
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,168
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
The current state of wireless brings me back into the era of ACX100 and reign supreme of Prism and Intersil.

Some chipsets received more love than the others and just are worth a purchase.

There was a time when "just anyone" was safe to buy, but I'm afraid that time is over (for a while at least)?
 
Old 12-01-2017, 08:26 PM   #13
stormtracknole
Member
 
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 969

Rep: Reputation: 125Reputation: 125
These are the steps that I took on my Raspberry Pi 3. It *should* work on 2. First, ensure that you have the latest kernel loaded (run rpi-update). Reboot if necessary to boot the latest kernel.

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
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
cd $HOME
git clone https://github.com/diederikdehaas/rtl8812AU.git
cd rtl8812AU
make
make install <-- as root
I'm not sure if setting the value "KERNEL=kernel7" is needed. Also, not sure if downloaded Module.symvers is needed either. Those were the suggested steps on another website. Try it without it first and see. I bought this usb dongle from amazon and I can confirm that it works with hostapd with 5GHz.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Realtek 8812au Nille_kungen Slackware 7 09-24-2017 06:03 PM
LXer: Raspi-Sump LXer Syndicated Linux News 0 12-18-2014 02:41 AM
LXer: RasPi issue 2 out now! LXer Syndicated Linux News 0 09-05-2014 10:00 AM
[SOLVED] Headless RasPi boot conflict sansprecept Linux - Embedded & Single-board computer 4 03-31-2014 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 03:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration