brcm2708: add gzip image compression
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> SVN-Revision: 46404
This commit is contained in:
parent
08a416e3b9
commit
84b89e4ec4
1 changed files with 11 additions and 0 deletions
|
@ -11,6 +11,16 @@ include $(INCLUDE_DIR)/host.mk
|
||||||
FAT32_BLOCK_SIZE=1024
|
FAT32_BLOCK_SIZE=1024
|
||||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
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 ###
|
### Image scripts ###
|
||||||
define Build/build-dtb
|
define Build/build-dtb
|
||||||
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $@.dtb $(DTS_DIR)/$(DEVICE_DTS).dts
|
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $@.dtb $(DTS_DIR)/$(DEVICE_DTS).dts
|
||||||
|
@ -40,6 +50,7 @@ endef
|
||||||
define Build/sdcard-img
|
define Build/sdcard-img
|
||||||
./gen_rpi_sdcard_img.sh $@ $@.boot $(word 2,$^) \
|
./gen_rpi_sdcard_img.sh $@ $@.boot $(word 2,$^) \
|
||||||
$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
||||||
|
$(call Image/gzip,$@)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
### Device macros ###
|
### Device macros ###
|
||||||
|
|
Loading…
Reference in a new issue