Message ID | 20181011173435.13021-1-devel-sven@geroedel.de |
---|---|
State | Changes Requested |
Delegated to: | John Crispin |
Headers | show |
Series | [OpenWrt-Devel] build: depend on host zip tool | expand |
Am Donnerstag, 11. Oktober 2018, 19:34:35 CEST schrieb Sven Roederer: > tools/firmware-utils/src/mksercommfw.c depends on the zip-tool to generate > the firmwareimage. Thinking of this again, I wonder if it would be the proper way to build the zip-tool as y host-command like we do for tar and xz? Sven
On 15/10/2018 23:24, Sven Roederer wrote: > Am Donnerstag, 11. Oktober 2018, 19:34:35 CEST schrieb Sven Roederer: >> tools/firmware-utils/src/mksercommfw.c depends on the zip-tool to generate >> the firmwareimage. > Thinking of this again, I wonder if it would be the proper way to build the > zip-tool as y host-command like we do for tar and xz? > > Sven I fully agree ... John > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff --git a/include/prereq-build.mk b/include/prereq-build.mk index a416a2d232..1cb560c506 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -128,6 +128,9 @@ $(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \ gstat -c%s $(TOPDIR)/Makefile, \ stat -c%s $(TOPDIR)/Makefile)) +$(eval $(call SetupHostCommand,zip,Please install 'zip', \ + zip -h)) + $(eval $(call SetupHostCommand,unzip,Please install 'unzip', \ unzip 2>&1 | grep zipfile, \ unzip))
tools/firmware-utils/src/mksercommfw.c depends on the zip-tool to generate the firmwareimage. /* now that we got the rootfs, repeat the whole thing again(sorta): * 1. zip the rootfs */ char *zipper = malloc(5 + 2*strlen(rootfs.file_name) + 4); sprintf(zipper, "%s %s %s", "zip ", zipfsname, rootfs.file_name); int ret = system(zipper); Check that the zip command is installed on the host. Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de> --- include/prereq-build.mk | 3 +++ 1 file changed, 3 insertions(+)