mirror of
https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
synced 2025-10-19 09:01:10 +02:00
Openwrt and new compiler related fixes (#285)
* rtw-ap: Fix compiler warning. Signed-off-by: Ben Greear <greearb@candelatech.com> * makefile: Add entry for compiling against openwrt tree. Users would need to edit it to match their path, but this should get them started. Signed-off-by: Ben Greear <greearb@candelatech.com> * makefile: Allow defining KSRC outside of build. So, you can do this: KSRC=/tmp/my/kernel make And not have to edit the makefile to have this function as desired. Signed-off-by: Ben Greear <greearb@candelatech.com> * Fix stack-too-large warning on x86-64 compile Signed-off-by: Ben Greear <greearb@candelatech.com> * compile: Allow cross-compiling on cmd-line w/out editing Makefile For instance: KSRC=/home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78 \ EXT_EXTRA_CFLAGS=-DCONFIG_LITTLE_ENDIAN ARCH=arm64 CROSS_COMPILE=aarch64-openwrt-linux- MODDESTDIR=/tmp make V=1 Signed-off-by: Ben Greear <greearb@candelatech.com> * build: Attempt to auto-detect endian-ness. Will make building in openwrt much easier. Signed-off-by: Ben Greear <greearb@candelatech.com> * Fix build against openwrt backports tree. Like breaks builds elsewhere, can fix it up later. Signed-off-by: Ben Greear <greearb@candelatech.com> * Register wiphy after we probe MAC addr. This way the phy object has a valid MAC-addr, which can be helpful for identification. Signed-off-by: Ben Greear <greearb@candelatech.com> * Make sure MAC is set in wiphy_preinit This is needed to make sure the phy registers with a proper MAC address instead of all 00 Signed-off-by: Ben Greear <greearb@candelatech.com> * Fix build on 4.19 kernel. Signed-off-by: Ben Greear <greearb@candelatech.com> * Fix compile against 4.20 kernel. Remove some variable-length arrays (which could be security bugs, ways to overflow the stack it seems), and remove use of get_monotonic_boottime. Signed-off-by: Ben Greear <greearb@candelatech.com> * Support arm64
This commit is contained in:
committed by
Harshavardhana
parent
fb91faf610
commit
ba6fa69560
26
Makefile
26
Makefile
@@ -83,6 +83,7 @@ CONFIG_PLATFORM_ARM_S3C6K4 = n
|
||||
CONFIG_PLATFORM_MIPS_RMI = n
|
||||
CONFIG_PLATFORM_RTD2880B = n
|
||||
CONFIG_PLATFORM_MIPS_AR9132 = n
|
||||
CONFIG_PLATFORM_OPENWRT_NEO2 = n
|
||||
CONFIG_PLATFORM_RTK_DMP = n
|
||||
CONFIG_PLATFORM_MIPS_PLM = n
|
||||
CONFIG_PLATFORM_MSTAR389 = n
|
||||
@@ -869,18 +870,31 @@ EXTRA_CFLAGS += -DCONFIG_TDLS
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
|
||||
|
||||
ifdef EXT_EXTRA_CFLAGS
|
||||
EXTRA_CFLAGS += $(EXT_EXTRA_CFLAGS)
|
||||
else
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
|
||||
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
#EXTRA_CFLAGS += -DCONFIG_P2P_IPS
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc64le/powerpc/)
|
||||
endif
|
||||
ifndef ARCH
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/ppc64le/powerpc/ -e s/aarch64/arm64/)
|
||||
ARCH ?= $(SUBARCH)
|
||||
endif
|
||||
ifndef CROSS_COMPILE
|
||||
CROSS_COMPILE ?=
|
||||
endif
|
||||
ifndef KVER
|
||||
KVER ?= $(shell uname -r)
|
||||
endif
|
||||
ifndef KSRC
|
||||
KSRC := /lib/modules/$(KVER)/build
|
||||
endif
|
||||
ifndef MODDESTDIR
|
||||
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
||||
endif
|
||||
INSTALL_PREFIX :=
|
||||
endif
|
||||
|
||||
@@ -1046,6 +1060,16 @@ CROSS_COMPILE := mips-openwrt-linux-
|
||||
KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9
|
||||
endif
|
||||
|
||||
# This is how I built for openwrt Neo2 platform. --Ben
|
||||
ifeq ($(CONFIG_PLATFORM_OPENWRT_NEO2), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
ARCH := arm64
|
||||
CROSS_COMPILE := aarch64-openwrt-linux-
|
||||
#export PATH=$PATH:/home/greearb/git/openwrt-neo2-dev/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/bin/
|
||||
#export STAGING_DIR=/home/greearb/git/openwrt-neo2-dev/staging_dir
|
||||
KSRC := /home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
|
||||
ARCH := mips
|
||||
|
Reference in New Issue
Block a user