fix boot-test-harness.img build
The recently added support for multiple kernels and boot.img files missed the boot-test-harness.img. Bug: 152464066 Change-Id: I6e146a0702bc933e0b62f36dc34aba913e57316f Merged-In: I6e146a0702bc933e0b62f36dc34aba913e57316f
This commit is contained in:
parent
39ab00b6fe
commit
6e038c3183
1 changed files with 15 additions and 5 deletions
|
@ -2515,7 +2515,12 @@ endif # BUILDING_RAMDISK_IMAGE
|
|||
# can only be used if the device is unlocked with verification error.
|
||||
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
||||
|
||||
INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot-test-harness.img
|
||||
ifneq ($(strip $(BOARD_KERNEL_BINARIES)),)
|
||||
INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET := $(foreach k,$(subst kernel,boot-test-harness,$(BOARD_KERNEL_BINARIES)), \
|
||||
$(PRODUCT_OUT)/$(k).img)
|
||||
else
|
||||
INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot-test-harness.img
|
||||
endif
|
||||
|
||||
# Replace ramdisk-debug.img in $(MKBOOTIMG) ARGS with ramdisk-test-harness.img to build boot-test-harness.img
|
||||
INTERNAL_TEST_HARNESS_BOOTIMAGE_ARGS := $(subst $(INSTALLED_DEBUG_RAMDISK_TARGET),$(INSTALLED_TEST_HARNESS_RAMDISK_TARGET),$(INTERNAL_DEBUG_BOOTIMAGE_ARGS))
|
||||
|
@ -2528,17 +2533,22 @@ ifneq ($(BOARD_AVB_BOOT_KEY_PATH),)
|
|||
$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET): $(AVBTOOL) $(BOARD_AVB_BOOT_TEST_KEY_PATH)
|
||||
endif
|
||||
|
||||
# $(1): output file
|
||||
define build-boot-test-harness-target
|
||||
$(MKBOOTIMG) --kernel $(PRODUCT_OUT)/$(subst .img,,$(subst boot-test-harness,kernel,$(notdir $(1)))) \
|
||||
$(INTERNAL_TEST_HARNESS_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
||||
$(if $(BOARD_AVB_BOOT_KEY_PATH),$(call test-key-sign-bootimage,$@))
|
||||
endef
|
||||
|
||||
# Build the new boot-test-harness.img, based on boot-debug.img and ramdisk-test-harness.img.
|
||||
$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DEBUG_BOOTIMAGE_TARGET) $(INSTALLED_TEST_HARNESS_RAMDISK_TARGET)
|
||||
$(call pretty,"Target boot test harness image: $@")
|
||||
$(MKBOOTIMG) $(INTERNAL_TEST_HARNESS_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
||||
$(if $(BOARD_AVB_BOOT_KEY_PATH),$(call test-key-sign-bootimage,$@))
|
||||
$(call build-boot-test-harness-target,$@)
|
||||
|
||||
.PHONY: bootimage_test_harness-nodeps
|
||||
bootimage_test_harness-nodeps: $(MKBOOTIMG)
|
||||
echo "make $@: ignoring dependencies"
|
||||
$(MKBOOTIMG) $(INTERNAL_TEST_HARNESS_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET)
|
||||
$(if $(BOARD_AVB_BOOT_KEY_PATH),$(call test-key-sign-bootimage,$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET)))
|
||||
$(foreach b,$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET),$(call build-boot-test-harness-target,$b))
|
||||
|
||||
endif # TARGET_NO_KERNEL
|
||||
endif # BOARD_BUILD_SYSTEM_ROOT_IMAGE is not true
|
||||
|
|
Loading…
Reference in a new issue