From 3687e028283f8e750d904750918a560b2a635159 Mon Sep 17 00:00:00 2001 From: Ji Luo Date: Fri, 28 Sep 2018 10:21:11 +0800 Subject: MA-12943 [VTS] Fix firmware dtbo verify fail VTS need commandline 'androidboot.dtbo_idx=' to verify fdt overlay. Pass the dtb index as "0" here since we only have one dtb in dtbo partition and haven't enabled the dtb overlay. Test: VTS case "VtsFirmwareDtboVerification#testVerifyOverlay" pass on imx8mq and imx8qxp. Change-Id: I33b089bf5a945e0b558bbb189b183a38f145dcbe Signed-off-by: Ji Luo (cherry picked from commit 4d7f5fd7afbe8516757928ba7ff76b768a80c094) --- common/image-android.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/image-android.c b/common/image-android.c index 27e8659a39..f569725c82 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -194,6 +194,15 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, } #endif + /* VTS need this commandline to verify fdt overlay. Pass the + * dtb index as "0" here since we only have one dtb in dtbo + * partition and haven't enabled the dtb overlay. + */ +#if defined(CONFIG_ANDROID_SUPPORT) || defined(CONFIG_ANDROID_AUTO_SUPPORT) + sprintf(newbootargs," androidboot.dtbo_idx=0"); + strncat(commandline, newbootargs, sizeof(commandline) - strlen(commandline)); +#endif + #ifdef CONFIG_IMX_TRUSTY_OS char *bootargs_trusty = "androidboot.keystore=trusty"; strncat(commandline, " ", sizeof(commandline) - strlen(commandline)); -- cgit v1.2.3