arm-trusted-firmware-mediatek: use UBI on new NAND targets
authorDaniel Golle <daniel@makrotopia.org>
Fri, 12 Jan 2024 02:36:59 +0000 (02:36 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 15 Feb 2024 19:06:36 +0000 (19:06 +0000)
Make use of recently added UBI support in MediaTek's ARM
TrustedFirmware-A on new MT7988 SoC.

Load fip from static UBI volume instead of fixed offset on SPIM-NAND
and SNFI.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/boot/arm-trusted-firmware-mediatek/Makefile

index 07ec2e0609a813f5be3915f8e1a10bffd0311f9d..bfa0b785dd90e64da1b089b2ef07e24a18840483 100644 (file)
@@ -33,6 +33,7 @@ define Trusted-Firmware-A/Default
   NAND_TYPE:=
   BOARD_QFN:=
   DRAM_USE_COMB:=
+  USE_UBI:=
 endef
 
 define Trusted-Firmware-A/mt7622-nor-1ddr
@@ -353,6 +354,15 @@ define Trusted-Firmware-A/mt7988-snand-comb
   DRAM_USE_COMB:=1
 endef
 
+define Trusted-Firmware-A/mt7988-snand-ubi-comb
+  NAME:=MediaTek MT7988 (SPI-NAND via SNFI, UBI)
+  BOOT_DEVICE:=snand
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7988
+  DRAM_USE_COMB:=1
+  USE_UBI:=1
+endef
+
 define Trusted-Firmware-A/mt7988-spim-nand-comb
   NAME:=MediaTek MT7988 (SPI-NAND via SPIM)
   BOOT_DEVICE:=spim-nand
@@ -361,6 +371,15 @@ define Trusted-Firmware-A/mt7988-spim-nand-comb
   DRAM_USE_COMB:=1
 endef
 
+define Trusted-Firmware-A/mt7988-spim-nand-ubi-comb
+  NAME:=MediaTek MT7988 (SPI-NAND via SPIM, UBI)
+  BOOT_DEVICE:=spim-nand
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7988
+  DRAM_USE_COMB:=1
+  USE_UBI:=1
+endef
+
 TFA_TARGETS:= \
        mt7622-nor-1ddr \
        mt7622-nor-2ddr \
@@ -402,7 +421,9 @@ TFA_TARGETS:= \
        mt7988-nor-comb \
        mt7988-sdmmc-comb \
        mt7988-snand-comb \
-       mt7988-spim-nand-comb
+       mt7988-snand-ubi-comb \
+       mt7988-spim-nand-comb \
+       mt7988-spim-nand-ubi-comb
 
 TFA_MAKE_FLAGS += \
        BOOT_DEVICE=$(BOOT_DEVICE) \
@@ -413,6 +434,7 @@ TFA_MAKE_FLAGS += \
        HAVE_DRAM_OBJ_FILE=yes \
        $(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
        $(if $(DRAM_USE_COMB),DRAM_USE_COMB=1) \
+       $(if $(USE_UBI),UBI=1) \
        all
 
 define Package/trusted-firmware-a/install