Convert CONFIG_SYS_BOOTM_LEN to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_BOOTM_LEN
As part of this, rework error handling in boot/bootm.c so that we pass
the buffer size to handle_decomp_error as CONFIG_SYS_BOOTM_LEN will not
be available to host tools but we do know the size that we passed to
malloc().
Cc: Soeren Moch <smoch@web.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/cmd/Kconfig b/cmd/Kconfig
index bb956e3..d5f8421 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -335,6 +335,16 @@
help
Support booting VxWorks images via the bootm command.
+config SYS_BOOTM_LEN
+ hex "Maximum size of a decompresed OS image"
+ depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ
+ default 0x4000000 if PPC || ARM64
+ default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7
+ default 0x800000
+ help
+ This is the maximum size of the buffer that is used to decompress the OS
+ image in to, if passing a compressed image to bootm/booti/bootz.
+
config CMD_BOOTEFI
bool "bootefi"
depends on EFI_LOADER