Wed Feb 9 01:57:57 2022 UTC ()
Add Trusted Firmware-A (TF-A, the new name for Arm'sATF) v2.6 with
support for rk3328 (not yet tested), rk3399 (tested), and fiptool.

these will obsolete the existing arm-trusted-firmware* (v2.3) packages
once all consumers are updated and tested, and currently the sun50i_a64
and sun50i-h6 targets are not yet available.


(mrg)
diff -r1.990 -r1.991 pkgsrc/sysutils/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a/distinfo
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a/trusted-firmware-a-dist.mk
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a/trusted-firmware-a.mk
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-fiptool/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-fiptool/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-fiptool/PLIST
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-fiptool/distinfo
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-fiptool/patches/patch-Makefile
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3328/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3328/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3328/PLIST
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3328/buildlink3.mk
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3399/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3399/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3399/PLIST
diff -r0 -r1.1 pkgsrc/sysutils/trusted-firmware-a-rk3399/buildlink3.mk

cvs diff -r1.990 -r1.991 pkgsrc/sysutils/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/Makefile 2022/02/05 03:14:19 1.990
+++ pkgsrc/sysutils/Makefile 2022/02/09 01:57:57 1.991
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.990 2022/02/05 03:14:19 ryoon Exp $ 1# $NetBSD: Makefile,v 1.991 2022/02/09 01:57:57 mrg Exp $
2# 2#
3 3
4COMMENT= System utilities 4COMMENT= System utilities
5 5
6SUBDIR+= 855resolution 6SUBDIR+= 855resolution
7SUBDIR+= 915resolution 7SUBDIR+= 915resolution
8SUBDIR+= 9base 8SUBDIR+= 9base
9SUBDIR+= R-later 9SUBDIR+= R-later
10SUBDIR+= R-processx 10SUBDIR+= R-processx
11SUBDIR+= R-progress 11SUBDIR+= R-progress
12SUBDIR+= R-ps 12SUBDIR+= R-ps
13SUBDIR+= R-sys 13SUBDIR+= R-sys
14SUBDIR+= R-unix 14SUBDIR+= R-unix
@@ -696,26 +696,29 @@ SUBDIR+= testdisk @@ -696,26 +696,29 @@ SUBDIR+= testdisk
696SUBDIR+= tiramisu 696SUBDIR+= tiramisu
697SUBDIR+= tits 697SUBDIR+= tits
698SUBDIR+= tkcron 698SUBDIR+= tkcron
699SUBDIR+= tkdesk 699SUBDIR+= tkdesk
700SUBDIR+= tload 700SUBDIR+= tload
701SUBDIR+= tob 701SUBDIR+= tob
702SUBDIR+= top 702SUBDIR+= top
703SUBDIR+= toshutils 703SUBDIR+= toshutils
704SUBDIR+= tpb 704SUBDIR+= tpb
705SUBDIR+= tphdisk 705SUBDIR+= tphdisk
706SUBDIR+= trash 706SUBDIR+= trash
707SUBDIR+= tre-command 707SUBDIR+= tre-command
708SUBDIR+= tree 708SUBDIR+= tree
 709SUBDIR+= trusted-firmware-a-fiptool
 710SUBDIR+= trusted-firmware-a-rk3328
 711SUBDIR+= trusted-firmware-a-rk3399
709SUBDIR+= ts 712SUBDIR+= ts
710SUBDIR+= tsm8 713SUBDIR+= tsm8
711SUBDIR+= ttyplot 714SUBDIR+= ttyplot
712#SUBDIR+= u-boot # only contains Makefile fragments 715#SUBDIR+= u-boot # only contains Makefile fragments
713SUBDIR+= u-boot-a10-olinuxino-lime 716SUBDIR+= u-boot-a10-olinuxino-lime
714SUBDIR+= u-boot-a20-olinuxino-lime2 717SUBDIR+= u-boot-a20-olinuxino-lime2
715SUBDIR+= u-boot-a20-olinuxino-lime2-emmc 718SUBDIR+= u-boot-a20-olinuxino-lime2-emmc
716SUBDIR+= u-boot-a20-olinuxino-micro 719SUBDIR+= u-boot-a20-olinuxino-micro
717SUBDIR+= u-boot-a20-olinuxino-micro-emmc 720SUBDIR+= u-boot-a20-olinuxino-micro-emmc
718SUBDIR+= u-boot-apple-m1 721SUBDIR+= u-boot-apple-m1
719SUBDIR+= u-boot-bananapi 722SUBDIR+= u-boot-bananapi
720SUBDIR+= u-boot-bananapi-m2-zero 723SUBDIR+= u-boot-bananapi-m2-zero
721SUBDIR+= u-boot-bananapi-m3 724SUBDIR+= u-boot-bananapi-m3

File Added: pkgsrc/sysutils/trusted-firmware-a/distinfo
$NetBSD: distinfo,v 1.1 2022/02/09 01:57:57 mrg Exp $

BLAKE2s (arm-trusted-firmware-2.6.zip) = 00bfe714f77eb95a3fbbbe1a89667aa9ce70f55bcde4e8f0a8c36ac36d78ece1
SHA512 (arm-trusted-firmware-2.6.zip) = 3d5ef0f39017aad6bc469ba367604941e0aa7f5ce69f1709492e282aaff8188ff18ee7a224271c3d6c0479cac98954feb6faf9355c83a7351d8693ae61beac03
Size (arm-trusted-firmware-2.6.zip) = 8010252 bytes

File Added: pkgsrc/sysutils/trusted-firmware-a/trusted-firmware-a-dist.mk
# $NetBSD: trusted-firmware-a-dist.mk,v 1.1 2022/02/09 01:57:57 mrg Exp $

# When updating, don't forget to also update trusted-firmware-a-fiptool.
VERSION=	2.6

GITHUB_PROJECT=	arm-trusted-firmware
GITHUB_TAG=	v${VERSION}

DISTNAME=	${GITHUB_PROJECT}-${VERSION}
DISTINFO_FILE?=	${.CURDIR}/../../sysutils/trusted-firmware-a/distinfo
CATEGORIES=	sysutils
MASTER_SITES=	${MASTER_SITE_GITHUB:=ARM-software/}
EXTRACT_SUFX=	.zip
PATCHDIR?=	${.CURDIR}/../../sysutils/trusted-firmware-a/patches

MAINTAINER=	port-arm@NetBSD.org
HOMEPAGE=	https://github.com/ARM-software/arm-trusted-firmware/
LICENSE=	modified-bsd

USE_TOOLS+=	gmake

File Added: pkgsrc/sysutils/trusted-firmware-a/trusted-firmware-a.mk
# $NetBSD: trusted-firmware-a.mk,v 1.1 2022/02/09 01:57:57 mrg Exp $

.include "../../sysutils/trusted-firmware-a/trusted-firmware-a-dist.mk"

PKGNAME?=	trusted-firmware-a-${PLATFORM}-${VERSION}

RELRO_SUPPORTED=	no
MAKE_FLAGS+=	CROSS_COMPILE=${PREFIX}/cross-aarch64-none-elf/bin/aarch64-none-elf-
.if !empty(ATF_CORTEX_M0:Myes)
MAKE_FLAGS+=	M0_CROSS_COMPILE=${PREFIX}/cross-arm-none-eabi/bin/arm-none-eabi-
.endif
MAKE_FLAGS+=	PLAT=${PLATFORM}
MAKE_FLAGS+=	CFLAGS='-gdwarf-2'
#MAKE_FLAGS+=	DEBUG=1
#MAKE_FLAGS+=	LOG_LEVEL=50
#MAKE_FLAGS+=	V=1
MAKE_FLAGS+=	BUILD_STRING=${GITHUB_TAG}
BUILD_TARGET=	bl31

BUILD_DEPENDS+=	cross-aarch64-none-elf-gcc-[0-9]*:../../cross/aarch64-none-elf-gcc
.if !empty(ATF_CORTEX_M0:Myes)
BUILD_DEPENDS+=	cross-arm-none-eabi-gcc-[0-9]*:../../cross/arm-none-eabi-gcc
.endif

.if empty(MAKE_FLAGS:MDEBUG=1)
BL31_DIR=release
.else
BL31_DIR=debug
.endif

BL31_SUFFIX?=	bin

.if !target(do-install)
do-install:
	${INSTALL_DATA_DIR} \
	     ${DESTDIR}${PREFIX}/share/trusted-firmware-a/${PLATFORM}
.if ${BL31_SUFFIX} == "bin"
	${INSTALL_DATA} \
	    ${WRKSRC}/build/${PLATFORM}/${BL31_DIR}/bl31.${BL31_SUFFIX} \
	    ${DESTDIR}${PREFIX}/share/trusted-firmware-a/${PLATFORM}/
.else
	${INSTALL_DATA} \
	    ${WRKSRC}/build/${PLATFORM}/${BL31_DIR}/bl31/bl31.${BL31_SUFFIX} \
	    ${DESTDIR}${PREFIX}/share/trusted-firmware-a/${PLATFORM}/
.endif
.endif

# XXX kludge. pkgsrc passes down run path flags in LDFLAGS assuming
# gcc is used for linking, but here we call the linker directly.
COMPILER_RPATH_FLAG=	-R

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/sysutils/trusted-firmware-a-fiptool/DESCR
Trusted Firmware-A (TF-A) provides a reference implementation of secure
world software for ARMv8-A, including a Secure Monitor executing at
Exception Level 3 (EL3). It implements various ARM interface standards,
such as:

    The Power State Coordination Interface (PSCI)
    Trusted Board Boot Requirements (TBBR, ARM DEN0006C-1)
    SMC Calling Convention
    System Control and Management Interface

As far as possible the code is designed for reuse or porting to other
ARMv8-A model and hardware platforms.

ARM will continue development in collaboration with interested parties to
provide a full reference implementation of Secure Monitor code and ARM
standards to the benefit of all developers working with ARMv8-A TrustZone
technology.

This package provides "fiptool", used to wrap parts of trusted firmware
with u-boot.

File Added: pkgsrc/sysutils/trusted-firmware-a-fiptool/Makefile
# $NetBSD: Makefile,v 1.1 2022/02/09 01:57:57 mrg Exp $

# We override WRKSRC, so we provide our own patches (and thus distinfo)
DISTINFO_FILE=	${.CURDIR}/distinfo
PATCHDIR=	${.CURDIR}/patches

.include "../../sysutils/trusted-firmware-a/trusted-firmware-a-dist.mk"

PKGNAME=	${DISTNAME:S/arm-trusted-firmware/trusted-firmware-a-fiptool/}
WRKSRC=		${WRKDIR}/${DISTNAME}/tools/fiptool

INSTALLATION_DIRS=	bin

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/fiptool ${DESTDIR}${PREFIX}/bin

.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/sysutils/trusted-firmware-a-fiptool/PLIST
@comment $NetBSD: PLIST,v 1.1 2022/02/09 01:57:57 mrg Exp $
bin/fiptool

File Added: pkgsrc/sysutils/trusted-firmware-a-fiptool/distinfo
$NetBSD: distinfo,v 1.1 2022/02/09 01:57:57 mrg Exp $

BLAKE2s (arm-trusted-firmware-2.6.zip) = 00bfe714f77eb95a3fbbbe1a89667aa9ce70f55bcde4e8f0a8c36ac36d78ece1
SHA512 (arm-trusted-firmware-2.6.zip) = 3d5ef0f39017aad6bc469ba367604941e0aa7f5ce69f1709492e282aaff8188ff18ee7a224271c3d6c0479cac98954feb6faf9355c83a7351d8693ae61beac03
Size (arm-trusted-firmware-2.6.zip) = 8010252 bytes
SHA1 (patch-Makefile) = 90cedf2c6c04fbf00bd8b2782add95b46c2ebcc0

File Added: pkgsrc/sysutils/trusted-firmware-a-fiptool/patches/patch-Makefile
$NetBSD: patch-Makefile,v 1.1 2022/02/09 01:57:57 mrg Exp $

Honor LDFLAGS.

--- Makefile.orig	2020-04-20 15:56:43.000000000 +0000
+++ Makefile	2020-06-22 01:21:57.959255753 +0000
@@ -37,7 +37,7 @@ all: ${PROJECT}
 
 ${PROJECT}: ${OBJECTS} Makefile
 	@echo "  HOSTLD  $@"
-	${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
+	${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDFLAGS} ${LDLIBS}
 	@${ECHO_BLANK_LINE}
 	@echo "Built $@ successfully"
 	@${ECHO_BLANK_LINE}

File Added: pkgsrc/sysutils/trusted-firmware-a-rk3328/DESCR
Trusted Firmware-A (TF-A) provides a reference implementation of secure
world software for ARMv8-A, including a Secure Monitor executing at
Exception Level 3 (EL3). It implements various ARM interface standards,
such as:

    The Power State Coordination Interface (PSCI)
    Trusted Board Boot Requirements (TBBR, ARM DEN0006C-1)
    SMC Calling Convention
    System Control and Management Interface

As far as possible the code is designed for reuse or porting to other
ARMv8-A model and hardware platforms.

ARM will continue development in collaboration with interested parties to
provide a full reference implementation of Secure Monitor code and ARM
standards to the benefit of all developers working with ARMv8-A TrustZone
technology.

This package provides mainline TF-A for the RockChip RK3328 platform,
for example used by u-boot for the Pine64 Rock64.

File Added: pkgsrc/sysutils/trusted-firmware-a-rk3328/Makefile
# $NetBSD: Makefile,v 1.1 2022/02/09 01:57:57 mrg Exp $

PLATFORM=	rk3328
COMMENT=	ARM Trusted Firmware for Rockchip RK3328 SoCs

BL31_SUFFIX=	elf

.include "../../sysutils/trusted-firmware-a/trusted-firmware-a.mk"

File Added: pkgsrc/sysutils/trusted-firmware-a-rk3328/PLIST
@comment $NetBSD: PLIST,v 1.1 2022/02/09 01:57:57 mrg Exp $
share/trusted-firmware-a/rk3328/bl31.elf

File Added: pkgsrc/sysutils/trusted-firmware-a-rk3328/buildlink3.mk
# $NetBSD: buildlink3.mk,v 1.1 2022/02/09 01:57:57 mrg Exp $

BUILDLINK_DEPMETHOD.trusted-firmware-a-rk3328?=	build

BUILDLINK_TREE+=	trusted-firmware-a-rk3328

.if !defined(TRUSTED_FIRMWARE_A_RK3328_BUILDLINK3_MK)
TRUSTED_FIRMWARE_A_RK3328_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.trusted-firmware-a-rk3328+=	trusted-firmware-a-rk3328>=2.6
BUILDLINK_PKGSRCDIR.trusted-firmware-a-rk3328?=	../../sysutils/trusted-firmware-a-rk3328
.endif	# TRUSTED_FIRMWARE_A_RK3328_BUILDLINK3_MK

BUILDLINK_TREE+=	-trusted-firmware-a-rk3328


File Added: pkgsrc/sysutils/trusted-firmware-a-rk3399/DESCR
Trusted Firmware-A (TF-A) provides a reference implementation of secure
world software for ARMv8-A, including a Secure Monitor executing at
Exception Level 3 (EL3). It implements various ARM interface standards,
such as:

    The Power State Coordination Interface (PSCI)
    Trusted Board Boot Requirements (TBBR, ARM DEN0006C-1)
    SMC Calling Convention
    System Control and Management Interface

As far as possible the code is designed for reuse or porting to other
ARMv8-A model and hardware platforms.

ARM will continue development in collaboration with interested parties to
provide a full reference implementation of Secure Monitor code and ARM
standards to the benefit of all developers working with ARMv8-A TrustZone
technology.

This package provides mainline TF-A for the RockChip RK3399 platform,
for example used by u-boot for the Pinebook Pro.

File Added: pkgsrc/sysutils/trusted-firmware-a-rk3399/Makefile
# $NetBSD: Makefile,v 1.1 2022/02/09 01:57:57 mrg Exp $

PLATFORM=	rk3399
COMMENT=	ARM Trusted Firmware for Rockchip RK3399 SoCs

BL31_SUFFIX=	elf

# This package builds for Cortex-M0 *and* Cortex-A53/A72.
ATF_CORTEX_M0=	yes

.include "../../sysutils/trusted-firmware-a/trusted-firmware-a.mk"

File Added: pkgsrc/sysutils/trusted-firmware-a-rk3399/PLIST
@comment $NetBSD: PLIST,v 1.1 2022/02/09 01:57:57 mrg Exp $
share/trusted-firmware-a/rk3399/bl31.elf

File Added: pkgsrc/sysutils/trusted-firmware-a-rk3399/buildlink3.mk
# $NetBSD: buildlink3.mk,v 1.1 2022/02/09 01:57:57 mrg Exp $

BUILDLINK_DEPMETHOD.trusted-firmware-a-rk3399?=	build

BUILDLINK_TREE+=	trusted-firmware-a-rk3399

.if !defined(TRUSTED_FIRMWARE_A_RK3399_BUILDLINK3_MK)
TRUSTED_FIRMWARE_A_RK3399_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.trusted-firmware-a-rk3399+=	trusted-firmware-a-rk3399>=2.6
BUILDLINK_PKGSRCDIR.trusted-firmware-a-rk3399?=	../../sysutils/trusted-firmware-a-rk3399
.endif	# TRUSTED_FIRMWARE_A_RK3399_BUILDLINK3_MK

BUILDLINK_TREE+=	-trusted-firmware-a-rk3399