• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

build


Commit MetaInfo

修訂b82999db71809f0296391286b5be6f9014b7ecc8 (tree)
時間2017-10-31 17:30:31
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

kernel.mk: avoid conflict with LineageOS's kernel.mk

We defined TARGET_PREBUILT_KERNEL to be equal to INSTALLED_KERNEL_TARGET
but LineageOS's kernel.mk would copy TARGET_PREBUILT_KERNEL to
INSTALLED_KERNEL_TARGET that results in a dependency cycle.

Adjust our definition to avoid that.

Change Summary

差異

--- a/core/tasks/kernel.mk
+++ b/core/tasks/kernel.mk
@@ -51,9 +51,8 @@ $(KERNEL_DOTCONFIG_FILE): $(KERNEL_CONFIG_FILE) $(wildcard $(TARGET_KERNEL_DIFFC
5151 BISON := $(HOST_OUT_EXECUTABLES)/bison$(HOST_EXECUTABLE_SUFFIX)
5252
5353 BUILT_KERNEL_TARGET := $(KBUILD_OUTPUT)/arch/$(TARGET_ARCH)/boot/$(KERNEL_TARGET)
54-$(INSTALLED_KERNEL_TARGET): $(KERNEL_DOTCONFIG_FILE) | $(ACP) $(BISON)
54+$(BUILT_KERNEL_TARGET): $(KERNEL_DOTCONFIG_FILE) | $(BISON)
5555 $(mk_kernel) $(KERNEL_TARGET) $(if $(MOD_ENABLED),modules)
56- $(hide) $(ACP) -fp $(BUILT_KERNEL_TARGET) $@
5756 $(if $(FIRMWARE_ENABLED),$(mk_kernel) INSTALL_MOD_PATH=$(abspath $(TARGET_OUT)) firmware_install)
5857
5958 ifneq ($(MOD_ENABLED),)
@@ -61,12 +60,12 @@ KERNEL_MODULES_DEP := $(firstword $(wildcard $(TARGET_OUT)/lib/modules/*/modules
6160 KERNEL_MODULES_DEP := $(if $(KERNEL_MODULES_DEP),$(KERNEL_MODULES_DEP),$(TARGET_OUT)/lib/modules)
6261
6362 ALL_EXTRA_MODULES := $(patsubst %,$(TARGET_OUT_INTERMEDIATES)/kmodule/%,$(TARGET_EXTRA_KERNEL_MODULES))
64-$(ALL_EXTRA_MODULES): $(TARGET_OUT_INTERMEDIATES)/kmodule/%: $(INSTALLED_KERNEL_TARGET)
63+$(ALL_EXTRA_MODULES): $(TARGET_OUT_INTERMEDIATES)/kmodule/%: $(BUILT_KERNEL_TARGET)
6564 @echo Building additional kernel module $*
6665 $(hide) mkdir -p $(@D) && $(ACP) -fr $(EXTRA_KERNEL_MODULE_PATH_$*) $(@D)
6766 $(mk_kernel) M=$(abspath $@) modules
6867
69-$(KERNEL_MODULES_DEP): $(INSTALLED_KERNEL_TARGET) $(ALL_EXTRA_MODULES)
68+$(KERNEL_MODULES_DEP): $(BUILT_KERNEL_TARGET) $(ALL_EXTRA_MODULES)
7069 $(hide) rm -rf $(TARGET_OUT)/lib/modules
7170 $(mk_kernel) INSTALL_MOD_PATH=$(abspath $(TARGET_OUT)) modules_install
7271 $(hide) for kmod in $(TARGET_EXTRA_KERNEL_MODULES) ; do \
@@ -88,19 +87,19 @@ endif
8887
8988 installclean: FILES += $(KBUILD_OUTPUT) $(INSTALLED_KERNEL_TARGET)
9089
91-TARGET_PREBUILT_KERNEL := $(INSTALLED_KERNEL_TARGET)
90+TARGET_PREBUILT_KERNEL := $(BUILT_KERNEL_TARGET)
9291
9392 .PHONY: kernel $(if $(KERNEL_ARCH_CHANGED),$(KERNEL_HEADERS_COMMON)/linux/binder.h)
94-kernel: $(TARGET_PREBUILT_KERNEL)
93+kernel: $(INSTALLED_KERNEL_TARGET)
9594
96-else
95+endif # TARGET_PREBUILT_KERNEL
9796
97+ifndef CM_BUILD
9898 $(INSTALLED_KERNEL_TARGET): $(TARGET_PREBUILT_KERNEL) | $(ACP)
9999 $(copy-file-to-new-target)
100100 ifdef TARGET_PREBUILT_MODULES
101101 mkdir -p $(TARGET_OUT)/lib
102102 $(hide) cp -r $(TARGET_PREBUILT_MODULES) $(TARGET_OUT)/lib
103103 endif
104-
105-endif # TARGET_PREBUILT_KERNEL
104+endif # CM_BUILD
106105 endif # KBUILD_OUTPUT