diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-07-13 21:06:36 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-08-28 20:33:15 +0100 |
commit | a4933cdd121d1689764445441f6e7fcf67dd3beb (patch) | |
tree | 43d8cdbc1891015fc3ef4d7efd467079bee8ec06 /package/boot/uboot-mediatek/Makefile | |
parent | d118cbdfece181994a96d1bcb1868bd807d481bf (diff) | |
download | upstream-a4933cdd121d1689764445441f6e7fcf67dd3beb.tar.gz upstream-a4933cdd121d1689764445441f6e7fcf67dd3beb.tar.bz2 upstream-a4933cdd121d1689764445441f6e7fcf67dd3beb.zip |
uboot-mediatek: add support for compressed BL3/FIP image
MediaTek's ARM Trusted Firmware v2.7+ allows the images inside a FIP
structure to be compressed. Make use of that for boards with NOR flash.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/boot/uboot-mediatek/Makefile')
-rw-r--r-- | package/boot/uboot-mediatek/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index 314cb8b84b..a8add7ef94 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -132,6 +132,7 @@ define U-Boot/mt7622_ubnt_unifi-6-lr BL2_BOOTDEV:=nor BL2_DDRBLOB:=2 DEPENDS:=+trusted-firmware-a-mt7622-nor-2ddr + FIP_COMPRESS:=1 endef define U-Boot/mt7623a_unielec_u7623 @@ -196,9 +197,13 @@ UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE:.fip=.bin) endif define Build/fip-image + $(if $(FIP_COMPRESS),\ + xz -f -e -k -9 -C crc32 $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin ;\ + xz -f -e -k -9 -C crc32 $(PKG_BUILD_DIR)/u-boot.bin \ + ) $(STAGING_DIR_HOST)/bin/fiptool create \ - --soc-fw $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin \ - --nt-fw $(PKG_BUILD_DIR)/u-boot.bin \ + --soc-fw $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin$(if $(FIP_COMPRESS),.xz) \ + --nt-fw $(PKG_BUILD_DIR)/u-boot.bin$(if $(FIP_COMPRESS),.xz) \ $(PKG_BUILD_DIR)/u-boot.fip endef |