mirror of
https://github.com/gnab/rtl8812au
synced 2025-01-08 01:24:20 +00:00
Makefile: always use weak assignment for KSRC
With a weak-assignment of KSRC the module will be enabled to support cross- building it for different Kernel Versions on a build machine. The change enabled me to cross-compile this module for the VyOS 4.18.8 Kernel by simply invoking: $ KSRC=/home/cpo/vyos-build/packages/vyos-kernel make
This commit is contained in:
parent
c5f3d21507
commit
0ee556a688
44
Makefile
44
Makefile
@ -654,7 +654,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
|
||||
ARCH ?= $(SUBARCH)
|
||||
CROSS_COMPILE ?=
|
||||
KVER ?= $(shell uname -r)
|
||||
KSRC := /lib/modules/$(KVER)/build
|
||||
KSRC ?= /lib/modules/$(KVER)/build
|
||||
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
||||
INSTALL_PREFIX :=
|
||||
endif
|
||||
@ -666,15 +666,15 @@ ARCH := $(R_ARCH)
|
||||
#CROSS_COMPILE := arm-none-linux-gnueabi-
|
||||
CROSS_COMPILE := $(R_CROSS_COMPILE)
|
||||
KVER := 3.4.0
|
||||
#KSRC := ../../../../build/out/kernel
|
||||
KSRC := $(KERNEL_BUILD_PATH)
|
||||
#KSRC ?= ../../../../build/out/kernel
|
||||
KSRC ?= $(KERNEL_BUILD_PATH)
|
||||
MODULE_NAME :=wlan
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_TI_AM3517), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_SHUTTLE
|
||||
CROSS_COMPILE := arm-eabi-
|
||||
KSRC := $(shell pwd)/../../../Android/kernel
|
||||
KSRC ?= $(shell pwd)/../../../Android/kernel
|
||||
ARCH := arm
|
||||
endif
|
||||
|
||||
@ -683,7 +683,7 @@ EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MSTAR_TITANIA12
|
||||
ARCH:=mips
|
||||
CROSS_COMPILE:= /usr/src/Mstar_kernel/mips-4.3/bin/mips-linux-gnu-
|
||||
KVER := 2.6.28.9
|
||||
KSRC := /usr/src/Mstar_kernel/2.6.28.9/
|
||||
KSRC ?= /usr/src/Mstar_kernel/2.6.28.9/
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y)
|
||||
@ -691,7 +691,7 @@ EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
|
||||
ARCH := $(SUBARCH)
|
||||
CROSS_COMPILE := /media/DATA-2/android-x86/ics-x86_20120130/prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-unknown-linux-gnu-
|
||||
KSRC := /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x86/obj/kernel
|
||||
KSRC ?= /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x86/obj/kernel
|
||||
MODULE_NAME :=wlan
|
||||
endif
|
||||
|
||||
@ -703,7 +703,7 @@ EXTRA_CFLAGS += -DCONFIG_P2P_IPS
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
|
||||
ARCH := $(SUBARCH)
|
||||
CROSS_COMPILE := /home/android_sdk/android-x86_JB/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7/bin/i686-linux-android-
|
||||
KSRC := /home/android_sdk/android-x86_JB/out/target/product/x86/obj/kernel/
|
||||
KSRC ?= /home/android_sdk/android-x86_JB/out/target/product/x86/obj/kernel/
|
||||
MODULE_NAME :=wlan
|
||||
endif
|
||||
|
||||
@ -720,7 +720,7 @@ EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := arm-linux-
|
||||
KVER := 2.6.24.7_$(ARCH)
|
||||
KSRC := /usr/src/kernels/linux-$(KVER)
|
||||
KSRC ?= /usr/src/kernels/linux-$(KVER)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_ARM_S3C6K4), y)
|
||||
@ -776,7 +776,7 @@ ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
|
||||
ARCH := mips
|
||||
CROSS_COMPILE := mips-openwrt-linux-
|
||||
KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9
|
||||
KSRC ?= /home/alex/test_openwrt/tmp/linux-2.6.30.9
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y)
|
||||
@ -825,7 +825,7 @@ EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X
|
||||
ARCH := mips
|
||||
CROSS_COMPILE := /home/cnsd4/project/actions/tools-2.6.27/bin/mipsel-linux-gnu-
|
||||
KVER := 2.6.27
|
||||
KSRC := /home/cnsd4/project/actions/linux-2.6.27.28
|
||||
KSRC ?= /home/cnsd4/project/actions/linux-2.6.27.28
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_TI_DM365), y)
|
||||
@ -833,7 +833,7 @@ EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_TI_DM365
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-
|
||||
KVER := 2.6.18
|
||||
KSRC := /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci/linux-dm365
|
||||
KSRC ?= /home/cnsd4/Appro/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci/linux-dm365
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_TEGRA3_CARDHU), y)
|
||||
@ -845,7 +845,7 @@ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
|
||||
KSRC := /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/out/target/product/cardhu/obj/KERNEL
|
||||
KSRC ?= /home/android_sdk/nvidia/tegra-16r3-partner-android-4.1_20120723/out/target/product/cardhu/obj/KERNEL
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -858,7 +858,7 @@ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
|
||||
KSRC := /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/out/target/product/dalmore/obj/KERNEL
|
||||
KSRC ?= /home/android_sdk/nvidia/tegra-17r9-partner-android-4.2-dalmore_20130131/out/target/product/dalmore/obj/KERNEL
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -866,7 +866,7 @@ ifeq ($(CONFIG_PLATFORM_ARM_TCC8900), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /home/android_sdk/Telechips/SDK_2304_20110613/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
|
||||
KSRC := /home/android_sdk/Telechips/SDK_2304_20110613/kernel
|
||||
KSRC ?= /home/android_sdk/Telechips/SDK_2304_20110613/kernel
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -874,7 +874,7 @@ ifeq ($(CONFIG_PLATFORM_ARM_TCC8920), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
|
||||
KSRC := /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/kernel
|
||||
KSRC ?= /home/android_sdk/Telechips/v12.06_r1-tcc-android-4.0.4/kernel
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -886,7 +886,7 @@ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
EXTRA_CFLAGS += -DCONFIG_P2P_IPS
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
|
||||
KSRC := /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/kernel
|
||||
KSRC ?= /home/android_sdk/Telechips/v13.03_r1-tcc-android-4.2.2_ds_patched/kernel
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -894,7 +894,7 @@ ifeq ($(CONFIG_PLATFORM_ARM_RK2818), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID -DCONFIG_PLATFORM_ROCKCHIPS -DCONFIG_MINIMAL_MEMORY_USAGE
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /usr/src/release_fae_version/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
|
||||
KSRC := /usr/src/release_fae_version/kernel25_A7_281x
|
||||
KSRC ?= /usr/src/release_fae_version/kernel25_A7_281x
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -902,7 +902,7 @@ ifeq ($(CONFIG_PLATFORM_ARM_URBETTER), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
|
||||
ARCH := arm
|
||||
CROSS_COMPILE := /media/DATA-1/urbetter/arm-2009q3/bin/arm-none-linux-gnueabi-
|
||||
KSRC := /media/DATA-1/urbetter/ics-urbetter/kernel
|
||||
KSRC ?= /media/DATA-1/urbetter/ics-urbetter/kernel
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -910,9 +910,9 @@ ifeq ($(CONFIG_PLATFORM_ARM_TI_PANDA), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #-DCONFIG_MINIMAL_MEMORY_USAGE
|
||||
ARCH := arm
|
||||
#CROSS_COMPILE := /media/DATA-1/aosp/ics-aosp_20111227/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
|
||||
#KSRC := /media/DATA-1/aosp/android-omap-panda-3.0_20120104
|
||||
#KSRC ?= /media/DATA-1/aosp/android-omap-panda-3.0_20120104
|
||||
CROSS_COMPILE := /media/DATA-1/android-4.0/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
|
||||
KSRC := /media/DATA-1/android-4.0/panda_kernel/omap
|
||||
KSRC ?= /media/DATA-1/android-4.0/panda_kernel/omap
|
||||
MODULE_NAME := wlan
|
||||
endif
|
||||
|
||||
@ -937,7 +937,7 @@ EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_MN10300
|
||||
ARCH := mn10300
|
||||
CROSS_COMPILE := mn10300-linux-
|
||||
KVER := 2.6.32.2
|
||||
KSRC := /home/winuser/work/Plat_sLD2T_V3010/usr/src/linux-2.6.32.2
|
||||
KSRC ?= /home/winuser/work/Plat_sLD2T_V3010/usr/src/linux-2.6.32.2
|
||||
INSTALL_PREFIX :=
|
||||
endif
|
||||
|
||||
@ -978,7 +978,7 @@ SUBARCH := $(shell uname -m | sed -e s/ppc/powerpc/)
|
||||
ARCH ?= $(SUBARCH)
|
||||
CROSS_COMPILE ?=
|
||||
KVER ?= $(shell uname -r)
|
||||
KSRC := /lib/modules/$(KVER)/build
|
||||
KSRC ?= /lib/modules/$(KVER)/build
|
||||
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
||||
INSTALL_PREFIX :=
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user