| // SPDX-License-Identifier: GPL-2.0+ |
| * FUJITSU COMPUTERTECHNOLOGIES LIMITED. All rights reserved. |
| static int do_unlz4(struct cmd_tbl *cmdtp, int flag, int argc, |
| size_t src_len = ~0UL, dst_len = ~0UL; |
| src = hextoul(argv[1], NULL); |
| dst = hextoul(argv[2], NULL); |
| dst_len = hextoul(argv[3], NULL); |
| ret = ulz4fn((void *)src, src_len, (void *)dst, &dst_len); |
| printf("Uncompressed err :%d\n", ret); |
| printf("Uncompressed size: %zd = 0x%zX\n", dst_len, dst_len); |
| env_set_hex("filesize", dst_len); |
| U_BOOT_CMD(unlz4, 4, 1, do_unlz4, |
| "lz4 uncompress a memory region", |
| "srcaddr dstaddr dstsize\n" |
| "NOTE: Specify the destination size that is sufficiently larger\n" |
| " than the source size.\n" |