summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2018-11-21 09:44:17 +0800
committerJi Luo <ji.luo@nxp.com>2018-11-21 13:39:54 +0800
commit378fa741725e000cd1ea4d2ddd55b5042233d6b2 (patch)
tree5277a81f291717b455ba3d68f89130e9efe02406 /common
parent71398b89a06fada6c53a31e17101c3cc3a47d049 (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.c8
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 */