summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/image-android.c9
-rw-r--r--common/spl/spl_mmc.c9
2 files changed, 15 insertions, 3 deletions
diff --git a/common/image-android.c b/common/image-android.c
index f569725c82a..dac4236bdbc 100644
--- a/common/image-android.c
+++ b/common/image-android.c
@@ -204,9 +204,12 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify,
#endif
#ifdef CONFIG_IMX_TRUSTY_OS
- char *bootargs_trusty = "androidboot.keystore=trusty";
- strncat(commandline, " ", sizeof(commandline) - strlen(commandline));
- strncat(commandline, bootargs_trusty, sizeof(commandline) - strlen(commandline));
+ char *keystore = env_get("keystore");
+ if (!strncpy(keystore, "software", sizeof("software"))) {
+ 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
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 90935aab1aa..91b5190c073 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -54,6 +54,11 @@ ulong h_spl_load_read(struct spl_load_info *load, ulong sector,
return blk_dread(mmc_get_blk_desc(mmc), sector, count, buf);
}
+#if defined(CONFIG_IMX_TRUSTY_OS) && defined(CONFIG_ANDROID_AUTO_SUPPORT)
+/* Pre-declaration of check_rpmb_blob. */
+int check_rpmb_blob(struct mmc *mmc);
+#endif
+
#ifdef CONFIG_DUAL_BOOTLOADER
/* Pre-declaration of mmc_load_image_raw_sector_dual_uboot().
*/
@@ -103,6 +108,10 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image,
return -1;
}
+ /* Images loaded, now check the rpmb keyblob for Trusty OS. */
+#if defined(CONFIG_IMX_TRUSTY_OS) && defined(CONFIG_ANDROID_AUTO_SUPPORT)
+ ret = check_rpmb_blob(mmc);
+#endif
return 0;
}