aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/mambo/skiboot.tcl6
1 files changed, 4 insertions, 2 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 0ecb55a..91617b7 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -705,8 +705,10 @@ mysim memory fread $mconf(boot_load) $boot_size $mconf(boot_image)
set payload_size [file size $mconf(payload)]
mysim memory fread $mconf(payload_addr) $payload_size $mconf(payload)
-if { $payload_size > [expr $mconf(boot_load) - $mconf(payload_addr)] } {
- error "vmlinux is too large, consider adjusting PAYLOAD_ADDR"
+set available_space [expr $mconf(boot_load) - $mconf(payload_addr)]
+if { $payload_size > $available_space } {
+ set overflow [expr $payload_size - $available_space]
+ error "vmlinux is too large by $overflow bytes ($payload_size > $available_space), consider adjusting PAYLOAD_ADDR"
}
# Flatten it