diff options
author | Ji Luo <ji.luo@nxp.com> | 2018-11-21 09:44:17 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2018-11-21 10:51:19 +0800 |
commit | eb1892df164fe021a2a4578bf1ec9aa5d7bdcb7b (patch) | |
tree | 7beb7da3c92630a627d8ef67008db942f60e4317 /common | |
parent | 566b798213ab9690966f163de2765acdbfe647a7 (diff) |
MA-13480-1 [Auto] Fix XEN hang with wrong keymaster service
Pass "androidboot.keystore=trusty" for trusty backed keymaster
service, pass "androidboot.keystore=software" for software
keymaster service.
Test: boot pass on imx8qm_mek.
Change-Id: I9fa38c15a7c10aef09ab29b0e9859b690e3e7a41
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/image-android.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/image-android.c b/common/image-android.c index bd47a6fcd4..67cb86f0fe 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -211,14 +211,16 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, strncat(commandline, newbootargs, sizeof(commandline) - strlen(commandline)); #endif -#ifdef CONFIG_IMX_TRUSTY_OS char *keystore = env_get("keystore"); - if (!strncpy(keystore, "software", sizeof("software"))) { + if ((keystore == NULL) || strncmp(keystore, "trusty", sizeof("trusty"))) { + char *bootargs_trusty = "androidboot.keystore=software"; + strncat(commandline, " ", sizeof(commandline) - strlen(commandline)); + strncat(commandline, bootargs_trusty, sizeof(commandline) - strlen(commandline)); + } else { char *bootargs_trusty = "androidboot.keystore=trusty"; strncat(commandline, " ", sizeof(commandline) - strlen(commandline)); strncat(commandline, bootargs_trusty, sizeof(commandline) - strlen(commandline)); } -#endif /* Add 'append_bootargs' to hold some paramemters which need to be appended * to bootargs */ |