summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlistair Strachan2018-09-27 17:00:47 -0500
committerAlistair Strachan2018-09-27 17:00:49 -0500
commit2e0876f56d5f1828732002da289f8580e6fc0edb (patch)
treef2660b9b4567f77a1a814764b0dab47fe18a4486
parent240b7107c506dc7bb210ff2667dcd6fd962f3bb2 (diff)
downloaddevice-ti-beagle-x15-2e0876f56d5f1828732002da289f8580e6fc0edb.tar.gz
device-ti-beagle-x15-2e0876f56d5f1828732002da289f8580e6fc0edb.tar.xz
device-ti-beagle-x15-2e0876f56d5f1828732002da289f8580e6fc0edb.zip
Fix BOOTIMG_FIT for new AOSP restrictions
Make the BOOTIMG_FIT target work correctly with current AOSP. The current AOSP build system blocks the use of mkimage because it calls out to 'dtc', which may not have been build as a host tool, and uses the host system's copy, which is no longer allowed. This change makes sure the dependencies are property specified for 'dtc' and ensures PATH is set correctly for the invocation by mkimage. Test: local build for beagle_x15 lunch target Change-Id: Ie1e7df43b96054f736cd0ce194220078dda74ef0 Signed-off-by: Alistair Strachan <astrachan@google.com>
-rw-r--r--boot_fit/Android.mk22
1 files changed, 13 insertions, 9 deletions
diff --git a/boot_fit/Android.mk b/boot_fit/Android.mk
index c0f0306..2cf6ef0 100644
--- a/boot_fit/Android.mk
+++ b/boot_fit/Android.mk
@@ -2,19 +2,23 @@ ifneq ($(filter beagle_x15%, $(TARGET_DEVICE)),)
2ifeq ($(TARGET_BOOTIMAGE_FIT), true) 2ifeq ($(TARGET_BOOTIMAGE_FIT), true)
3 3
4MKIMAGE := $(HOST_OUT_EXECUTABLES)/mkimage 4MKIMAGE := $(HOST_OUT_EXECUTABLES)/mkimage
5DTC_FLAGS_MKIMAGE = -I dts -O dtb -p 500 -Wno-unit_address_vs_reg 5DTC := $(HOST_OUT_EXECUTABLES)/dtc
6BOARD_DIR := device/ti/beagle_x15 6BOARD_DIR := device/ti/beagle_x15
7FIT_DIR := $(PRODUCT_OUT)/obj/fit
8ITS := beagle_x15.its 7ITS := beagle_x15.its
9BOOTIMG_FIT := $(PRODUCT_OUT)/boot_fit.img 8BOOTIMG_FIT := $(PRODUCT_OUT)/boot_fit.img
10 9
11$(BOOTIMG_FIT): $(INSTALLED_KERNEL_TARGET) $(INSTALLED_RAMDISK_TARGET) $(BOARD_DIR)/$(ITS) $(MKIMAGE) 10$(BOOTIMG_FIT): PRIVATE_DTC_FLAGS_MKIMAGE = -I dts -O dtb -p 500 -Wno-unit_address_vs_reg
12 mkdir -p $(FIT_DIR) 11$(BOOTIMG_FIT): PRIVATE_INTERMEDIATES := $(call intermediates-dir-for,PACKAGING,fit)
13 cp $(BOARD_DIR)/$(ITS) $(FIT_DIR) 12$(BOOTIMG_FIT): PRIVATE_ITS := $(ITS)
14 cp $(INSTALLED_RAMDISK_TARGET) $(FIT_DIR) 13$(BOOTIMG_FIT): PRIVATE_MKIMAGE := $(MKIMAGE)
15 cp $(INSTALLED_KERNEL_TARGET) $(FIT_DIR)/zImage 14$(BOOTIMG_FIT): PRIVATE_BOARD_DIR := $(BOARD_DIR)
16 cp $(LOCAL_KERNEL)/*.dtb $(FIT_DIR) 15$(BOOTIMG_FIT): $(INSTALLED_KERNEL_TARGET) $(INSTALLED_RAMDISK_TARGET) $(BOARD_DIR)/$(ITS) $(MKIMAGE) $(DTC) $(wildcard $(LOCAL_KERNEL)/*.dtb)
17 $(MKIMAGE) -D "$(DTC_FLAGS_MKIMAGE)" -f $(FIT_DIR)/$(ITS) $@ 16 mkdir -p $(PRIVATE_INTERMEDIATES)
17 cp $(PRIVATE_BOARD_DIR)/$(PRIVATE_ITS) $(PRIVATE_INTERMEDIATES)/
18 cp $(INSTALLED_RAMDISK_TARGET) $(PRIVATE_INTERMEDIATES)/
19 cp $(INSTALLED_KERNEL_TARGET) $(PRIVATE_INTERMEDIATES)/zImage
20 cp $(LOCAL_KERNEL)/*.dtb $(PRIVATE_INTERMEDIATES)/
21 PATH=$(HOST_OUT_EXECUTABLES):$$PATH $(PRIVATE_MKIMAGE) -D "$(PRIVATE_DTC_FLAGS_MKIMAGE)" -f $(PRIVATE_INTERMEDIATES)/$(PRIVATE_ITS) $@
18 22
19include $(CLEAR_VARS) 23include $(CLEAR_VARS)
20LOCAL_MODULE := bootfitimage 24LOCAL_MODULE := bootfitimage