summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2e0876f)
raw | patch | inline | side by side (parent: 2e0876f)
author | Alistair Strachan <astrachan@google.com> | |
Fri, 28 Sep 2018 19:36:36 +0000 (12:36 -0700) | ||
committer | Alistair Strachan <astrachan@google.com> | |
Fri, 28 Sep 2018 19:47:33 +0000 (12:47 -0700) |
The rules for BOOTIMG_FIT depended on INSTALLED_KERNEL_TARGET and
INSTALLED_RAMDISK_TARGET, but these variables may not have been defined
at the point the Makefile was parsed and simply-expanded, so the rules
to build BOOTIMG_FIT could race with the creation of the installed kernel
and ramdisk targets.
Fix this problem by locally defining BOOTIMG_FIT_INSTALLED_KERNEL_TARGET
and BOOTIMG_FIT_INSTALLED_RAMDISK_TARGET to sensible defaults and copy
them to PRIVATE_ variants in the recipe.
Bug: 110964307
Test: local build with m -j128
Change-Id: I49a107c08a3e010035260c21258a7c7dade6c7e7
Signed-off-by: Alistair Strachan <astrachan@google.com>
INSTALLED_RAMDISK_TARGET, but these variables may not have been defined
at the point the Makefile was parsed and simply-expanded, so the rules
to build BOOTIMG_FIT could race with the creation of the installed kernel
and ramdisk targets.
Fix this problem by locally defining BOOTIMG_FIT_INSTALLED_KERNEL_TARGET
and BOOTIMG_FIT_INSTALLED_RAMDISK_TARGET to sensible defaults and copy
them to PRIVATE_ variants in the recipe.
Bug: 110964307
Test: local build with m -j128
Change-Id: I49a107c08a3e010035260c21258a7c7dade6c7e7
Signed-off-by: Alistair Strachan <astrachan@google.com>
boot_fit/Android.mk | patch | blob | history |
diff --git a/boot_fit/Android.mk b/boot_fit/Android.mk
index 2cf6ef04c1267fa4a1308fa75c02191be2a9a26e..c16ccfe2087b75b12bab8b655bdb086876d8b704 100644 (file)
--- a/boot_fit/Android.mk
+++ b/boot_fit/Android.mk
BOARD_DIR := device/ti/beagle_x15
ITS := beagle_x15.its
BOOTIMG_FIT := $(PRODUCT_OUT)/boot_fit.img
+BOOTIMG_FIT_INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel
+BOOTIMG_FIT_INSTALLED_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
$(BOOTIMG_FIT): PRIVATE_DTC_FLAGS_MKIMAGE = -I dts -O dtb -p 500 -Wno-unit_address_vs_reg
$(BOOTIMG_FIT): PRIVATE_INTERMEDIATES := $(call intermediates-dir-for,PACKAGING,fit)
$(BOOTIMG_FIT): PRIVATE_ITS := $(ITS)
$(BOOTIMG_FIT): PRIVATE_MKIMAGE := $(MKIMAGE)
$(BOOTIMG_FIT): PRIVATE_BOARD_DIR := $(BOARD_DIR)
-$(BOOTIMG_FIT): $(INSTALLED_KERNEL_TARGET) $(INSTALLED_RAMDISK_TARGET) $(BOARD_DIR)/$(ITS) $(MKIMAGE) $(DTC) $(wildcard $(LOCAL_KERNEL)/*.dtb)
+$(BOOTIMG_FIT): PRIVATE_INSTALLED_KERNEL_TARGET := $(BOOTIMG_FIT_INSTALLED_KERNEL_TARGET)
+$(BOOTIMG_FIT): PRIVATE_INSTALLED_RAMDISK_TARGET := $(BOOTIMG_FIT_INSTALLED_RAMDISK_TARGET)
+$(BOOTIMG_FIT): $(BOOTIMG_FIT_INSTALLED_KERNEL_TARGET) $(BOOTIMG_FIT_INSTALLED_RAMDISK_TARGET)
+$(BOOTIMG_FIT): $(BOARD_DIR)/$(ITS) $(MKIMAGE) $(DTC) $(wildcard $(LOCAL_KERNEL)/*.dtb)
mkdir -p $(PRIVATE_INTERMEDIATES)
cp $(PRIVATE_BOARD_DIR)/$(PRIVATE_ITS) $(PRIVATE_INTERMEDIATES)/
- cp $(INSTALLED_RAMDISK_TARGET) $(PRIVATE_INTERMEDIATES)/
- cp $(INSTALLED_KERNEL_TARGET) $(PRIVATE_INTERMEDIATES)/zImage
+ cp $(PRIVATE_INSTALLED_RAMDISK_TARGET) $(PRIVATE_INTERMEDIATES)/
+ cp $(PRIVATE_INSTALLED_KERNEL_TARGET) $(PRIVATE_INTERMEDIATES)/zImage
cp $(LOCAL_KERNEL)/*.dtb $(PRIVATE_INTERMEDIATES)/
PATH=$(HOST_OUT_EXECUTABLES):$$PATH $(PRIVATE_MKIMAGE) -D "$(PRIVATE_DTC_FLAGS_MKIMAGE)" -f $(PRIVATE_INTERMEDIATES)/$(PRIVATE_ITS) $@