diff options
author | Ji Luo <ji.luo@nxp.com> | 2019-01-14 18:28:08 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2019-01-18 12:07:21 +0800 |
commit | 71562aae3b8123ccd7503e596e478951568fcd24 (patch) | |
tree | 30dd62bf0a3534a144ba5b7b8ff50a7fa3094172 /common | |
parent | 1614541095c7e91989556b52b7d7605f7d8570af (diff) |
MA-13938 [Android] imx8q: Support dual bootloader feature
Support dual bootloader feature for imx8q which uses the
container format. Move the A/B slot select and verify to
SPL stage, the bootloader rollback index will be stored
at the last 8K bytes of eMMC rpmb storage.
Test: Boot and rbindex verify pass on imx8q.
Change-Id: I0a48210f65984a083037a0cd3f9558951029ed7d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl_mmc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 87e8731130..12ba4411a3 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -64,6 +64,8 @@ int check_rpmb_blob(struct mmc *mmc); */ extern int mmc_load_image_raw_sector_dual_uboot(struct spl_image_info *spl_image, struct mmc *mmc); +extern int mmc_load_image_parse_container_dual_uboot(struct spl_image_info *spl_image, + struct mmc *mmc); #else static __maybe_unused int mmc_load_image_raw_sector(struct spl_image_info *spl_image, @@ -325,6 +327,14 @@ int __weak mmc_load_image_parse_container(struct spl_image_info *spl_image, { return -ENODEV; }; + +#ifdef CONFIG_DUAL_BOOTLOADER +int __weak mmc_load_image_parse_container_dual_bootloader(struct spl_image_info *spl_image, + struct mmc *mmc, unsigned long sector) +{ + return -ENODEV; +}; +#endif #endif int spl_mmc_load_image(struct spl_image_info *spl_image, @@ -394,8 +404,13 @@ int spl_mmc_load_image(struct spl_image_info *spl_image, #endif #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR #ifdef CONFIG_DUAL_BOOTLOADER +#ifdef CONFIG_PARSE_CONTAINER + err = mmc_load_image_parse_container_dual_uboot(spl_image, + mmc); +#else err = mmc_load_image_raw_sector_dual_uboot(spl_image, mmc); +#endif #else #ifdef CONFIG_PARSE_CONTAINER err = mmc_load_image_parse_container(spl_image, mmc, |