diff options
Diffstat (limited to 'common/spl/spl_fit.c')
-rw-r--r-- | common/spl/spl_fit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 5955e9fc85..dd887ded56 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -63,6 +63,10 @@ static int find_node_from_desc(const void *fit, int node, const char *str) return -ENOENT; } +#ifdef CONFIG_DUAL_BOOTLOADER +extern int spl_fit_get_rbindex(const void *fit, int images); +#endif + /** * spl_fit_get_image_name(): By using the matching configuration subnode, * retrieve the name of an image, specified by a property name and an index @@ -572,6 +576,16 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, return -1; } +#if defined(CONFIG_DUAL_BOOTLOADER) && defined(CONFIG_IMX_TRUSTY_OS) + int rbindex; + rbindex = spl_fit_get_rbindex(fit, images); + if (rbindex < 0) { + printf("Error! Can't get rollback index!\n"); + return -1; + } else + spl_image->rbindex = rbindex; +#endif + #ifdef CONFIG_SPL_FPGA_SUPPORT node = spl_fit_get_image_node(fit, images, "fpga", 0); if (node >= 0) { |