Hello, > Unrelated to the diff, I sent > * devel/arm-none-eabi: update to binutils 2.40 and gcc 12.2.0 > to ports@, so maybe that helps with the code size.
Using binutils-2.40 and gcc-12.2.0, latest ATF (lts-2.8.5) built successfully and it runs with U-boot-2021.10. To enable Orange Pi One Plus (Allwinner H6) ethernet, ATF needs to be compiled with SUNXI_SETUP_REGULATORS=0 option, so here is a dirty idea for both (SUNXI_SETUP_REGULATORS=0 and 1) objects. Even if with tweaked ATF, ethernet will not work when *re*boot (warm boot). It occurs other Allwinner H6 based Orange Pi like this: https://linux-sunxi.org/Xunlong_Orange_Pi_3#Tips.2C_Tricks.2C_Caveats And I found ethernet does not work completely with U-boot-2023.04. I have not checked the details yet. Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/arm-trusted-firmware/Makefile,v retrieving revision 1.20 diff -u -p -r1.20 Makefile --- Makefile 22 Apr 2023 16:30:11 -0000 1.20 +++ Makefile 14 May 2023 11:47:45 -0000 @@ -2,12 +2,13 @@ PKG_ARCH= * COMMENT= ARM Trusted Firmware +# to avoid lts-vX.Y.Z (not vX.Y.Z) version scheme, use GH_COMMIT instead +VERSION= 2.8.5 GH_ACCOUNT= ARM-software GH_PROJECT= arm-trusted-firmware -GH_TAGNAME= v2.7.0 - -EPOCH= 0 -REVISION= 0 +GH_COMMIT= 65d1430e5147c52fd15859509b7472da3cf9575e +DISTNAME= arm-trusted-firmware-${VERSION} +PKGNAME= arm-trusted-firmware-${VERSION} CATEGORIES= sysutils @@ -32,13 +33,29 @@ PLATFORMS=\ rk3328 \ rk3399 \ sun50i_a64 \ - sun50i_h6 + sun50i_h6 \ + sun50i_h616 do-build: .for P in ${PLATFORMS} +. if "$P" == "sun50i_h6" + # ATF's Makefile looks not easy to tweak, rename directory name that + # stores compiled objects. First, make with SUNXI_SETUP_REGULATORS=0. + rm -rf ${WRKBUILD}/build/sun50i_h6.noreg + cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + V=1 PLAT=${P} DEBUG=1 SUNXI_SETUP_REGULATORS=0 bl31 + mv ${WRKBUILD}/build/sun50i_h6 ${WRKBUILD}/build/sun50i_h6.noreg + + # Second, make default (SUNXI_SETUP_REGULATORS=1). + cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + V=1 PLAT=${P} DEBUG=1 bl31 +. else cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ V=1 PLAT=${P} DEBUG=1 bl31 +. endif .endfor do-install: @@ -49,7 +66,11 @@ do-install: ${PREFIX}/share/arm-trusted-firmware/rk3399-bl31.elf ${INSTALL_DATA} ${WRKBUILD}/build/sun50i_a64/debug/bl31.bin \ ${PREFIX}/share/arm-trusted-firmware/sun50i_a64-bl31.bin + ${INSTALL_DATA} ${WRKBUILD}/build/sun50i_h6.noreg/debug/bl31.bin \ + ${PREFIX}/share/arm-trusted-firmware/sun50i_h6-bl31-noreg.bin ${INSTALL_DATA} ${WRKBUILD}/build/sun50i_h6/debug/bl31.bin \ ${PREFIX}/share/arm-trusted-firmware/sun50i_h6-bl31.bin + ${INSTALL_DATA} ${WRKBUILD}/build/sun50i_h616/debug/bl31.bin \ + ${PREFIX}/share/arm-trusted-firmware/sun50i_h616-bl31.bin .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/sysutils/arm-trusted-firmware/distinfo,v retrieving revision 1.11 diff -u -p -r1.11 distinfo --- distinfo 8 Aug 2022 15:27:59 -0000 1.11 +++ distinfo 14 May 2023 11:47:45 -0000 @@ -1,2 +1,2 @@ -SHA256 (arm-trusted-firmware-2.7.0.tar.gz) = maN/WraCQVvoDyC7GKzcGkXtqfKn3mfrPceY+qcPZuY= -SIZE (arm-trusted-firmware-2.7.0.tar.gz) = 6511934 +SHA256 (arm-trusted-firmware-2.8.5-65d1430e.tar.gz) = ZaeIg7ILo5wuLgLUjBngp8ZRqASnMCAjBJswa6rDgPU= +SIZE (arm-trusted-firmware-2.8.5-65d1430e.tar.gz) = 7122530 -- SASANO Takayoshi (JG1UAA) <u...@mx5.nisiq.net>