[U-Boot] [PATCH 01/11] fpga: Protect GZIP usage when LOADMK is enabled

Michal Simek michal.simek at xilinx.com
Wed Jan 14 10:04:28 CET 2015


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 at xilinx.com>
---

 common/cmd_fpga.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index 8c5bf440fbb0..484a6c6ce036 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);
--
1.8.2.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150114/66cc96ea/attachment.pgp>


More information about the U-Boot mailing list