mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 12:54:37 +00:00
sandbox: Enable support for the gzip command
This does not work with sandbox at present. Fix it up to use map_sysmem() to convert an address to a pointer. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6a19e938f8
commit
6cdc8be7c5
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <gzip.h>
|
#include <gzip.h>
|
||||||
|
#include <mapmem.h>
|
||||||
#include <part.h>
|
#include <part.h>
|
||||||
|
|
||||||
static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc,
|
static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
@ -28,7 +29,8 @@ static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
return CMD_RET_USAGE;
|
return CMD_RET_USAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
|
if (gunzip(map_sysmem(dst, dst_len), dst_len, map_sysmem(src, 0),
|
||||||
|
&src_len) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len);
|
printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len);
|
||||||
|
|
Loading…
Add table
Reference in a new issue