diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/tasks/kernel.mk | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/tasks/kernel.mk b/core/tasks/kernel.mk index 763df73..4486044 100644 --- a/core/tasks/kernel.mk +++ b/core/tasks/kernel.mk @@ -86,6 +86,13 @@ endif ifneq ($(TARGET_KERNEL_ADDITIONAL_CONFIG),) KERNEL_ADDITIONAL_CONFIG := $(TARGET_KERNEL_ADDITIONAL_CONFIG) +KERNEL_ADDITIONAL_CONFIG_SRC := $(KERNEL_SRC)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_ADDITIONAL_CONFIG) + ifeq ("$(wildcard $(KERNEL_ADDITIONAL_CONFIG_SRC))","") + $(warning TARGET_KERNEL_ADDITIONAL_CONFIG '$(TARGET_KERNEL_ADDITIONAL_CONFIG)' doesn't exist) + KERNEL_ADDITIONAL_CONFIG_SRC := /dev/null + endif +else + KERNEL_ADDITIONAL_CONFIG_SRC := /dev/null endif ## Do be discontinued in a future version. Notify builder about target @@ -228,7 +235,13 @@ $(KERNEL_OUT_STAMP): $(hide) mkdir -p $(KERNEL_MODULES_OUT) $(hide) touch $@ -$(KERNEL_CONFIG): $(KERNEL_OUT_STAMP) $(KERNEL_DEFCONFIG_SRC) +KERNEL_ADDITIONAL_CONFIG_OUT := $(KERNEL_OUT)/.additional_config + +.PHONY: force_additional_config +$(KERNEL_ADDITIONAL_CONFIG_OUT): force_additional_config + $(hide) cmp -s $(KERNEL_ADDITIONAL_CONFIG_SRC) $@ || cp $(KERNEL_ADDITIONAL_CONFIG_SRC) $@; + +$(KERNEL_CONFIG): $(KERNEL_OUT_STAMP) $(KERNEL_DEFCONFIG_SRC) $(KERNEL_ADDITIONAL_CONFIG_OUT) $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(KERNEL_DEFCONFIG) $(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \ echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \ |