common: Enable DTBO signing

Add support to sign dtbo.img using avbtools

Change-Id: Idff363511ab4469566e8f951fda68d897f058316
This commit is contained in:
Puja Gupta 2017-04-27 13:53:02 -07:00 committed by Gerrit - the friendly Code Review server
parent 4460712fbb
commit db463c61df
1 changed files with 7 additions and 1 deletions

View File

@ -144,10 +144,16 @@ define build-dtboimage-target
$(call pretty,"Target dtbo image: $(INSTALLED_DTBOIMAGE_TARGET)")
$(hide) $(MKDTIMG) create $@ --page_size=$(BOARD_KERNEL_PAGESIZE) $(dtbo_objs)
$(hide) chmod a+r $@
$(hide) $(AVBTOOL) add_hash_footer \
--image $@ \
--partition_size $(BOARD_DTBOIMAGE_PARTITION_SIZE) \
--partition_name dtbo $(INTERNAL_AVB_SIGNING_ARGS)
endef
$(INSTALLED_DTBOIMAGE_TARGET): $(MKDTIMG) $(INSTALLED_KERNEL_TARGET)
ifeq ($(BOARD_AVB_ENABLE),true)
$(INSTALLED_DTBOIMAGE_TARGET): $(MKDTIMG) $(INSTALLED_KERNEL_TARGET) $(AVBTOOL)
$(build-dtboimage-target)
endif
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DTBOIMAGE_TARGET)
ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_DTBOIMAGE_TARGET)