From f2ac716f764ee2d373923e1f33717dc7a13be7e7 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Wed, 22 May 2019 00:19:32 +0200 Subject: [PATCH] Fixed Makefile, DKMS and ARM64 RPI support added --- Makefile | 14 +++++++++++++- dkms-install.sh | 6 +++--- dkms-remove.sh | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 731a35e..c83e878 100755 --- a/Makefile +++ b/Makefile @@ -156,6 +156,7 @@ CONFIG_PLATFORM_ARM_SPREADTRUM_6820 = n CONFIG_PLATFORM_ARM_SPREADTRUM_8810 = n CONFIG_PLATFORM_ARM_WMT = n CONFIG_PLATFORM_ARM_RPI = n +CONFIG_PLATFORM_ARM64_RPI = n CONFIG_PLATFORM_ARM_ODROIDC2 = n CONFIG_PLATFORM_TI_DM365 = n CONFIG_PLATFORM_MOZART = n @@ -1456,6 +1457,17 @@ MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ INSTALL_PREFIX := endif +ifeq ($(CONFIG_PLATFORM_ARM64_RPI), y) +EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN +EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT +ARCH ?= arm64 +CROSS_COMPILE ?= +KVER ?= $(shell uname -r) +KSRC := /lib/modules/$(KVER)/build +MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ +INSTALL_PREFIX := +endif + ifeq ($(CONFIG_PLATFORM_ARM_ODROIDC2), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT @@ -1718,7 +1730,7 @@ install: /sbin/depmod -a ${KVER} uninstall: - rm -f $(MODDESTDIR)/$(MODULE_NAME).ko + rm -f $(MODDESTDIR)$(MODULE_NAME).ko /sbin/depmod -a ${KVER} backup_rtlwifi: diff --git a/dkms-install.sh b/dkms-install.sh index 6167817..547a6f4 100755 --- a/dkms-install.sh +++ b/dkms-install.sh @@ -7,7 +7,7 @@ else echo "About to run dkms install steps..." fi -DRV_DIR='pwd' +DRV_DIR="$(pwd)" DRV_NAME=rtl8812au DRV_VERSION=5.3.4 @@ -20,7 +20,7 @@ RESULT=$? echo "Finished running dkms install steps." -if defined(CONFIG_DISABLE_IPV6) +if grep -q -e "^CONFIG_DISABLE_IPV6 = y$" "$DRV_DIR/Makefile" ; then if echo "net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf; then @@ -29,6 +29,6 @@ if defined(CONFIG_DISABLE_IPV6) else echo "Could not disable IPv6" fi -#endif +fi exit $RESULT diff --git a/dkms-remove.sh b/dkms-remove.sh index a14bb99..40c69b1 100755 --- a/dkms-remove.sh +++ b/dkms-remove.sh @@ -7,7 +7,7 @@ else echo "About to run dkms removal steps..." fi -DRV_DIR='pwd' +DRV_DIR="$(pwd)" DRV_NAME=rtl8812au DRV_VERSION=5.3.4