[OpenWrt-Devel] [PATCH] brcm2708: add gzip image compression
Bruno Randolf
br1 at einfach.org
Fri Jul 17 12:26:49 EDT 2015
Hi!
Tested it and works as it should.
Gracias Alvaro!
bruno
On 07/17/2015 12:12 PM, Álvaro Fernández Rojas wrote:
> Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
> ---
> target/linux/brcm2708/image/Makefile | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
> index de178c6..2afd29b 100644
> --- a/target/linux/brcm2708/image/Makefile
> +++ b/target/linux/brcm2708/image/Makefile
> @@ -11,6 +11,16 @@ 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/build-dtb
> $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $@.dtb $(DTS_DIR)/$(DEVICE_DTS).dts
> @@ -40,6 +50,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,$@)
> endef
>
> ### Device macros ###
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list