Optimized Makefile and added DKMS ++

This commit is contained in:
kimocoder 2018-06-22 21:43:50 +02:00
parent 8cbcaa6a8d
commit d5aaced9c3
25 changed files with 68 additions and 15 deletions

View File

@ -452,7 +452,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8821A
_HAL_INTFS_FILES += hal/rtl8812a/hal8821a_fw.o
endif
endif
@ -1732,7 +1732,7 @@ ARCH := arm
CROSS_COMPILE := /home/android_sdk/Telechips/v13.05_r1-tcc-android-4.2.2_tcc893x-evm_build/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
KSRC := /home/android_sdk/Telechips/v13.05_r1-tcc-android-4.2.2_tcc893x-evm_build/kernel
MODULE_NAME := wlan
endif
endif
ifeq ($(CONFIG_PLATFORM_RTL8197D), y)
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTL8197D
@ -1794,7 +1794,7 @@ rtk_core := core/rtw_cmd.o \
core/rtw_btcoex.o \
core/rtw_beamforming.o \
core/rtw_odm.o \
core/efuse/rtw_efuse.o
core/efuse/rtw_efuse.o
ifeq ($(CONFIG_SDIO_HCI), y)
rtk_core += core/rtw_sdio.o
@ -1828,7 +1828,7 @@ export CONFIG_RTL8812AU = m
all: modules
modules:
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
$(MAKE) -j $(shell nproc || echo 1) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
strip:
$(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded
@ -1890,7 +1890,7 @@ clean:
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko .rtw_radiotap.o.d
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
@ -1898,4 +1898,3 @@ clean:
rm -fr .tmp_versions
rm -fr .cache.mk
endif

0
core/rtw_mlme_ext.c Executable file → Normal file
View File

0
core/rtw_recv.c Executable file → Normal file
View File

23
dkms-install.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "You must run this with superuser priviliges. Try \"sudo ./dkms-install.sh\"" 2>&1
exit 1
else
echo "About to run dkms install steps..."
fi
DRV_DIR=rtl8812au
DRV_NAME=rtl8812au
DRV_VERSION=5.2.20
cp -r ../${DRV_DIR} /usr/src/${DRV_NAME}-${DRV_VERSION}
dkms add -m ${DRV_NAME} -v ${DRV_VERSION}
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
dkms install -m ${DRV_NAME} -v ${DRV_VERSION}
RESULT=$?
echo "Finished running dkms install steps."
exit $RESULT

24
dkms-remove.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "You must run this with superuser priviliges. Try \"sudo ./dkms-remove.sh\"" 2>&1
exit 1
else
echo "About to run dkms removal steps..."
fi
DRV_DIR=rtl8812au
DRV_NAME=rtl8812au
DRV_VERSION=5.2.20
dkms remove ${DRV_NAME}/${DRV_VERSION} --all
rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION}
RESULT=$?
if [[ "$RESULT" != "0" ]]; then
echo "Error occurred while running dkms remove." 2>&1
else
echo "Finished running dkms removal steps."
fi
exit $RESULT

View File

@ -1,10 +1,10 @@
PACKAGE_NAME="@PKGBASE@"
PACKAGE_VERSION="@PKGVER@"
PACKAGE_NAME="realtek-rtl8812au"
PACKAGE_VERSION="5.2.20~20180622"
BUILT_MODULE_NAME[0]="8812au"
PROCS_NUM=`nproc`
[ $PROCS_NUM -gt 16 ] && PROCS_NUM=16
MAKE="'make' -j$PROCS_NUM KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
CLEAN="'make' clean"
DEST_MODULE_LOCATION[0]="/updates/dkms"
DEST_MODULE_LOCATION[0]="/updates"
AUTOINSTALL="yes"
REMAKE_INITRD=no

0
hal/btc/halbtc8821cwifionly.c Executable file → Normal file
View File

0
hal/btc/halbtc8821cwifionly.h Executable file → Normal file
View File

0
include/drv_conf.h Executable file → Normal file
View File

0
include/hal_data.h Executable file → Normal file
View File

0
include/rtl8723b_hal.h Executable file → Normal file
View File

0
include/rtl8723b_led.h Executable file → Normal file
View File

0
include/rtl8723b_recv.h Executable file → Normal file
View File

0
include/rtl8723b_spec.h Executable file → Normal file
View File

0
include/rtl8723b_xmit.h Executable file → Normal file
View File

0
include/rtl8814a_cmd.h Executable file → Normal file
View File

0
include/rtl8814a_hal.h Executable file → Normal file
View File

0
include/rtl8814a_recv.h Executable file → Normal file
View File

0
include/rtl8814a_spec.h Executable file → Normal file
View File

0
include/rtl8814a_xmit.h Executable file → Normal file
View File

0
include/rtl8821ce_hal.h Executable file → Normal file
View File

0
include/rtl8822be_hal.h Executable file → Normal file
View File

View File

@ -3,7 +3,6 @@
----------------------------------------------------------------------------------------
TODO:
- Makefile should increase the speed of compilation
- Enable TX queue in monitor mode
- Place signal quality and per antenna rssi into radiotap header
- Calculate signal quality in the monitor mode
@ -19,6 +18,7 @@
- Fix is_compat_task() issue
- Use in_compat_syscall() instead of is_compat_task() if available
- Add support mode more adapters
- Add a more informational README
+++ And propably alot more. We'll see.
@ -29,3 +29,10 @@
- Enabled monitor mode
- Parse radiotap headers for proper frame injection
- RadioTap iterator from kernel 4.9 was added due to VHT field bug in kernels before 4.6
- Tweaked & optimized Makefile to compile with all cores available. Decreasing the compile time.
- Fixed dkms.conf and added dkms-install.sh and dkms-remove.sh
- Cleaned up some files & execution permissions.

0
os_dep/linux/ioctl_cfg80211.c Executable file → Normal file
View File

10
runwpa
View File

@ -1,17 +1,17 @@
#!/bin/bash
if [ "`which iwconfig`" = "" ] ; then
if [ "`which iwconfig`" = "" ] ; then
echo "WARNING:Wireless tool not exist!"
echo " Please install it!"
exit
else
if [ `uname -r | cut -d. -f2` -eq 4 ]; then
wpa_supplicant -D ipw -c wpa1.conf -i wlan0
wpa_supplicant -D ipw -c wpa1.conf -i wlan0
else
if [ `iwconfig -v |awk '{print $4}' | head -n 1` -lt 18 ] ; then
wpa_supplicant -D ipw -c wpa1.conf -i wlan0
else
wpa_supplicant -D wext -c wpa1.conf -i wlan0
wpa_supplicant -D ipw -c wpa1.conf -i wlan0
else
wpa_supplicant -D wext -c wpa1.conf -i wlan0
fi
fi