diff mbox

[OpenWrt-Devel,1/6] brcm2708: simplify gzip image generation

Message ID 1447704082-22911-1-git-send-email-noltari@gmail.com
State Accepted
Headers show

Commit Message

Álvaro Fernández Rojas Nov. 16, 2015, 8:01 p.m. UTC
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 target/linux/brcm2708/image/Makefile | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
diff mbox

Patch

diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
index cf263bd..ecf6f71 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -11,16 +11,6 @@  include $(INCLUDE_DIR)/host.mk
 FAT32_BLOCK_SIZE=1024
 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
 
-ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
-  define Image/gzip
-    gzip -9n -c $(1) > $(1).gz
-    mv $(1).gz $(BIN_DIR)
-  endef
-else
-  define Image/gzip
-  endef
-endif
-
 ### Image scripts ###
 define Build/gen-cfg
 	cat config.txt > $@.config
@@ -49,7 +39,7 @@  endef
 define Build/sdcard-img
 	./gen_rpi_sdcard_img.sh $@ $@.boot $(word 2,$^) \
 		$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
-	$(call Image/gzip,$@)
+	$(if $(CONFIG_TARGET_IMAGES_GZIP),gzip -9n -c $@ > $(BIN_DIR)/$(notdir $@).gz)
 endef
 
 ### Device macros ###