add optional version suffix to kernel files/ directories
SVN-Revision: 10972
This commit is contained in:
parent
19cb0b3693
commit
2448cb8a15
@ -31,6 +31,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
|
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))
|
KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
|
||||||
LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
|
LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ ifeq ($(TARGET_BUILD),1)
|
|||||||
PKG_BUILD_DIR:=$(LINUX_DIR)
|
PKG_BUILD_DIR:=$(LINUX_DIR)
|
||||||
endif
|
endif
|
||||||
PATCH_DIR?=./patches
|
PATCH_DIR?=./patches
|
||||||
|
FILES_DIR?=./files
|
||||||
|
|
||||||
ifeq ($(MAKECMDGOALS),refresh)
|
ifeq ($(MAKECMDGOALS),refresh)
|
||||||
override QUILT=1
|
override QUILT=1
|
||||||
@ -67,9 +68,9 @@ endef
|
|||||||
|
|
||||||
define Kernel/Patch/Default
|
define Kernel/Patch/Default
|
||||||
$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
|
$(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 $(GENERIC_FILES_DIR) ]; then $(CP) $(GENERIC_FILES_DIR)/* $(LINUX_DIR)/; fi
|
||||||
if [ -d ./files ]; then \
|
if [ -d $(FILES_DIR) ]; then \
|
||||||
$(CP) ./files/* $(LINUX_DIR)/; \
|
$(CP) $(FILES_DIR)/* $(LINUX_DIR)/; \
|
||||||
find $(LINUX_DIR)/ -name \*.rej | xargs rm -f; \
|
find $(LINUX_DIR)/ -name \*.rej | xargs rm -f; \
|
||||||
fi
|
fi
|
||||||
$(call PatchDir,$(GENERIC_PATCH_DIR),generic/)
|
$(call PatchDir,$(GENERIC_PATCH_DIR),generic/)
|
||||||
|
@ -106,6 +106,7 @@ include $(INCLUDE_DIR)/kernel-version.mk
|
|||||||
|
|
||||||
GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
|
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_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))
|
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)))
|
LINUX_CONFIG?=$(firstword $(wildcard $(foreach subdir,$(PLATFORM_DIR) $(PLATFORM_SUBDIR),$(subdir)/config-$(KERNEL_PATCHVER) $(subdir)/config-default)))
|
||||||
|
Loading…
Reference in New Issue
Block a user