summaryrefslogtreecommitdiff
path: root/common/cmd_fpga.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-07-16 10:30:50 +0200
committerMichal Simek <michal.simek@xilinx.com>2015-01-21 10:24:46 +0100
commit1b63aaa587058489d1d1347866df4853a670dc90 (patch)
treead08a9e5ed4bc716ea701837802b704b27c80cf7 /common/cmd_fpga.c
parent92fa7f53f1f3f03296f8ffb14bdf1baefab83368 (diff)
downloadu-boot-imx-1b63aaa587058489d1d1347866df4853a670dc90.zip
u-boot-imx-1b63aaa587058489d1d1347866df4853a670dc90.tar.gz
u-boot-imx-1b63aaa587058489d1d1347866df4853a670dc90.tar.bz2
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>
Diffstat (limited to 'common/cmd_fpga.c')
-rw-r--r--common/cmd_fpga.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index 8c5bf44..484a6c6 100644
--- a/common/cmd_fpga.c
+++ b/common/cmd_fpga.c
@@ -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);