mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 22:14:54 +00:00
imxtract: specify max gunzip size
Specify max gunzip size from config to override SYS_XIMG_LEN default value wich is 0x800000. In case we have a large portion of FIT image, for example gzipped kernel with decompressed size large than 0x800000 we should enlarge imxract area, otherwise extracting it will fail. It used to be a hardcoded define in cmd/ximg.c and we are moving it to config. Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f7655af980
commit
05e8e2403c
2 changed files with 11 additions and 6 deletions
10
cmd/Kconfig
10
cmd/Kconfig
|
@ -495,6 +495,16 @@ config CMD_XIMG
|
||||||
help
|
help
|
||||||
Extract a part of a multi-image.
|
Extract a part of a multi-image.
|
||||||
|
|
||||||
|
config SYS_XIMG_LEN
|
||||||
|
hex "imxtract max gunzip size"
|
||||||
|
default 0x800000
|
||||||
|
depends on CMD_XIMG && GZIP
|
||||||
|
help
|
||||||
|
This provides the size of the commad-line argument area
|
||||||
|
used by imxtract for extracting pieces of FIT image.
|
||||||
|
It should be large enough to fit uncompressed size of
|
||||||
|
FIT piece we are extracting.
|
||||||
|
|
||||||
config CMD_SPL
|
config CMD_SPL
|
||||||
bool "spl export - Export boot information for Falcon boot"
|
bool "spl export - Export boot information for Falcon boot"
|
||||||
depends on SPL
|
depends on SPL
|
||||||
|
|
|
@ -27,11 +27,6 @@
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
#ifndef CFG_SYS_XIMG_LEN
|
|
||||||
/* use 8MByte as default max gunzip size */
|
|
||||||
#define CFG_SYS_XIMG_LEN 0x800000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
|
@ -52,7 +47,7 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
size_t fit_len;
|
size_t fit_len;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_GZIP
|
#ifdef CONFIG_GZIP
|
||||||
uint unc_len = CFG_SYS_XIMG_LEN;
|
uint unc_len = CONFIG_SYS_XIMG_LEN;
|
||||||
#endif
|
#endif
|
||||||
uint8_t comp;
|
uint8_t comp;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue