mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
fpga: Protect GZIP usage when LOADMK is enabled
For case where CMD_FPGA_LOADMK is enabled and GZIP disable. Warning log: common/built-in.o: In function `do_fpga': /mnt/disk/u-boot/common/cmd_fpga.c:218: undefined reference to `gunzip' Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
92fa7f53f1
commit
1b63aaa587
1 changed files with 5 additions and 0 deletions
|
@ -211,6 +211,7 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
|||
|
||||
comp = image_get_comp(hdr);
|
||||
if (comp == IH_COMP_GZIP) {
|
||||
#if defined(CONFIG_GZIP)
|
||||
ulong image_buf = image_get_data(hdr);
|
||||
data = image_get_load(hdr);
|
||||
ulong image_size = ~0UL;
|
||||
|
@ -222,6 +223,10 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
|
|||
return 1;
|
||||
}
|
||||
data_size = image_size;
|
||||
#else
|
||||
puts("Gunzip image is not supported\n");
|
||||
return 1;
|
||||
#endif
|
||||
} else {
|
||||
data = (ulong)image_get_data(hdr);
|
||||
data_size = image_get_data_size(hdr);
|
||||
|
|
Loading…
Reference in a new issue