please choosego to mobile | Continue to access the PC version
Author: y52

Kali 2 @ H3 boards doesn't switch to monitor mode

[Copy link]

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-14 04:30:36 | Show all floors
Tkaiser @ armbian tipped the solution, although the grain of salt is discovered after the drive is built.
Could the "kernel tainted" be resolved?

root@orangepiplus:~# cd /usr/src/linux-headers-$(uname -r)
root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i# make scripts
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i#



root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i# cd /usr/src/rtl8189ES_linux/
root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-3.4.110-sun8i

make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-headers-3.4.110-sun8i M=/usr/src/rtl8189ES_linux  
modules
make[1]: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/rtl8189ES_linux/8189es.mod.o
  LD [M]  /usr/src/rtl8189ES_linux/8189es.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
root@orangepiplus:/usr/src/rtl8189ES_linux#

root@orangepiplus:/usr/src/rtl8189ES_linux# find / -regextype posix-egrep -regex ".*8189.*\.(ko)$"
/usr/src/rtl8189ES_linux/8189es.ko
/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8189es/8189es.ko



root@orangepiplus:/usr/src/rtl8189ES_linux# ls -al /usr/src/rtl8189ES_linux/8189es.ko /lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8189es/8189es.ko
-rw-r--r-- 1 root root 1210099 Mar  8 20:03 /lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8189es/8189es.ko
-rw-r--r-- 1 root root 1706532 Apr 13 22:14 /usr/src/rtl8189ES_linux/8189es.ko




root@orangepiplus:/usr/src/rtl8189ES_linux# lsmod
Module                  Size  Used by
8189es                896688  0
root@orangepiplus:/usr/src/rtl8189ES_linux# rmmod 8189es

root@orangepiplus:/usr/src/rtl8189ES_linux# lsmod
Module                  Size  Used by


root@orangepiplus:/usr/src/rtl8189ES_linux# insmod 8189es.ko
insmod: ERROR: could not insert module 8189es.ko: Invalid module format

Apr 13 22:19:00 localhost kernel: [ 6997.745433] 8189es: module_layout: kernel tainted.
Apr 13 22:19:00 localhost kernel: [ 6997.745469] Disabling lock debugging due to kernel taint

#dmesg


[ 6997.745433] 8189es: module_layout: kernel tainted.
[ 6997.745469] Disabling lock debugging due to kernel taint
[ 6997.745564] 8189es: version magic '3.4.110 mod_unload ARMv7 p2v8 ' should be '3.4.110-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 '
root@orangepiplus:~#

4

threads

1118

posts

9489

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9489
Published in 2016-4-15 21:43:18 | Show all floors
Could you provide output of this:
  1. file 8189es.ko
  2. modinfo 8189es.ko
Copy code


"kernel tainted" is usually harmless, check this http://unix.stackexchange.com/qu ... is-a-tainted-kernel

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-16 05:15:33 | Show all floors
The "kernel tainted" is  harmless, but I can't load the driver.
Any ideas?

root@orangepiplus:~# cd /usr/src/rtl8189ES_linux/
root@orangepiplus:/usr/src/rtl8189ES_linux# ls -al
-rw-r--r--  1 root root 1706532 Apr 13 22:14 8189es.ko

root@orangepiplus:/usr/src/rtl8189ES_linux# file 8189es.ko
8189es.ko: ELF 32-bit LSB relocatable, ARM, version 1, BuildID[sha1]=a5cfb8464d5666a2556a7bf7f89532ca121d4dff, not stripped


root@orangepiplus:/usr/src/rtl8189ES_linux# modinfo 8189es.ko
filename:       /usr/src/rtl8189ES_linux/8189es.ko
version:        v4.3.18.1_15373.20151005
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     C5DDC3DBBA8AB579D910935
alias:          sdio:c*v024Cd8179*
depends:        
vermagic:       3.4.110 mod_unload ARMv7 p2v8
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           rtw_usb_rxagg_mode:int
parm:           rtw_qos_opt_enable:int
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)
parm:           rtw_initmac:charp
parm:           rtw_channel_plan:int
parm:           rtw_special_rf_path:int
parm:           rtw_chip_version:int
parm:           rtw_rfintfs:int
parm:           rtw_lbkmode:int
parm:           rtw_network_mode:int
parm:           rtw_channel:int
parm:           rtw_mp_mode:int
parm:           rtw_wmm_enable:int
parm:           rtw_vrtl_carrier_sense:int
parm:           rtw_vcs_type:int
parm:           rtw_busy_thresh:int
parm:           rtw_ht_enable:int
parm:           rtw_bw_mode:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_ampdu_amsdu:int
parm:           rtw_lowrate_two_xmit:int
parm:           rtw_rf_config:int
parm:           rtw_power_mgnt:int
parm:           rtw_smart_ps:int
parm:           rtw_low_power:int
parm:           rtw_wifi_spec:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_antdiv_type:int
parm:           rtw_switch_usb3:int
parm:           rtw_enusbss:int
parm:           rtw_hwpdn_mode:int
parm:           rtw_hwpwrp_detect:int
parm:           rtw_hw_wps_pbc:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_fw_iol:FW IOL. 0isable, 1:enable, 2:by usb speed (int)
parm:           rtw_mc2u_disable:int
parm:           rtw_80211d:Enable 802.11d mechanism (int)
parm:           rtw_notch_filter:0isable, 1:Enable, 2:Enable only for P2P (uint)
parm:           rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint)
parm:           rtw_adaptivity_en:0:disable, 1:enable (uint)
parm:           rtw_adaptivity_mode:0:normal, 1:carrier sense (uint)
parm:           rtw_adaptivity_dml:0:disable, 1:enable (uint)
parm:           rtw_adaptivity_dc_backoffC backoff for Adaptivity (uint)
parm:           rtw_amplifier_type_2g:BIT3:2G ext-PA, BIT4:2G ext-LNA (uint)
parm:           rtw_amplifier_type_5g:BIT6:5G ext-PA, BIT7:5G ext-LNA (uint)
parm:           rtw_RFE_type:default init value:64 (uint)
parm:           rtw_GLNA_type:default init value:0 (uint)
parm:           rtw_TxBBSwing_2G:default init value:0xFF (uint)
parm:           rtw_TxBBSwing_5G:default init value:0xFF (uint)
parm:           rtw_OffEfuseMask:default open Efuse Mask vaule:0 (uint)
parm:           rtw_FileMaskEfuse:default drv Mask Efuse vaule:0 (uint)
parm:           rtw_pll_ref_clk_sel:force pll_ref_clk_sel, 0xF:use autoload value (uint)
parm:           rtw_tx_pwr_lmt_enable:0isable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_tx_pwr_by_rate:0isable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_phy_file_path:The path of phy parameter (charp)
parm:           rtw_load_phy_fileHY File Bit Map (int)
parm:           rtw_decrypt_phy_file:Enable Decrypt PHY File (int)

4

threads

1118

posts

9489

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9489
Published in 2016-4-16 05:39:41 | Show all floors
I wouldn't say that tainted kernel is the reason, it's just a information. I don't see any reason why it doesn't work. I will try to use this driver in a few days. Maybe I will find out something then.

4

threads

1118

posts

9489

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9489
Published in 2016-4-16 05:39:48 | Show all floors
I wouldn't say that tainted kernel is the reason, it's just a information. I don't see any reason why it doesn't work. I will try to use this driver in a few days. Maybe I will find out something then.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-16 15:55:37 | Show all floors
In fact, our attention went to a different direction. The error is :
ERROR: could not insert module 8189es.ko: Invalid module format

Hence the module's format is under scrutiny. Hopefully, you can troubleshoot it.

4

threads

1118

posts

9489

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9489
Published in 2016-4-16 19:38:44 | Show all floors
That's why I asked you for modinfo and file output. But their output seems ok.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-17 20:49:09 | Show all floors
Strange issue.  

I made another clean build disabling the default module in the
root@orangepiplus:/usr/src/rtl8189ES_linux# cat /etc/modules
#8189es

root@orangepiplus:/usr/src/rtl8189ES_linux# make clean
cd hal/phydm/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
...
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions

root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-3.4.110-sun8i
make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-headers-3.4.110-sun8i M=/usr/src/rtl8189ES_linux  modules
make[1]: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_cmd.o
,,,
C [M]  /usr/src/rtl8189ES_linux/hal/led/hal_sdio_led.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/HalPwrSeqCmd.o

nothing special, except that it builds the 8188e tree:
  CC [M]  /usr/src/rtl8189ES_linux/hal/rtl8188e/Hal8188EPwrSeq.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/rtl8188e/rtl8188e_xmit.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/rtl8188e/rtl8188e_sreset.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/rtl8188e/rtl8188e_hal_init.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/rtl8188e/rtl8188e_phycfg.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/rtl8188e/rtl8188e_rf6052.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/rtl8188e/rtl8188e_dm.o

  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/phydm_rtl8188e.o
  CC [M]  /usr/src/rtl8189ES_linux/platform/platform_ops.o
  CC [M]  /usr/src/rtl8189ES_linux/platform/platform_ARM_SUNnI_sdio.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_mp.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_mp_ioctl.o
  LD [M]  /usr/src/rtl8189ES_linux/8189es.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/rtl8189ES_linux/8189es.mod.o
  LD [M]  /usr/src/rtl8189ES_linux/8189es.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
root@orangepiplus:/usr/src/rtl8189ES_linux#


root@orangepiplus:/usr/src/rtl8189ES_linux# modinfo 8189es.ko
filename:       /usr/src/rtl8189ES_linux/8189es.ko
version:        v4.3.18.1_15373.20151005
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     C5DDC3DBBA8AB579D910935
alias:          sdio:c*v024Cd8179*
depends:        
vermagic:       3.4.110 mod_unload ARMv7 p2v8
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           rtw_usb_rxagg_mode:int
parm:           rtw_qos_opt_enable:int
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)

It still doesn't load:
root@orangepiplus:/usr/src/rtl8189ES_linux# insmod 8189es.ko
insmod: ERROR: could not insert module 8189es.ko: Invalid module format

[  682.251187] 8189es: module_layout: kernel tainted.
[  682.251207] Disabling lock debugging due to kernel taint
[  682.251255] 8189es: version magic '3.4.110 mod_unload ARMv7 p2v8 ' should be '3.4.110-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 '
[ 1553.150477] 8189es: version magic '3.4.110 mod_unload ARMv7 p2v8 ' should be '3.4.110-sun8i SMP preempt mod_unload modversions ARMv7 p2v8

4

threads

1118

posts

9489

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9489
Published in 2016-4-17 21:04:52 | Show all floors
Ok, it seems that you have problems with version magic. This means that kernel thinks that module was compiled for different version, which is strange. I don't know much about this magic strings, but at least they should match in kernel version (3.4.110 vs 3.4.110-sun8i). Probably this is a result of crosscompiling. Ask again in Armbian forums.

I'm using a kernels which have this check disabled.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-18 05:29:42 | Show all floors
Apparently, the magic version mismatch could be corrected with the setting
EXTRAVERSION =

http://linux.die.net/lkmpg/x380.html

I looked for that setting in the driver's tree, but unable to find it.

This setting exists in the
# /lib/modules/`uname -r`/build/Makefile
and it is empty.

As I understand it, this Makefile is the one used for the kernel building, not the module, hence it is not the one to correct.

Probably, it is not as complicated to resolve, provided to find where the setting is defined.

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list