Jump to content

[Odroid C2] Can not build Wireless Driver


gahabana

Recommended Posts

hi, 

    I installed latest Armbian (Debian/Jessia) as well as built Xenial Ubuntu (5.20 kernel 3.14.79 in both cases). Board is Odroid-C2.

    As i have a Wifi USB - TP-Link TL-WN823N I need to build a driver for it as it is not included in kernel.

    Found instructions at Armbian documentation: http://docs.armbian.com/User-Guide_Advanced-Features/#how-to-build-a-wireless-driver but after starting with make ARCH=arm64 it fails with error that ... xen.h is missing.

 

 

    Does anyone have recipe for success ?

 

Below is failure log on Debian-Jesse (exactly same issue on Xenial-Ubuntu).

Tx in advance !!!

root@odroidc2:/home/zh/rtl8192cu-fixes# make ARCH=arm64
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/3.14.79-odroidc2/build M=/home/zh/rtl8192cu-fixes  modules
make[1]: Entering directory '/usr/src/linux-headers-3.14.79-odroidc2'
  CC [M]  /home/zh/rtl8192cu-fixes/core/rtw_cmd.o
In file included from /usr/src/linux-headers-3.14.79-odroidc2/arch/arm64/include/asm/dma-mapping.h:27:0,
                 from include/linux/dma-mapping.h:76,
                 from include/linux/skbuff.h:33,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:16,
                 from include/linux/netdevice.h:42,
                 from /home/zh/rtl8192cu-fixes/include/osdep_service.h:765,
                 from /home/zh/rtl8192cu-fixes/core/rtw_cmd.c:23:
/usr/src/linux-headers-3.14.79-odroidc2/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>
                                                  ^
compilation terminated.
scripts/Makefile.build:308: recipe for target '/home/zh/rtl8192cu-fixes/core/rtw_cmd.o' failed
make[2]: *** [/home/zh/rtl8192cu-fixes/core/rtw_cmd.o] Error 1
Makefile:1278: recipe for target '_module_/home/zh/rtl8192cu-fixes' failed
make[1]: *** [_module_/home/zh/rtl8192cu-fixes] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.14.79-odroidc2'
Makefile:584: recipe for target 'modules' failed
make: *** [modules] Error 2
Link to comment
Share on other sites

Some files appear to be missing in kernel headers package. This should be fixed in new release.

hi - that is awesome - by new release do you mean 5.21 ? Any idea how long that would take ? ... week, month ?

Sadly, Armbian is the only tool to build proper working Linux system :) either Debian or Ubuntu !

 

thank you !

Link to comment
Share on other sites

@Zador - you are HERO !!! :)

yes, that did the trick ! I managed to compile the driver successfully after that (it did not work as i have v2 of TP-Link TL-WN823N) which is 8912eu not 8192cu). Found several versions on github for 8192eu ... couldn't compile any of them due to missing include (error on implicit declaration of ipv6 checksum) - (probably because kernel is bit old - 3.14.xx ). Anyhow, for anyone googling - solution is 2-fold:

1. edit core/rtw_br_ext.c (thats where compile error happens)

2. around line 51 where it says #include <net/checksum.h>  ... add line below that which says: #include <net/ip6_checksum.h>

3. compile will finish now (make ARCH=arm64)

4. sudo make install 

Second issue i had then was that interface was not called 'wlan0' but 'esxAABBCCDDEEFF0123' which is esx+mac-address of wifi adapter.

Not sure if there is CLEAN way around this ... after some googling i had to add these 2 lines to the file /etc/udev/rules.d/10-network.rules (had to create the file):

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="18:a6:f7:18:61:42", NAME="wlan0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="18:a6:f7:18:61:42",KERNEL=="enx18a6f7186142", NAME="wlan0"
Lastly, of course, in  '/etc/network/interfaces' i uncommented lines for wlan0 interface and changed SSID and passcode.
 
@Zador, 2 quick questions:
1. saw couple of minutes ago that there is new update: linux-headers-odroidc2 (ubuntu is what i used as armbian build). Is that the same thing you shared via dropbox in the post above ? if yes -  :)
2. is there anything you'd recommend to get in a more standardized way to 'wlan0' name for the wireless interface ?
 
Thanks again !!!
Link to comment
Share on other sites

@Zador, 2 quick questions:

1. saw couple of minutes ago that there is new update: linux-headers-odroidc2 (ubuntu is what i used as armbian build). Is that the same thing you shared via dropbox in the post above ? if yes -  :)
2. is there anything you'd recommend to get in a more standardized way to 'wlan0' name for the wireless interface ?

1. No, this is a bug with repository priority, it will try to install kernel headers that you had before that, but it shouldn't matter if you already compiled all necessary drivers.

2. Ubuntu Xenial, right? Unique names for USB network adapters are slowly implemented on all distributions, in any case udev rule is the right way to go if you want to keep the name short

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines