Page MenuHomeFreeBSD

D61536.1795369224.diff
No OneTemporary

Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None

D61536.1795369224.diff

diff --git a/sysutils/Makefile b/sysutils/Makefile
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -65,6 +65,7 @@
SUBDIR += async
SUBDIR += atf-fvp
SUBDIR += atf-master
+ SUBDIR += atf-mt7986
SUBDIR += atf-rk3328
SUBDIR += atf-rk3399
SUBDIR += atf-sun50i_a64
diff --git a/sysutils/atf-mt7986/Makefile b/sysutils/atf-mt7986/Makefile
new file mode 100644
--- /dev/null
+++ b/sysutils/atf-mt7986/Makefile
@@ -0,0 +1,70 @@
+PORTNAME= atf
+DISTVERSION= 2.14.0.20260520
+CATEGORIES= sysutils
+PKGNAMESUFFIX= -mt7986
+
+MAINTAINER= hayzam@alchemilla.io
+COMMENT= Arm TF-A BL2 and BL31 for MediaTek MT7986
+WWW= https://github.com/mtk-openwrt/arm-trusted-firmware
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/docs/license.rst
+
+# TF-A's make helpers use GNU sed syntax; with base sed the toolchain
+# detection fails and the build stops.
+BUILD_DEPENDS= aarch64-none-elf-gcc:devel/aarch64-none-elf-gcc \
+ gsed:textproc/gsed \
+ mkimage:sysutils/u-boot-tools
+
+USES= gmake
+USE_GITHUB= yes
+GH_ACCOUNT= mtk-openwrt
+GH_PROJECT= arm-trusted-firmware
+GH_TAGNAME= 476cf6629f76
+
+SSP_UNSAFE= yes
+
+BINARY_ALIAS= sed=${LOCALBASE}/bin/gsed
+NO_ARCH= yes
+
+# BL2 is built per boot device, for DDR4 in the BGA package (as on the
+# Banana Pi BPI-R3). The DRAM initialization is a library MediaTek ships
+# prebuilt with these sources (HAVE_DRAM_OBJ_FILE).
+MT7986_BOOT_DEVICES= emmc sdmmc
+# MediaTek builds this tree with GCC only; CFLAGS must not change its sizes.
+MT7986_MAKE_ARGS= ARCH=aarch64 \
+ BOARD_BGA=1 \
+ BUILD_STRING=${GH_TAGNAME} \
+ CC=aarch64-none-elf-gcc \
+ CFLAGS= \
+ CPP=aarch64-none-elf-cpp \
+ CPPFLAGS= \
+ CROSS_COMPILE=aarch64-none-elf- \
+ DRAM_USE_DDR4=1 \
+ HAVE_DRAM_OBJ_FILE=yes \
+ HOSTCC="${CC}" \
+ MKIMAGE=${LOCALBASE}/bin/mkimage \
+ PLAT=mt7986 \
+ USE_MKIMAGE=1 \
+ V=1
+
+.for d in ${MT7986_BOOT_DEVICES}
+PLIST_FILES+= share/${PORTNAME}-mt7986/${d}-ddr4/bl2.img \
+ share/${PORTNAME}-mt7986/${d}-ddr4/bl31.bin
+.endfor
+
+do-build:
+.for d in ${MT7986_BOOT_DEVICES}
+ (cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MT7986_MAKE_ARGS} \
+ BOOT_DEVICE=${d} BUILD_BASE=${WRKDIR}/build-${d} all)
+.endfor
+
+do-install:
+.for d in ${MT7986_BOOT_DEVICES}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/${PORTNAME}-mt7986/${d}-ddr4
+ ${INSTALL_DATA} ${WRKDIR}/build-${d}/mt7986/release/bl2.img \
+ ${WRKDIR}/build-${d}/mt7986/release/bl31.bin \
+ ${STAGEDIR}${PREFIX}/share/${PORTNAME}-mt7986/${d}-ddr4
+.endfor
+
+.include <bsd.port.mk>
diff --git a/sysutils/atf-mt7986/distinfo b/sysutils/atf-mt7986/distinfo
new file mode 100644
--- /dev/null
+++ b/sysutils/atf-mt7986/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1794640084
+SHA256 (mtk-openwrt-arm-trusted-firmware-2.14.0.20260520-476cf6629f76_GH0.tar.gz) = c1386e863b4da2770204bc84402990abe993f9860d5cc95fef5a930d2e912f97
+SIZE (mtk-openwrt-arm-trusted-firmware-2.14.0.20260520-476cf6629f76_GH0.tar.gz) = 19381337
diff --git a/sysutils/atf-mt7986/pkg-descr b/sysutils/atf-mt7986/pkg-descr
new file mode 100644
--- /dev/null
+++ b/sysutils/atf-mt7986/pkg-descr
@@ -0,0 +1,9 @@
+Arm Trusted Firmware for the MediaTek MT7986 (Filogic 830) SoC
+
+Trusted Firmware-A (TF-A) provides a reference implementation of secure world
+software for Armv7-A and Armv8-A, including a Secure Monitor executing at
+Exception Level 3 (EL3).
+
+This package has BL2, built for SD card and eMMC boot with DDR4, and BL31.
+MT7986 support is only in MediaTek's TF-A tree, which ships the DRAM
+initialization as a prebuilt library.

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 22, 5:40 PM (5 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41912499
Default Alt Text
D61536.1795369224.diff (3 KB)

Event Timeline