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
This commit is contained in:
parent
2995096483
commit
4866bd6bff
|
@ -2557,7 +2557,12 @@ endif # BUILDING_RAMDISK_IMAGE
|
||||||
# can only be used if the device is unlocked with verification error.
|
# can only be used if the device is unlocked with verification error.
|
||||||
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
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
|
# 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))
|
INTERNAL_TEST_HARNESS_BOOTIMAGE_ARGS := $(subst $(INSTALLED_DEBUG_RAMDISK_TARGET),$(INSTALLED_TEST_HARNESS_RAMDISK_TARGET),$(INTERNAL_DEBUG_BOOTIMAGE_ARGS))
|
||||||
|
@ -2570,17 +2575,22 @@ ifneq ($(BOARD_AVB_BOOT_KEY_PATH),)
|
||||||
$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET): $(AVBTOOL) $(BOARD_AVB_BOOT_TEST_KEY_PATH)
|
$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET): $(AVBTOOL) $(BOARD_AVB_BOOT_TEST_KEY_PATH)
|
||||||
endif
|
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.
|
# 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)
|
$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DEBUG_BOOTIMAGE_TARGET) $(INSTALLED_TEST_HARNESS_RAMDISK_TARGET)
|
||||||
$(call pretty,"Target boot test harness image: $@")
|
$(call pretty,"Target boot test harness image: $@")
|
||||||
$(MKBOOTIMG) $(INTERNAL_TEST_HARNESS_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
$(call build-boot-test-harness-target,$@)
|
||||||
$(if $(BOARD_AVB_BOOT_KEY_PATH),$(call test-key-sign-bootimage,$@))
|
|
||||||
|
|
||||||
.PHONY: bootimage_test_harness-nodeps
|
.PHONY: bootimage_test_harness-nodeps
|
||||||
bootimage_test_harness-nodeps: $(MKBOOTIMG)
|
bootimage_test_harness-nodeps: $(MKBOOTIMG)
|
||||||
echo "make $@: ignoring dependencies"
|
echo "make $@: ignoring dependencies"
|
||||||
$(MKBOOTIMG) $(INTERNAL_TEST_HARNESS_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET)
|
$(foreach b,$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET),$(call build-boot-test-harness-target,$b))
|
||||||
$(if $(BOARD_AVB_BOOT_KEY_PATH),$(call test-key-sign-bootimage,$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET)))
|
|
||||||
|
|
||||||
endif # TARGET_NO_KERNEL
|
endif # TARGET_NO_KERNEL
|
||||||
endif # BOARD_BUILD_SYSTEM_ROOT_IMAGE is not true
|
endif # BOARD_BUILD_SYSTEM_ROOT_IMAGE is not true
|
||||||
|
|
Loading…
Reference in New Issue