diff mbox

[OpenWrt-Devel,2/2] CC: brcm2708: Add gzip image compression

Message ID 1437153513-28082-2-git-send-email-br1@einfach.org
State Changes Requested
Headers show

Commit Message

Bruno Randolf July 17, 2015, 5:18 p.m. UTC
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 target/linux/brcm2708/image/Makefile | 3 +++
 1 file changed, 3 insertions(+)

Comments

Matthias Schiffer July 17, 2015, 6:58 p.m. UTC | #1
On 07/17/2015 07:18 PM, Bruno Randolf wrote:
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  target/linux/brcm2708/image/Makefile | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
> index e70bdd0..90d54bb 100644
> --- a/target/linux/brcm2708/image/Makefile
> +++ b/target/linux/brcm2708/image/Makefile
> @@ -28,6 +28,9 @@ 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 -9n -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img
> +  endif
>  endef
>  
>  define Image/Build
> 

Please don't use gzip -k, it requires gzip 1.6, which is not generally
available.

Regards,
Matthias
Álvaro Fernández Rojas July 17, 2015, 7:22 p.m. UTC | #2
Yeah, replace it with:
gzip -9n -c $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img > $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img.gz

El 17/07/2015 a las 20:58, Matthias Schiffer escribió:
> On 07/17/2015 07:18 PM, Bruno Randolf wrote:
>> Signed-off-by: Bruno Randolf <br1@einfach.org>
>> ---
>>  target/linux/brcm2708/image/Makefile | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
>> index e70bdd0..90d54bb 100644
>> --- a/target/linux/brcm2708/image/Makefile
>> +++ b/target/linux/brcm2708/image/Makefile
>> @@ -28,6 +28,9 @@ 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 -9n -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img
>> +  endif
>>  endef
>>  
>>  define Image/Build
>>
> 
> Please don't use gzip -k, it requires gzip 1.6, which is not generally
> available.
> 
> Regards,
> Matthias
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
diff mbox

Patch

diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
index e70bdd0..90d54bb 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -28,6 +28,9 @@  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 -9n -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img
+  endif
 endef
 
 define Image/Build