gluon/patches/openwrt/0017-brcm2708-respect-CONFIG_TARGET_IMAGES_GZIP.patch
Matthias Schiffer cb40f149f3 Add support for brcm2708-bcm2708 and -bcm2709 targets
Original patch by @MPW1412
2015-07-10 19:38:41 +02:00

22 lines
878 B
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 10 Jul 2015 18:41:11 +0200
Subject: brcm2708: respect CONFIG_TARGET_IMAGES_GZIP
As the brcm2708 images use ext4, they will be huge when uncompressed.
diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
index e70bdd0..be667f3 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -28,6 +28,10 @@ define Image/Build/RaspberryPi
mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img # Copy OpenWrt built kernel
./gen_rpi_sdcard_img.sh $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img $(KDIR)/root.$(1) \
$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
+
+ ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
+ gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img
+ endif
endef
define Image/Build