aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-04-28 22:01:14 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-04-28 22:01:14 +0000
commitef0a202a8f52384d143a043834495bd1b0df6148 (patch)
treeb43759ba09d9f8fd85b767350fab10987e165f09
parent9d3a3c4595fb59fa06b474d75649c53a3e6729c5 (diff)
downloadupstream-ef0a202a8f52384d143a043834495bd1b0df6148.tar.gz
upstream-ef0a202a8f52384d143a043834495bd1b0df6148.tar.bz2
upstream-ef0a202a8f52384d143a043834495bd1b0df6148.zip
add optional version suffix to kernel files/ directories
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10972 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/kernel.mk1
-rw-r--r--include/quilt.mk7
-rw-r--r--include/target.mk1
3 files changed, 6 insertions, 3 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index b413d84840..52355dcdd3 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -31,6 +31,7 @@ else
endif
PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+ FILES_DIR ?= ./files$(shell [ -d "./files-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
diff --git a/include/quilt.mk b/include/quilt.mk
index 95f81e7094..c310fd99ac 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -12,6 +12,7 @@ ifeq ($(TARGET_BUILD),1)
PKG_BUILD_DIR:=$(LINUX_DIR)
endif
PATCH_DIR?=./patches
+FILES_DIR?=./files
ifeq ($(MAKECMDGOALS),refresh)
override QUILT=1
@@ -67,9 +68,9 @@ endef
define Kernel/Patch/Default
$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
- if [ -d $(GENERIC_PLATFORM_DIR)/files ]; then $(CP) $(GENERIC_PLATFORM_DIR)/files/* $(LINUX_DIR)/; fi
- if [ -d ./files ]; then \
- $(CP) ./files/* $(LINUX_DIR)/; \
+ if [ -d $(GENERIC_FILES_DIR) ]; then $(CP) $(GENERIC_FILES_DIR)/* $(LINUX_DIR)/; fi
+ if [ -d $(FILES_DIR) ]; then \
+ $(CP) $(FILES_DIR)/* $(LINUX_DIR)/; \
find $(LINUX_DIR)/ -name \*.rej | xargs rm -f; \
fi
$(call PatchDir,$(GENERIC_PATCH_DIR),generic/)
diff --git a/include/target.mk b/include/target.mk
index ce842da795..7010424b43 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -106,6 +106,7 @@ include $(INCLUDE_DIR)/kernel-version.mk
GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d "$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+GENERIC_FILES_DIR := $(GENERIC_PLATFORM_DIR)/files$(shell [ -d "$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
GENERIC_LINUX_CONFIG?=$(firstword $(wildcard $(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) $(GENERIC_PLATFORM_DIR)/config-default))
LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) $(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) $(subdir)/config-default)))