
From: Simon Glass <sjg@chromium.org> The size of the loaded OS file can be useful when decompressing, or to check that the. FIT image matches its size. Add an os_size field for this in struct bootm_info so it can be recorded. Signed-off-by: Simon Glass <sjg@chromium.org> --- boot/bootm.c | 5 +++-- include/bootm.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index dac251cfb29..109bcb75142 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -1276,9 +1276,10 @@ int boot_run(struct bootm_info *bmi, const char *cmd, int extra_states) states |= BOOTM_STATE_RAMDISK; states |= extra_states; - log_debug("cmd '%s' states %x addr_img '%s' conf_ramdisk '%s' conf_fdt '%s' images %p\n", + log_debug("cmd '%s' states %x addr_img '%s' conf_ramdisk '%s' " + "conf_fdt '%s' os_size %lx images %p\n", cmd, states, bmi->addr_img, bmi->conf_ramdisk, bmi->conf_fdt, - bmi->images); + bmi->os_size, bmi->images); return bootm_run_states(bmi, states); } diff --git a/include/bootm.h b/include/bootm.h index b24148c394d..b026e1dd80d 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -62,6 +62,7 @@ enum bootm_final_t { * is reserved using lmb and this value is updated * @kern_comp_size: Maximum size of the decompressed kernel. If 0, the size is * calculated based on 4x the size of the kernel, up to a limit of 1G + * @os_size: Size of the loaded OS image in bytes, 0 if not loaded/not known * * For zboot: * @bzimage_addr: Address of the bzImage to boot, or 0 if the image has already @@ -88,6 +89,7 @@ struct bootm_info { int argc; char *const *argv; bool ignore_bootm_len; + ulong os_size; ulong kern_comp_addr; ulong kern_comp_size; -- 2.43.0