diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/kernel-build.mk | 10 | ||||
-rw-r--r-- | include/kernel-defaults.mk | 4 | ||||
-rw-r--r-- | include/kernel.mk | 12 | ||||
-rw-r--r-- | include/quilt.mk | 12 |
4 files changed, 22 insertions, 16 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 71b9d8000f..83d0d5e6eb 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -11,9 +11,11 @@ include $(INCLUDE_DIR)/host.mk include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/prereq.mk -LINUX_CONFIG ?= ./config/default +GENERIC_LINUX_CONFIG:=$(GENERIC_PLATFORM_DIR)/config-$(shell [ -f "$(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER)" ] && echo "$(KERNEL_PATCHVER)" || echo template ) +LINUX_CONFIG_DIR ?= ./config$(shell [ -d "./config-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true ) +LINUX_CONFIG ?= $(LINUX_CONFIG_DIR)/default --include $(TOPDIR)/target/linux/generic-$(KERNEL)/config-template +-include $(GENERIC_LINUX_CONFIG) -include $(LINUX_CONFIG) ifneq ($(CONFIG_ATM),) @@ -166,9 +168,9 @@ prepare: $(LINUX_DIR)/.configured compile: $(LINUX_DIR)/.modules menuconfig: $(LINUX_DIR)/.prepared FORCE $(call Kernel/Configure) - $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_CONFIG) > $(LINUX_DIR)/.config + $(SCRIPT_DIR)/config.pl '+' $(GENERIC_LINUX_CONFIG) $(LINUX_CONFIG) > $(LINUX_DIR)/.config $(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) menuconfig - $(SCRIPT_DIR)/config.pl '>' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_DIR)/.config > $(LINUX_CONFIG) + $(SCRIPT_DIR)/config.pl '>' $(GENERIC_LINUX_CONFIG) $(LINUX_DIR)/.config > $(LINUX_CONFIG) install: $(LINUX_DIR)/.image diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 84030a6d2d..6930a962a5 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -47,9 +47,9 @@ define Kernel/Configure/2.6 endef define Kernel/Configure/Default @if [ -f "./config/profile-$(PROFILE)" ]; then \ - $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template '+' $(LINUX_CONFIG) ./config/profile-$(PROFILE) > $(LINUX_DIR)/.config; \ + $(SCRIPT_DIR)/config.pl '+' $(GENERIC_LINUX_CONFIG) '+' $(LINUX_CONFIG) ./config/profile-$(PROFILE) > $(LINUX_DIR)/.config; \ else \ - $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_CONFIG) > $(LINUX_DIR)/.config; \ + $(SCRIPT_DIR)/config.pl '+' $(GENERIC_LINUX_CONFIG) $(LINUX_CONFIG) > $(LINUX_DIR)/.config; \ fi $(call Kernel/Configure/$(KERNEL)) rm -rf $(KERNEL_BUILD_DIR)/modules diff --git a/include/kernel.mk b/include/kernel.mk index 00a7882acb..e6fc3325e6 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -26,8 +26,11 @@ else KERNEL_CROSS:=$(TARGET_CROSS) endif + KERNEL_PATCHVER:=$(shell echo $(LINUX_VERSION) | cut -d. -f1,2,3 | cut -d- -f1) PLATFORM_DIR := $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) + PATCH_DIR := ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true ) 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 ) KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) @@ -37,10 +40,11 @@ else LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 - LINUX_SITE:=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL) + TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,) + LINUX_SITE:=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL)$(TESTING) \ + http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL)$(TESTING) \ + http://www.kernel.org/pub/linux/kernel/v$(KERNEL)$(TESTING) \ + http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL)$(TESTING) PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/include/quilt.mk b/include/quilt.mk index 395f64e174..e02fab0879 100644 --- a/include/quilt.mk +++ b/include/quilt.mk @@ -46,11 +46,11 @@ endif define Kernel/Patch/Default if [ -d $(GENERIC_PLATFORM_DIR)/files ]; then $(CP) $(GENERIC_PLATFORM_DIR)/files/* $(LINUX_DIR)/; fi if [ -d ./files ]; then $(CP) ./files/* $(LINUX_DIR)/; fi - $(if $(strip $(QUILT)),$(call Quilt/Patch,$(GENERIC_PLATFORM_DIR)/patches,generic/), \ - if [ -d $(GENERIC_PLATFORM_DIR)/patches ]; then $(PATCH) $(LINUX_DIR) $(GENERIC_PLATFORM_DIR)/patches; fi \ + $(if $(strip $(QUILT)),$(call Quilt/Patch,$(GENERIC_PATCH_DIR),generic/), \ + if [ -d $(GENERIC_PATCH_DIR) ]; then $(PATCH) $(LINUX_DIR) $(GENERIC_PATCH_DIR); fi \ ) - $(if $(strip $(QUILT)),$(call Quilt/Patch,./patches,platform/), \ - if [ -d ./patches ]; then $(PATCH) $(LINUX_DIR) ./patches; fi \ + $(if $(strip $(QUILT)),$(call Quilt/Patch,$(PATCH_DIR),platform/), \ + if [ -d $(PATCH_DIR) ]; then $(PATCH) $(LINUX_DIR) $(PATCH_DIR); fi \ ) $(if $(strip $(QUILT)),touch $(PKG_BUILD_DIR)/.quilt_used) endef @@ -79,8 +79,8 @@ define Quilt/Refresh/Kernel echo "All kernel patches must start with either generic/ or platform/"; \ false; \ } - $(call Quilt/RefreshDir,$(GENERIC_PLATFORM_DIR)/patches,generic/) - $(call Quilt/RefreshDir,./patches,platform/) + $(call Quilt/RefreshDir,$(GENERIC_PATCH_DIR),generic/) + $(call Quilt/RefreshDir,$(PATCH_DIR),platform/) endef quilt-check: $(STAMP_PREPARED) FORCE |