common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image

These cases are typically fatal and are difficult to debug for random
users. Add checks for detecting overlapping images and abort if overlap
is detected.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
This commit is contained in:
Tero Kristo
2020-06-12 15:41:20 +03:00
committed by Tom Rini
parent 19c6808d87
commit fbde7589ce
5 changed files with 33 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc,
* Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not
* have a header that provide this informaiton.
*/
if (bootm_find_images(flag, argc, argv))
if (bootm_find_images(flag, argc, argv, relocated_addr, image_size))
return 1;
return 0;