device/generic/common
修訂 | a85fa79471850f0eaac9fd7a6f1bc147da71888b (tree) |
---|---|
時間 | 2019-10-02 19:57:27 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
kernel.mk: make new build system happy
The new build system requires
* A real file doesn't depend on a .PHONY target
* .PHONY targets do not have "/" in them
Change the rules to meet the requirements.
@@ -55,11 +55,16 @@ FIRMWARE_ENABLED := $(shell grep ^CONFIG_FIRMWARE_IN_KERNEL=y $(KERNEL_CONFIG_FI | ||
55 | 55 | # but I don't want to write a complex Android.mk to build kernel. |
56 | 56 | # This is the simplest way I can think. |
57 | 57 | KERNEL_DOTCONFIG_FILE := $(KBUILD_OUTPUT)/.config |
58 | -KERNEL_ARCH_CHANGED := $(if $(filter 0,$(shell grep -s ^$(if $(filter x86,$(TARGET_KERNEL_ARCH)),\#.)CONFIG_64BIT $(KERNEL_DOTCONFIG_FILE) | wc -l)),FORCE) | |
58 | +ifneq ($(filter 0,$(shell grep -s ^$(if $(filter x86,$(TARGET_KERNEL_ARCH)),\#.)CONFIG_64BIT $(KERNEL_DOTCONFIG_FILE) | wc -l)),) | |
59 | +KERNEL_ARCH_CHANGED := $(KERNEL_DOTCONFIG_FILE)- | |
60 | +$(KERNEL_ARCH_CHANGED): | |
61 | + @touch $@ | |
62 | +endif | |
59 | 63 | $(KERNEL_DOTCONFIG_FILE): $(KERNEL_CONFIG_FILE) $(wildcard $(TARGET_KERNEL_DIFFCONFIG)) $(KERNEL_ARCH_CHANGED) |
60 | 64 | $(hide) mkdir -p $(@D) && cat $(wildcard $^) > $@ |
61 | 65 | $(hide) ln -sf ../../../../../../prebuilts $(@D) |
62 | 66 | $(mk_kernel) olddefconfig |
67 | + $(hide) rm -f $(KERNEL_ARCH_CHANGED) | |
63 | 68 | |
64 | 69 | BUILT_KERNEL_TARGET := $(KBUILD_OUTPUT)/arch/$(TARGET_ARCH)/boot/$(KERNEL_TARGET) |
65 | 70 | $(BUILT_KERNEL_TARGET): $(KERNEL_DOTCONFIG_FILE) |
@@ -100,7 +105,7 @@ installclean: FILES += $(KBUILD_OUTPUT) $(INSTALLED_KERNEL_TARGET) | ||
100 | 105 | |
101 | 106 | TARGET_PREBUILT_KERNEL := $(BUILT_KERNEL_TARGET) |
102 | 107 | |
103 | -.PHONY: kernel $(if $(KERNEL_ARCH_CHANGED),$(KERNEL_HEADERS_COMMON)/linux/binder.h) | |
108 | +.PHONY: kernel | |
104 | 109 | kernel: $(INSTALLED_KERNEL_TARGET) $(KERNEL_MODULES_DEP) |
105 | 110 | |
106 | 111 | endif # TARGET_PREBUILT_KERNEL |