aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2024-05-25 18:10:53 +1000
committerSimon Glass <sjg@chromium.org>2024-07-03 07:36:32 +0100
commitd243b369e95139f77d04007755a4af42a0a03b30 (patch)
tree946fdfc07a7458a073367502d05e8bb411034af2
parent18de1afd4895bb143eb906e52b93db1b1aac6dfc (diff)
downloadu-boot-d243b369e95139f77d04007755a4af42a0a03b30.zip
u-boot-d243b369e95139f77d04007755a4af42a0a03b30.tar.gz
u-boot-d243b369e95139f77d04007755a4af42a0a03b30.tar.bz2
sandbox: enable support for the unlz4 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: Jonathan Liu <net147@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Fix conflict and reformat to 80cols: Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--cmd/unlz4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/unlz4.c b/cmd/unlz4.c
index fc52001..2eadc75 100644
--- a/cmd/unlz4.c
+++ b/cmd/unlz4.c
@@ -6,6 +6,7 @@
#include <command.h>
#include <env.h>
+#include <mapmem.h>
#include <vsprintf.h>
#include <u-boot/lz4.h>
@@ -26,7 +27,8 @@ static int do_unlz4(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_USAGE;
}
- ret = ulz4fn((void *)src, src_len, (void *)dst, &dst_len);
+ ret = ulz4fn(map_sysmem(src, 0), src_len, map_sysmem(dst, dst_len),
+ &dst_len);
if (ret) {
printf("Uncompressed err :%d\n", ret);
return 1;