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

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

[Copy link]

4

threads

1118

posts

9455

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9455
Published in 2016-4-11 00:13:23 | Show all floors
Found it:
There is no define like CONFIG_PLATFORM_ARM_SUN8I, you probably add it on your own? Just set CONFIG_PLATFORM_ARM_SUN8I_W3P1 to y and that should be it.

Loboris version of platform_ARM_SUNnI_sdio.c seems to be correct, just keep it.

You would probably also like to set CONFIG_BR_EXT to n to remove some unneeded cruft out of the driver.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-11 01:17:49 | Show all floors
>There is no define like CONFIG_PLATFORM_ARM_SUN8I, you probably add it on your own?
Yes. I added it based on our exchange.

>Just set CONFIG_PLATFORM_ARM_SUN8I_W3P1 to y
Changed in the Makefile:
CONFIG_PLATFORM_ARM_SUN8I = n
CONFIG_PLATFORM_ARM_SUN8I_W3P1 = y

>set CONFIG_BR_EXT to n to remove some unneeded cruft
Disabled it as well.


root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-3.4.110-sun8i
make ARCH=arm CROSS_COMPILE=/home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi- -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'
make[1]: /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-gcc: Command not found
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_cmd.o
/bin/sh: 1: /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-gcc: not found
scripts/Makefile.build:307: recipe for target '/usr/src/rtl8189ES_linux/core/rtw_cmd.o' failed
make[2]: *** [/usr/src/rtl8189ES_linux/core/rtw_cmd.o] Error 127
Makefile:1367: recipe for target '_module_/usr/src/rtl8189ES_linux' failed
make[1]: *** [_module_/usr/src/rtl8189ES_linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
Makefile:1635: recipe for target 'modules' failed
make: *** [modules] Error 2


Is something missing, like arm-linux-gnueabi-gcc ?


Another ARCH definition doesn't run either:
root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm/mach-sunxi KSRC=/usr/src/linux-headers-3.4.110-sun8i
make ARCH=arm/mach-sunxi CROSS_COMPILE=/home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi- -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'
make[1]: /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-gcc: Command not found
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_cmd.o
/bin/sh: 1: /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-gcc: not found
scripts/Makefile.build:307: recipe for target '/usr/src/rtl8189ES_linux/core/rtw_cmd.o' failed
make[2]: *** [/usr/src/rtl8189ES_linux/core/rtw_cmd.o] Error 127
Makefile:1367: recipe for target '_module_/usr/src/rtl8189ES_linux' failed
make[1]: *** [_module_/usr/src/rtl8189ES_linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
Makefile:1635: recipe for target 'modules' failed
make: *** [modules] Error 2
root@orangepiplus:/usr/src/rtl8189ES_linux#

4

threads

1118

posts

9455

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9455
Published in 2016-4-11 02:19:55 | Show all floors
we are almost there
remove or comment line 1396 in Makefile:
  1. CROSS_COMPILE := /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
Copy code

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-11 02:54:45 | Show all floors
I commented 2 lines:
#CROSS_COMPILE := /home/android_sdk/Allwinner/a23/android-kk44/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-
#KSRC :=/home/android_sdk/Allwinner/a23/android-kk44/lichee/linux-3.4

Even for me it was strange to see the Allwinner A23 related error.

Then the compilation was ALMOST successful :
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
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_security.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_debug.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_io.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_ioctl_query.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_ioctl_set.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_ieee80211.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_mlme.o
....
  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/halhwimg8188e_rf.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/halhwimg8188e_t_fw.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/halhwimg8188e_s_fw.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/halphyrf_8188e_ce.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/phydm_regconfig8188e.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/hal8188erateadaptive.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
/bin/sh: 1: scripts/mod/modpost: not found
/usr/src/linux-headers-3.4.110-sun8i/scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[2]: *** [__modpost] Error 127
Makefile:1370: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
Makefile:1635: recipe for target 'modules' failed
make: *** [modules] Error 2

This new obscure "makefile.modpost:91: recipe for target '__modpost' failed" keeps me even more frustrated.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-11 03:09:29 | Show all floors
If I understand it correctly, compilation raises the error somewhere at line 1635

ifeq ($(CONFIG_RTL8723B), y)
$(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
endif
ifeq ($(CONFIG_RTL8821A), y)
$(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
endif

obj-$(CONFIG_RTL8189ES) := $(MODULE_NAME).o

else

export CONFIG_RTL8189ES = m

all: modules

modules:
        $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd)  modules

4

threads

1118

posts

9455

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9455
Published in 2016-4-11 03:53:38 | Show all floors
Are you sure that you don't have already a ko file? Search for *.ko

If you have it just run insmod <pathtokofile>

4

threads

1118

posts

9455

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9455
Published in 2016-4-11 04:05:55 | Show all floors

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-11 04:28:48 | Show all floors
The find gives the following result :
root@orangepiplus:/usr/src/rtl8189ES_linux# find / -regextype posix-egrep -regex ".*\.(ko)$"

/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtlwifi/rtl8192c/rtl8192c-common.ko
/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtlwifi/rtlwifi.ko
/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtlwifi/rtl8192cu/rtl8192cu.ko
/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/at76c50x-usb.ko
/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl818x/rtl8187/rtl8187.ko
/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8723bs/8723bs.ko
/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8189es/8189es.ko

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

The date shows the distribution date build :
root@orangepiplus:/usr/src/rtl8189ES_linux# ls -al /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

The new files:
root@orangepiplus:/usr/src/rtl8189ES_linux# ls -la
total 1808
drwxr-xr-x  9 root root    4096 Apr 10 21:20 .
drwxr-xr-x 12 root root    4096 Apr  8 22:29 ..
-rw-r--r--  1 root root 1706192 Apr 10 20:49 8189es.o
-rw-r--r--  1 root root    4989 Apr 10 20:49 .8189es.o.cmd

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-11 04:49:35 | Show all floors
>You can also try this: https://vishnulinux.wordpress.co ... dmodpost-not-found/

>This can be fixed by running the following command  from the kernel source directory.
>cd /usr/src/kernel
>sudo make modules_prepare

The distribution doesn't contain the kernel sources. Only the headers are provided.
I tried

root@orangepiplus:/usr/src/rtl8189ES_linux# cd /usr/src/linux-headers-3.4.110-sun8i

root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i# make modules_prepare
  CHK     include/linux/version.h
  CHK     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
root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i# make ARCH=arm modules_prepare
  CHK     include/linux/version.h
  CHK     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


root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i# cd  arch/arm/mach-sunxi/
root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i/arch/arm/mach-sunxi#
root@orangepiplus:/usr/src/linux-headers-3.4.110-sun8i/arch/arm/mach-sunxi# make  modules_prepare
make: *** No rule to make target 'modules_prepare'.  Stop.

passsing the ARCH=arm gives similar results.

I am quite embarrassed again.

4

threads

1118

posts

9455

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9455
Published in 2016-4-12 04:01:11 | Show all floors
Can you install full kernel sourcers in Armbian? Anyway, ask on Armbian forums what to do.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list