aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2021-09-01 09:06:17 +1000
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-09-09 12:49:23 +0530
commit0b3276fede4dee03c5e8b27281d92cef503475aa (patch)
tree1c582f6560d4ed1e937d6bd9af1f5ad1382c9d6b
parent6352fa85e23f3c620544edcb3feb971d3babd746 (diff)
downloadskiboot-0b3276fede4dee03c5e8b27281d92cef503475aa.zip
skiboot-0b3276fede4dee03c5e8b27281d92cef503475aa.tar.gz
skiboot-0b3276fede4dee03c5e8b27281d92cef503475aa.tar.bz2
external/mambo: Print more info when the kernel is too big
Make it a bit easier to boot large kernels by printing more info when the kernel is too big, so the user has some idea how much they need to adjust PAYLOAD_ADDR by. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-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