diff options
Diffstat (limited to 'common')
-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 9f3d4c96a4e..d9bb7d55a75 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -25,6 +25,10 @@ __weak ulong board_spl_fit_size_align(ulong size) return size; } +#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 @@ -388,6 +392,16 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, return -1; } +#ifdef CONFIG_DUAL_BOOTLOADER + 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 + /* * Find the U-Boot image using the following search order: * - start at 'firmware' (e.g. an ARM Trusted Firmware) |