From 2f9acacea22b55e3c0911417ec3a403b80a4e227 Mon Sep 17 00:00:00 2001 From: Sam Protsenko Date: Fri, 2 Aug 2019 19:28:42 +0300 Subject: Enable AVB Enable Android Verified Boot 2.0 for vbmeta.img to be generated. We need to specify boot.img precise size so that AVB meta info can be added in the footer. See [1,2] for details. This change is needed for fastbootd to function properly, as it can't flash partitions when androidboot.verifiedbootstate=orange is not set (see [3]), which is done by 'avb verify' command in U-Boot (see [4]). And 'avb verify' requires vbmeta.img to be flashed to vbmeta partition. [1] https://android.googlesource.com/platform/external/avb/+/master/README.md [2] https://gitlab.denx.de/u-boot/u-boot/blob/v2019.10-rc1/doc/android/avb2.txt [3] https://android.googlesource.com/platform/system/core/+/refs/tags/android-q-preview-5/fastboot/device/utility.cpp#200 [4] https://gitlab.denx.de/u-boot/u-boot/blob/v2019.10-rc1/common/avb_verify.c#L149 Change-Id: I977fba70ad25955c9f4785d5f766c0362df083fa Signed-off-by: Sam Protsenko --- BoardConfig.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'BoardConfig.mk') diff --git a/BoardConfig.mk b/BoardConfig.mk index 853056d..5904014 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -41,6 +41,7 @@ BOARD_FLASH_BLOCK_SIZE := 4096 USE_CAMERA_STUB := true +BOARD_BOOTIMAGE_PARTITION_SIZE := 20971520 # 20 MiB BOARD_USERDATAIMAGE_PARTITION_SIZE := 1879048192 # 1792MB BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824 # 1024MB BOARD_VENDORIMAGE_PARTITION_SIZE := 268435456 # 256MB @@ -88,6 +89,8 @@ ifeq ($(SGX_KO),) $(warning SGX module search path is: $(LOCAL_KERNEL_HOME)) endif +BOARD_AVB_ENABLE := true + # Include *.dtb to boot.img and use Android Boot Image v2 BOARD_INCLUDE_DTB_IN_BOOTIMG := true BOARD_PREBUILT_DTBIMAGE_DIR := $(DTB_DIR) -- cgit v1.2.3