Makefile: support build and avb signing of dtbo img
Test: make with corresponding configurations in BoardConfig.mk - dtbo.img is copied to the OUT directory - avbtool info_image --image dtbo.img shows avb hashes - avbtool info_image --image vbmeta.img shows dtbo partition info Bug: 37730955 Change-Id: If3edaab860926c743f18fd031c911b076eb09fab
This commit is contained in:
parent
f9937b5c24
commit
211c90158c
1 changed files with 27 additions and 1 deletions
|
@ -1689,6 +1689,26 @@ INSTALLED_VENDORIMAGE_TARGET := $(PRODUCT_OUT)/vendor.img
|
||||||
$(eval $(call copy-one-file,$(BOARD_PREBUILT_VENDORIMAGE),$(INSTALLED_VENDORIMAGE_TARGET)))
|
$(eval $(call copy-one-file,$(BOARD_PREBUILT_VENDORIMAGE),$(INSTALLED_VENDORIMAGE_TARGET)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# dtbo image
|
||||||
|
ifdef BOARD_PREBUILT_DTBOIMAGE
|
||||||
|
INSTALLED_DTBOIMAGE_TARGET := $(PRODUCT_OUT)/dtbo.img
|
||||||
|
|
||||||
|
ifeq ($(BOARD_AVB_ENABLE),true)
|
||||||
|
$(INSTALLED_DTBOIMAGE_TARGET): $(BOARD_PREBUILT_DTBOIMAGE) $(AVBTOOL)
|
||||||
|
cp $(BOARD_PREBUILT_DTBOIMAGE) $@
|
||||||
|
$(AVBTOOL) add_hash_footer \
|
||||||
|
--image $@ \
|
||||||
|
--partition_size $(BOARD_DTBOIMG_PARTITION_SIZE) \
|
||||||
|
--partition_name dtbo $(INTERNAL_AVB_SIGNING_ARGS) \
|
||||||
|
$(BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS)
|
||||||
|
else
|
||||||
|
$(INSTALLED_DTBOIMAGE_TARGET): $(BOARD_PREBUILT_DTBOIMAGE)
|
||||||
|
cp $(BOARD_PREBUILT_DTBOIMAGE) $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# vbmeta image
|
# vbmeta image
|
||||||
ifeq ($(BOARD_AVB_ENABLE),true)
|
ifeq ($(BOARD_AVB_ENABLE),true)
|
||||||
|
@ -1704,6 +1724,11 @@ INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += \
|
||||||
--include_descriptors_from_image $(INSTALLED_VENDORIMAGE_TARGET)
|
--include_descriptors_from_image $(INSTALLED_VENDORIMAGE_TARGET)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef INSTALLED_DTBOIMAGE_TARGET
|
||||||
|
INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += \
|
||||||
|
--include_descriptors_from_image $(INSTALLED_DTBOIMAGE_TARGET)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
|
ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
|
||||||
INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += --setup_rootfs_from_kernel $(BUILT_SYSTEMIMAGE)
|
INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += --setup_rootfs_from_kernel $(BUILT_SYSTEMIMAGE)
|
||||||
endif
|
endif
|
||||||
|
@ -1740,7 +1765,7 @@ define build-vbmetaimage-target
|
||||||
endef
|
endef
|
||||||
|
|
||||||
INSTALLED_VBMETAIMAGE_TARGET := $(BUILT_VBMETAIMAGE_TARGET)
|
INSTALLED_VBMETAIMAGE_TARGET := $(BUILT_VBMETAIMAGE_TARGET)
|
||||||
$(INSTALLED_VBMETAIMAGE_TARGET): $(AVBTOOL) $(INSTALLED_BOOTIMAGE_TARGET) $(INSTALLED_SYSTEMIMAGE) $(INSTALLED_VENDORIMAGE_TARGET)
|
$(INSTALLED_VBMETAIMAGE_TARGET): $(AVBTOOL) $(INSTALLED_BOOTIMAGE_TARGET) $(INSTALLED_SYSTEMIMAGE) $(INSTALLED_VENDORIMAGE_TARGET) $(INSTALLED_DTBOIMAGE_TARGET)
|
||||||
$(build-vbmetaimage-target)
|
$(build-vbmetaimage-target)
|
||||||
|
|
||||||
.PHONY: vbmetaimage-nodeps
|
.PHONY: vbmetaimage-nodeps
|
||||||
|
@ -1980,6 +2005,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \
|
||||||
$(INSTALLED_USERDATAIMAGE_TARGET) \
|
$(INSTALLED_USERDATAIMAGE_TARGET) \
|
||||||
$(INSTALLED_CACHEIMAGE_TARGET) \
|
$(INSTALLED_CACHEIMAGE_TARGET) \
|
||||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||||
|
$(INSTALLED_DTBOIMAGE_TARGET) \
|
||||||
$(INTERNAL_SYSTEMOTHERIMAGE_FILES) \
|
$(INTERNAL_SYSTEMOTHERIMAGE_FILES) \
|
||||||
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
|
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
|
||||||
$(INSTALLED_KERNEL_TARGET) \
|
$(INSTALLED_KERNEL_TARGET) \
|
||||||
|
|
Loading…
Reference in a new issue