Author Topic: Compile driver for USB device on Igor's image 3.4.107-cubietruck #8 SMP PREEMPT  (Read 3504 times)

Offline Ireng

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Hi to all,

i tried unsuccessful to compile a driver for a WLAN USB device on Igor's image 3.4.107-cubietruck #8 SMP PREEMPT Thu May 14 18:53:36 CEST 2015 armv7l GNU/Linux

after issuing the make command in the directory of the driver files I received the following output and
errormessage:
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/3.4.107-cubietruck/build M=/home/rtl8812AU_8821AU_linux-master  modules
make[1]: Entering directory '/usr/src/linux-headers-3.4.107-cubietruck'
Makefile:567: /usr/src/linux-headers-3.4.107-cubietruck/arch/armv7l/Makefile: No such file or directory
make[1]: *** No rule to make target '/usr/src/linux-headers-3.4.107-cubietruck/arch/armv7l/Makefile'.  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-3.4.107-cubietruck'
Makefile:1040: recipe for target 'modules' failed
make: *** [modules] Error 2

What went wrong and how to fix it?

i checked by myself, the the directory armv7l does not exit at all!

Since this is the first time that i compile a driver, i appreciate your detailed instructions how to solve the issue!

In the meantime I investigated the issue further and would like to know how to compile the driver for the given ARM architecture ! But I still do not have a clue what went wrong!

Many thanks in Advance!

Regards, Ireng
« Last Edit: July 05, 2015, 07:37:04 am by Ireng »

Offline slovenia

  • Hero Member
  • *****
  • Posts: 500
  • Karma: +46/-0
    • View Profile
make ARCH=arm

not

make ARCH=armv7


and it will work.
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Offline Ireng

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Hi Igor,

thanks for your help!

It worked fine!


Still enjoy your vacation!

regards, Ireng

Offline Ireng

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Install + Compile driver for USB device on Igor's image 3.4.107
« Reply #3 on: July 06, 2015, 09:25:28 am »
After compiling the driver I want to install and get the hardware (ALFA AUWS036AC) to run.

Sofar I have not been succesfull with it.

Output from lsmod:
Module                  Size  Used by
lib80211                4886  0
cpufreq_userspace       3524  0
bridge                 76772  0
stp                     2032  1 bridge
llc                     5365  2 stp,bridge
8812au                943381  0
sg                     23765  0
bcmdhd                539724  0
sunxi_ir                4037  0
hidp                   17640  0
rfcomm                 58686  0
bt_gpio                 2741  0
wifi_gpio               6375  2 bcmdhd,bt_gpio
hci_uart               25000  0
bluetooth             264185  5 hidp,hci_uart,rfcomm


Output from /usr/sbin/hostapd -dd -B /etc/hostapd.conf:

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd.conf
nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 6 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x572898 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x572898 match=
nl80211: Enable Probe Request reporting nl_preq=0x572490
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x572490 match=
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
nl80211: Add own interface ifindex 8
nl80211: if_indices[16]: 8
nl80211: Add own interface ifindex 6
nl80211: if_indices[16]: 8 6
nl80211: Adding interface wlan0 into bridge br0
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Previous country code 00, new country code DE
Continue interface setup after channel list update
ctrl_iface not configured!


hostapd.conf contains the following configuration:

# Interface
interface=wlan0

# Bridge
bridge=br0

# Driver
#driver=hostap
driver=nl80211

#  Logging Options
logger_syslog=1
logger_syslog_level=0

# SSID
ssid="YYYYYYY"

#UTF-8 Coding for SSID
utf8_ssid=1

#Country Code
country_code=DE

#Enable ieee80211d
ieee80211d=1

# Hardware Mode
hw_mode=a

#TX Channel
channel=44

#Beacon Interval
beacon_int=100

#Enable WMM
wmm_enabled=1

# Enable 802.11ac
ieee80211ac=1

#Enable WPA
wpa=1


#WPA Passphrase
wpa_passphrase=XXXXXXXXXXXXXXXXX

#wpa_key_mgmt=WPA-PSK WPA-EAP

#wpa_pairwise=TKIP CCMP

#rsn_pairwise=CCMP
auth_algs=3
#noscan=1
#ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]


Could someone guide me to solve the situation successfully??
I really appreciate your help and  thanks for your support in advance!

Regards, Ireng
« Last Edit: July 06, 2015, 09:28:56 am by Ireng »

Offline slovenia

  • Hero Member
  • *****
  • Posts: 500
  • Karma: +46/-0
    • View Profile
Try with realtek hostapd - they are present on my image:

Code: [Select]
hostapd-rt /etc/hostapd.conf-rt
or build latest from source:
https://github.com/igorpecovnik/hostapd

p.s.
Thanks ;)
Debian and Ubuntu images with kernel 3.4.110, 4.3.3, 4.4
http://www.armbian.com

Offline Ireng

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Hi to All!

Currently i am using 3.4.107-cubietruck #14 SMP PREEMPT Wed Apr 29 11:57:42 CEST 2015 armv7l GNU/Linux including a WLAN USB Adapter AWUS036AC from ALFA.
First question: Does anybody got this adapter to work with a cubietruck as a WLAN-AP?
Second question: If yes, what driver did you use for the successful implementation?

I want to use it as a 5GHZ (AC-standard) WLAN-AP!

Many thanks in advance.
Regards, Ireng