aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2020-06-12 15:41:20 +0300
committerTom Rini <trini@konsulko.com>2020-07-17 08:51:01 -0400
commitfbde7589ce3049318a0e9495db72472af03704af (patch)
tree21643da4348e8bc037e1cefe973400d8e3733c63 /cmd
parent19c6808d87de3a9d8889a5881efc9467d3b50826 (diff)
downloadu-boot-fbde7589ce3049318a0e9495db72472af03704af.zip
u-boot-fbde7589ce3049318a0e9495db72472af03704af.tar.gz
u-boot-fbde7589ce3049318a0e9495db72472af03704af.tar.bz2
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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/booti.c2
-rw-r--r--cmd/bootz.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/booti.c b/cmd/booti.c
index af0603b..bfc0742 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -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;
diff --git a/cmd/bootz.c b/cmd/bootz.c
index bc15fd8e..1c8b0cf 100644
--- a/cmd/bootz.c
+++ b/cmd/bootz.c
@@ -54,7 +54,7 @@ static int bootz_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, zi_start, zi_end - zi_start))
return 1;
return 0;