@@ -187,7 +187,8 @@ define Image/BuildDTB/sub
$(DTS_CPPFLAGS) \
-I$(DTS_DIR) \
-I$(DTS_DIR)/include \
- -I$(LINUX_DIR)/include/ \
+ -I$(LINUX_OBJ_DIR)/include/ \
+ -I$(LINUX_SRC_DIR)/include/ \
-undef -D__DTS__ $(3) \
-o $(2).tmp $(1)
$(LINUX_OBJ_DIR)/scripts/dtc/dtc -O dtb \
@@ -71,7 +71,7 @@ else
else ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x
else
- LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null))
+ LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_OBJ_DIR)/include/config/kernel.release 2>/dev/null))
endif
MODULES_SUBDIR:=lib/modules/$(LINUX_UNAME_VERSION)
@@ -38,7 +38,7 @@ define Package/perf/description
perf is the Linux performance monitoring tool
endef
-HOST_CFLAGS += -I$(LINUX_DIR)/tools/include
+HOST_CFLAGS += -I$(LINUX_SRC_DIR)/tools/include
TARGET_LDFLAGS += $(INTL_LDFLAGS)
@@ -79,10 +79,10 @@ define Build/Configure
yes '' | $(KERNEL_MAKE) oldconfig
grep 'CONFIG_HZ=' $(REAL_LINUX_DIR)/.config | \
cut -d= -f2 | \
- bc -q $(LINUX_DIR)/kernel/time/timeconst.bc \
- > $(LINUX_DIR)/include/generated/timeconst.h
+ bc -q $(LINUX_SRC_DIR)/kernel/time/timeconst.bc \
+ > $(LINUX_OBJ_DIR)/include/generated/timeconst.h
$(BPF_DOC) --header \
- --file $(LINUX_DIR)/tools/include/uapi/linux/bpf.h \
+ --file $(LINUX_SRC_DIR)/tools/include/uapi/linux/bpf.h \
> $(PKG_BUILD_DIR)/tools/lib/bpf/bpf_helper_defs.h
endef
@@ -49,7 +49,7 @@ IFX_DSL_CHANNELS_PER_LINE=1
MAKE_FLAGS += \
$(KERNEL_MAKE_FLAGS)
-CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
+CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_SRC_DIR)/include" \
--with-max-device="$(IFX_DSL_MAX_DEVICE)" \
--with-lines-per-device="$(IFX_DSL_LINES_PER_DEVICE)" \
--with-channels-per-line="$(IFX_DSL_CHANNELS_PER_LINE)" \
@@ -68,7 +68,7 @@ CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
--enable-dsl-pm-line-thresholds \
--enable-dsl-pm-optional-parameters \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
ARCH=$(LINUX_KARCH)
CONFIG_TAG_danube:=DANUBE
@@ -41,8 +41,8 @@ endef
CONFIGURE_ARGS += \
ARCH=$(LINUX_KARCH) \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
- --enable-kernelincl="$(LINUX_DIR)/include" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
+ --enable-kernelincl="$(LINUX_SRC_DIR)/include" \
--with-kernel-module
define Build/InstallDev
@@ -46,8 +46,8 @@ MAKE_FLAGS += \
CONFIGURE_ARGS += \
ARCH=$(LINUX_KARCH) \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
- --enable-kernelincl="$(LINUX_DIR)/include" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
+ --enable-kernelincl="$(LINUX_SRC_DIR)/include" \
--with-ifxos-incl=$(STAGING_DIR)/usr/include/ifxos \
$(call autoconf_bool,CONFIG_IFX_DRV_TAPI_EVENT_LOGGER,el-debug) \
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_FAX,fax t38) \
@@ -83,7 +83,7 @@ MEI_DRV_CFLAGS+= \
-DMEI_TARGET_x86=1
CONFIGURE_ARGS += \
- --enable-kernelincl="$(LINUX_DIR)/include" \
+ --enable-kernelincl="$(LINUX_SRC_DIR)/include" \
--enable-device=vr11 \
--enable-debug \
--enable-error_print \
@@ -91,7 +91,7 @@ CONFIGURE_ARGS += \
--enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
--enable-add_drv_cflags="$(MEI_DRV_CFLAGS)" \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
--enable-drv_test_appl=yes \
ARCH=$(LINUX_KARCH)
@@ -54,14 +54,14 @@ CONFIGURE_ARGS += \
--enable-add_ext_drv_cflags="-DDSL_DRV_ATM_PTM_INTERFACE_ENABLE=1" \
--enable-debug-logger-support=no
-CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
+CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_SRC_DIR)/include" \
--enable-vrx \
--enable-vrx-device=vr11 \
--enable-ifxos \
--enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
--enable-driver-include="-I$(STAGING_DIR)/usr/include/vdsl" \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
--enable-debug-prints=no \
ARCH=$(LINUX_KARCH)
@@ -66,7 +66,7 @@ MEI_DRV_CFLAGS = \
-DMEI_SUPPORT_OPTIMIZED_FW_DL=1
CONFIGURE_ARGS += \
- --enable-kernelincl="$(LINUX_DIR)/include" \
+ --enable-kernelincl="$(LINUX_SRC_DIR)/include" \
--enable-device=vr9 \
--with-max-device=1 \
--with-lines-per-device=1 \
@@ -76,7 +76,7 @@ CONFIGURE_ARGS += \
--enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
--enable-add_drv_cflags="$(MEI_DRV_CFLAGS)" \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
--enable-drv_test_appl=yes \
ARCH=$(LINUX_KARCH)
@@ -45,7 +45,7 @@ MAKE_FLAGS += \
$(KERNEL_MAKE_FLAGS) \
SHELL="$(BASH)"
-CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
+CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_SRC_DIR)/include" \
--with-max-device="1" \
--with-lines-per-device="1" \
--with-channels-per-line="1" \
@@ -56,7 +56,7 @@ CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
--enable-driver-include="-I$(STAGING_DIR)/usr/include/vdsl" \
--enable-add-drv-cflags="-DMODULE -DINCLUDE_DSL_ATM_PTM_INTERFACE_SUPPORT" \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
--enable-debug-prints=no \
ARCH=mips
@@ -45,8 +45,8 @@ MAKE_FLAGS += \
CONFIGURE_ARGS += \
ARCH=$(LINUX_KARCH) \
--enable-linux-26 \
- --enable-kernelbuild="$(LINUX_DIR)" \
- --enable-kernelincl="$(LINUX_DIR)/include" \
+ --enable-kernelbuild="$(LINUX_OBJ_DIR)" \
+ --enable-kernelincl="$(LINUX_SRC_DIR)/include" \
--enable-tapiincl="$(STAGING_DIR)/usr/include/drv_tapi" \
--with-ifxos-incl=$(STAGING_DIR)/usr/include/ifxos \
$(call autoconf_bool,CONFIG_VOICE_CPE_VMMC_EVENT_LOGGER,el-debug) \
@@ -325,9 +325,9 @@ endif
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
define Build/Configure
- cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
- cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
- cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
+ cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_SRC_DIR)/include/linux/ath9k_platform.h
+ cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_SRC_DIR)/include/linux/ath5k_platform.h
+ cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_SRC_DIR)/include/linux/rt2x00_platform.h
endef
endif
endif
@@ -74,7 +74,7 @@ CONFIGURE_ARGS += \
--enable-dsl-pm-line-thresholds \
--enable-dsl-pm-optional-parameters
-TARGET_CFLAGS += -I$(LINUX_DIR)/include
+TARGET_CFLAGS += -I$(LINUX_OBJ_DIR)/include -I$(LINUX_SRC_DIR)/include
define Build/Prepare
$(call Build/Prepare/Default)
@@ -183,9 +183,9 @@ $(call Build/Configure/Default,, \
)
mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
$(CP) \
- $(LINUX_DIR)/include/linux/compiler.h \
- $(LINUX_DIR)/include/linux/compiler_types.h \
- $(LINUX_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \
+ $(LINUX_SRC_DIR)/include/linux/compiler.h \
+ $(LINUX_SRC_DIR)/include/linux/compiler_types.h \
+ $(LINUX_SRC_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \
$(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
endef
@@ -177,7 +177,7 @@ TARGET_LDFLAGS += -Wl,--as-needed
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
MAKE_FLAGS += \
- KERNEL_INCLUDE="$(LINUX_DIR)/include/uapi" \
+ KERNEL_INCLUDE="$(LINUX_SRC_DIR)/include/uapi" \
SHARED_LIBS=$(SHARED_LIBS) \
IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
BUILD_VARIANT=$(BUILD_VARIANT) \
@@ -45,7 +45,7 @@ endef
CONFIGURE_ARGS += \
--disable-static \
- --with-kbuild="$(LINUX_DIR)"
+ --with-kbuild="$(LINUX_OBJ_DIR)"
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
Most headers come out of the source. Some spots also reference the kernel build directory. Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com> --- include/image.mk | 3 ++- include/kernel.mk | 2 +- package/devel/perf/Makefile | 2 +- package/kernel/bpf-headers/Makefile | 6 +++--- package/kernel/lantiq/ltq-adsl/Makefile | 4 ++-- package/kernel/lantiq/ltq-ifxos/Makefile | 4 ++-- package/kernel/lantiq/ltq-tapi/Makefile | 4 ++-- package/kernel/lantiq/ltq-vdsl-vr11-mei/Makefile | 4 ++-- package/kernel/lantiq/ltq-vdsl-vr11/Makefile | 4 ++-- package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile | 4 ++-- package/kernel/lantiq/ltq-vdsl-vr9/Makefile | 4 ++-- package/kernel/lantiq/ltq-vmmc/Makefile | 4 ++-- package/kernel/mac80211/Makefile | 6 +++--- package/network/config/ltq-adsl-app/Makefile | 2 +- package/network/services/ppp/Makefile | 6 +++--- package/network/utils/iproute2/Makefile | 2 +- package/network/utils/ipset/Makefile | 2 +- 17 files changed, 32 insertions(+), 31 deletions(-)