+++ /dev/null
---- a/plat/mediatek/mt7622/bl2_boot_nor.c
-+++ b/plat/mediatek/mt7622/bl2_boot_nor.c
-@@ -12,7 +12,7 @@
- #define MT7622_NOR_MAP_BASE 0x30000000
-
- #define FIP_BASE 0x20000
--#define FIP_SIZE 0x80000
-+#define FIP_SIZE 0xa0000
-
- const io_block_spec_t mtk_boot_dev_fip_spec = {
- .offset = MT7622_NOR_MAP_BASE + FIP_BASE,
BL2_BOOTDEV:=nor
BL2_DDRBLOB:=2
DEPENDS:=+trusted-firmware-a-mt7622-nor-2ddr
+ FIP_COMPRESS:=1
endef
define U-Boot/mt7623a_unielec_u7623
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