Jump to content
  • 0

rebuild rtl8189es from GIT for OPI+


y52

Question

The built-in WIFI module doesn't switch to monitor mode. This makes me looking for rebuilding the module from the Git repository: https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a

 

I am stuck with the following error: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'. What is necessary to rebuild and replace the module with a new one?

 

Here is what was done so far:

root@orangepiplus:/usr/src/rtl8189ES_linux# uname -a Linux orangepiplus 3.4.110-sun8i #18 SMP PREEMPT Tue Mar 8 20:03:32 CET 2016 armv7l GNU/Linux

root@orangepiplus:/usr/src/rtl8189ES_linux# dmesg |grep 8189 [ 3.923104] RTL871X: rtl8189es v4.3.0.4_11916.20140724_COB [ 3.923090] RTL871X: module init start [ 3.923104] RTL871X: rtl8189es v4.3.0.4_11916.20140724_COB [ 3.923112] RTL871X: build time: Mar 8 2016 20:02:27 root@orangepiplus:~# lsmod Module Size Used by 8189es 896688 0

root@orangepiplus:~# rmmod 8189es

root@orangepiplus:/usr/src/rtl8189ES_linux# ls -al /lib/modules/`uname -r`/ lrwxrwxrwx 1 root root 36 Mar 8 20:03 build -> /usr/src/linux-headers-3.4.110-sun8i

 

root@orangepiplus:/usr/src# svn ls https://github.com/rdm-dev/rtl8189ES_linux/trunk

Kconfig
Makefile
clean
core/
hal/
ifcfg-wlan0
import-update.sh
include/
os_dep/
platform/
runwpa
wlan0dhcp

 

 

root@orangepiplus:/usr/src# svn export https://github.com/rdm-dev/rtl8189ES_linux/trunk

 

A trunk A trunk/Kconfig A trunk/Makefile A trunk/clean A trunk/core A trunk/core/efuse A trunk/core/efuse/rtw_efuse.c A trunk/core/rtw_ap.c A trunk/hal/efuse A trunk/hal/efuse/efuse_mask.h A trunk/hal/efuse/rtl8188e A trunk/hal/efuse/rtl8188e/HalEfuseMask8188E_PCIE.c A trunk/hal/efuse/rtl8188e/HalEfuseMask8188E_PCIE.h A trunk/hal/phydm/rtl8188e/hal8188ereg.h A trunk/runwpa A trunk/wlan0dhcp Exported revision 6.

 

root@orangepiplus:/usr/src# mv trunk rtl8189ES_linux

 

root@orangepiplus:/usr/src# ls -al rtl8189ES_linux

total 112 drwxr-xr-x 7 root root 4096 Apr 2 19:28 . drwxr-xr-x 11 root root 4096 Apr 2 19:30 .. -rw-r--r-- 1 root root 64 Oct 6 21:21 clean drwxr-xr-x 3 root root 4096 Apr 2 19:28 core drwxr-xr-x 8 root root 4096 Apr 2 19:28 hal -rw-r--r-- 1 root root 54 Oct 6 21:21 ifcfg-wlan0 -rwxr-xr-x 1 root root 496 Oct 6 21:21 import-update.sh drwxr-xr-x 4 root root 12288 Apr 2 19:28 include -rw-r--r-- 1 root root 110 Oct 6 21:21 Kconfig -rwxr-xr-x 1 root root 51507 Oct 6 21:21 Makefile drwxr-xr-x 3 root root 4096 Apr 2 19:28 os_dep drwxr-xr-x 2 root root 4096 Apr 2 19:28 platform -rw-r--r-- 1 root root 423 Oct 6 21:21 runwpa -rw-r--r-- 1 root root 294 Oct 6 21:21 wlan0dhcp

 

cd /usr/src/rtl8189ES_linux

 

root@orangepiplus:/usr/src/rtl8189ES_linux# make -C /lib/modules/`uname -r`/build

 

make: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
make[1]: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'.  Stop.
/usr/src/linux-headers-3.4.110-sun8i/arch/arm/Makefile:278: recipe for target 'archprepare' failed
make: *** [archprepare] Error 2
make: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
 

Link to comment
Share on other sites

Recommended Posts

Donate your old hardware to community. Start a giveaway Raffle!

  • 0

@jernej

 

Yes, I see the changes now:

https://github.com/jernejsk/OpenELEC-OPi2/blob/openelec-7.0/packages/linux-drivers/RTL8189ES/patches/RTL8189ES-000-change-build-settings.patch

 

-CONFIG_WIFI_MONITOR = n
+CONFIG_WIFI_MONITOR = y
 

I dumped the latest Armbian 5.14 to TF card and the new driver is already in:

 

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# lsmod
Module                  Size  Used by
8189es               1076034  0
root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# modinfo 8189es
filename:       /lib/modules/3.4.112-sun8i/kernel/drivers/net/wireless/rtl8189ES_linux/8189es.ko
version:        v4.3.18.1_15373.20151005

 

and it reports capable of monitor mode:

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# iw list
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * monitor
                 * P2P-client
                 * P2P-GO

 

And I have found part of the puzzle of the reason it was unable to switch to monitor mode. It appears, that default installation doesn't bring up the wlan0. #ifconfig doesn't show it up.

 

So it gives:

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# iwconfig wlan0 mode monitor
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Operation not permitted.

 

Once it is brought up:

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# ip link set wlan0 up

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# ifconfig

shows the   wlan0     Link encap:Ethernet  HWaddr 58:63:

 

And it is possible now switching it to a different mode:

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# iwconfig wlan0 mode monitor

 

Anyway, it doesn't work correctly.

 

 [!] no wireless interfaces were found.
 [!] you need to plug in a wifi device or install drivers.

 

I created mon0 manually :

root@orangepiplus:~# iw phy phy0 interface add mon0 type monitor

but again, no wireless network could be found:

root@orangepiplus:~# airodump-ng mon0 start

 CH  9 ][ Elapsed: 28 s ][ 2016-06-05 21:58                                         
 BSSID              PWR  Beacons    #Data, #/s  CH  MB   ENC  CIPHER AUTH ESSID

empty list

 

It doesn't run either with

root@orangepiplus:~#  ip link set mon0 up

Link to comment
Share on other sites

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