diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-08-13 12:54:52 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-08-28 19:05:58 +0100 |
commit | a1b263698cfacef7d62e091ed9c1f81f34b6df97 (patch) | |
tree | eb8409edf03083f95bac352744b4684e0b07009c /package/boot/arm-trusted-firmware-mediatek/Makefile | |
parent | 14ce999924012b99c61b336527d1bc224823b78a (diff) | |
download | upstream-a1b263698cfacef7d62e091ed9c1f81f34b6df97.tar.gz upstream-a1b263698cfacef7d62e091ed9c1f81f34b6df97.tar.bz2 upstream-a1b263698cfacef7d62e091ed9c1f81f34b6df97.zip |
arm-trusted-firmware-mediatek: update to v2.7+ from MediaTek
The updated sources bring support for the MT798x Filogic SoC family.
Add builds for MT7986 with most supported storage types, each for DDR3
and DDR4 configurations.
A better solution for skipping bad blocks on SPI-NAND connected via the
SNFI interface has been implemented upstream, so drop local patch.
Add pending patches [1] and [2] to fix boot on existing MT7622 boards.
Tested on BananaPi BPi-R64 (SDMMC, eMMC, SPI-NAND), Linksys E8450 and
Ubiquiti UniFi 6 LR as well as upcoming Bananapi BPi-R3 board for which
support will be added in future patches.
[1]: https://github.com/mtk-openwrt/arm-trusted-firmware/pulls/#3
[2]: https://github.com/mtk-openwrt/arm-trusted-firmware/pulls/#4
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/boot/arm-trusted-firmware-mediatek/Makefile')
-rw-r--r-- | package/boot/arm-trusted-firmware-mediatek/Makefile | 130 |
1 files changed, 120 insertions, 10 deletions
diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile index 48feae4b60..583517b866 100644 --- a/package/boot/arm-trusted-firmware-mediatek/Makefile +++ b/package/boot/arm-trusted-firmware-mediatek/Makefile @@ -13,9 +13,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git -PKG_SOURCE_DATE:=2021-05-08 -PKG_SOURCE_VERSION:=d2c75b2139be003887af9cc5a94da5e9bdc59de7 -PKG_MIRROR_HASH:=4af9ce8e11511afee7f588cc982946c06339edbfa47afef6a7f3e2231ac9f34d +PKG_SOURCE_DATE:=2022-08-18 +PKG_SOURCE_VERSION:=9c9c49945c24634e4ae6cd924dbb88cf85c7926d +PKG_MIRROR_HASH:=26b474f40c02da12b7bed56597aeef209757ad1b40a4f0a652794954018b2198 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org> @@ -25,57 +25,154 @@ include $(INCLUDE_DIR)/package.mk define Trusted-Firmware-A/Default BUILD_TARGET:=mediatek - BUILD_SUBTARGET:=mt7622 - PLAT:=mt7622 TFA_IMAGE:=bl2.img bl31.bin BOOT_DEVICE:= DDR3_FLYBY:= + DDR_TYPE:= + NAND_TYPE:= endef define Trusted-Firmware-A/mt7622-nor-1ddr NAME:=MediaTek MT7622 (SPI-NOR, 1x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=nor endef define Trusted-Firmware-A/mt7622-nor-2ddr NAME:=MediaTek MT7622 (SPI-NOR, 2x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=nor DDR3_FLYBY:=1 endef define Trusted-Firmware-A/mt7622-snand-1ddr NAME:=MediaTek MT7622 (SPI-NAND, 1x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=snand endef define Trusted-Firmware-A/mt7622-snand-2ddr NAME:=MediaTek MT7622 (SPI-NAND, 2x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=snand DDR3_FLYBY:=1 endef define Trusted-Firmware-A/mt7622-emmc-1ddr NAME:=MediaTek MT7622 (eMMC, 1x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=emmc endef define Trusted-Firmware-A/mt7622-emmc-2ddr NAME:=MediaTek MT7622 (eMMC, 2x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=emmc DDR3_FLYBY:=1 endef define Trusted-Firmware-A/mt7622-sdmmc-1ddr - NAME:=MediaTek MT7622 (SDcard, 1x DDR3) + NAME:=MediaTek MT7622 (SD card, 1x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=sdmmc endef define Trusted-Firmware-A/mt7622-sdmmc-2ddr - NAME:=MediaTek MT7622 (SDcard, 2x DDR3) + NAME:=MediaTek MT7622 (SD card, 2x DDR3) + BUILD_SUBTARGET:=mt7622 + PLAT:=mt7622 BOOT_DEVICE:=sdmmc DDR3_FLYBY:=1 endef +define Trusted-Firmware-A/mt7986-nor-ddr4 + NAME:=MediaTek MT7986 (SPI-NOR, DDR4) + BOOT_DEVICE:=nor + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr4 +endef + +define Trusted-Firmware-A/mt7986-emmc-ddr4 + NAME:=MediaTek MT7986 (eMMC, DDR4) + BOOT_DEVICE:=emmc + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr4 +endef + +define Trusted-Firmware-A/mt7986-sdmmc-ddr4 + NAME:=MediaTek MT7986 (SD card, DDR4) + BOOT_DEVICE:=sdmmc + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr4 +endef + +define Trusted-Firmware-A/mt7986-snand-ddr4 + NAME:=MediaTek MT7986 (SPI-NAND via SNFI, DDR4) + BOOT_DEVICE:=snand + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr4 +endef + +define Trusted-Firmware-A/mt7986-spim-nand-ddr4 + NAME:=MediaTek MT7986 (SPI-NAND via SPIM, DDR4) + BOOT_DEVICE:=spim-nand + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr4 + NAND_TYPE:=spim:2k+64 +endef + +define Trusted-Firmware-A/mt7986-nor-ddr3 + NAME:=MediaTek MT7986 (SPI-NOR, DDR3) + BOOT_DEVICE:=nor + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr3 +endef + +define Trusted-Firmware-A/mt7986-emmc-ddr3 + NAME:=MediaTek MT7986 (eMMC, DDR3) + BOOT_DEVICE:=emmc + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr3 +endef + +define Trusted-Firmware-A/mt7986-sdmmc-ddr3 + NAME:=MediaTek MT7986 (SD card, DDR3) + BOOT_DEVICE:=sdmmc + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr3 +endef + +define Trusted-Firmware-A/mt7986-snand-ddr3 + NAME:=MediaTek MT7986 (SPI-NAND via SNFI, DDR3) + BOOT_DEVICE:=snand + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr3 +endef + +define Trusted-Firmware-A/mt7986-spim-nand-ddr3 + NAME:=MediaTek MT7986 (SPI-NAND via SPIM, DDR3) + BOOT_DEVICE:=spim-nand + BUILD_SUBTARGET:=filogic + PLAT:=mt7986 + DDR_TYPE:=ddr3 +endef + TFA_TARGETS:= \ mt7622-nor-1ddr \ mt7622-nor-2ddr \ @@ -84,18 +181,31 @@ TFA_TARGETS:= \ mt7622-emmc-1ddr \ mt7622-emmc-2ddr \ mt7622-sdmmc-1ddr \ - mt7622-sdmmc-2ddr + mt7622-sdmmc-2ddr \ + mt7986-emmc-ddr3 \ + mt7986-nor-ddr3 \ + mt7986-sdmmc-ddr3 \ + mt7986-snand-ddr3 \ + mt7986-spim-nand-ddr3 \ + mt7986-emmc-ddr4 \ + mt7986-nor-ddr4 \ + mt7986-sdmmc-ddr4 \ + mt7986-snand-ddr4 \ + mt7986-spim-nand-ddr4 TFA_MAKE_FLAGS += \ BOOT_DEVICE=$(BOOT_DEVICE) \ USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \ + $(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \ + $(if $(NAND_TYPE),NAND_TYPE=$(NAND_TYPE)) \ + HAVE_DRAM_OBJ_FILE=yes \ $(if $(DDR3_FLYBY),DDR3_FLYBY=1) \ all define Package/trusted-firmware-a/install $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/mt7622/release/bl2.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl2.img - $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/mt7622/release/bl31.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl31.bin + $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl2.img + $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl31.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl31.bin endef $(eval $(call BuildPackage/Trusted-Firmware-A)) |