On Fri, 2019-09-27 at 23:50 +1000, Jonathan Gray wrote:
> On Fri, Sep 27, 2019 at 06:44:24PM +1000, Jonathan Gray wrote:
> > 
> > With U-Boot 2019.10-rc4 the am335x_evm SPL no longer fits when building
> > with gcc 6.3 but does fit with 7.4.
> and with gcc 7.4 arm-trusted-firmware doesn't fit...
> 
> aarch64-none-elf-ld.bfd: build/rk3399/debug/bl31/bl31.elf section `.pmusram' 
> will not fit in region `PMUSRAM'
> aarch64-none-elf-ld.bfd: region `PMUSRAM' overflowed by 3928 bytes
> 

This because CFLAGS passed by ports is overriding -Os
in the build.

Does the following look ok?

* Disable passing CFLAGS on to build as it overrides -Os and causes
the build to fail.
* Add rk3328

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/arm-trusted-firmware/Makefile,v
retrieving revision 1.11
diff -u -p -u -r1.11 Makefile
--- Makefile    12 Jul 2019 20:49:39 -0000      1.11
+++ Makefile    27 Sep 2019 14:31:37 -0000
@@ -9,6 +9,7 @@ GH_PROJECT=     arm-trusted-firmware
 GH_TAGNAME=    v2.1
 
 EPOCH=         0
+REVISION=      0
 
 CATEGORIES=    sysutils
 
@@ -23,8 +24,10 @@ MAKE_ENV+= BUILD_STRING="${GH_TAGNAME:S/
 
 NO_TEST=       Yes
 USE_GMAKE=     Yes
+CFLAGS=
 
 PLATFORMS=\
+       rk3328 \
        rk3399 \
        sun50i_a64
 
@@ -37,6 +40,8 @@ do-build:
 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/arm-trusted-firmware/
+       ${INSTALL_DATA} ${WRKBUILD}/build/rk3328/debug/bl31/bl31.elf \
+           ${PREFIX}/share/arm-trusted-firmware/rk3328-bl31.elf
        ${INSTALL_DATA} ${WRKBUILD}/build/rk3399/debug/bl31/bl31.elf \
            ${PREFIX}/share/arm-trusted-firmware/rk3399-bl31.elf
        ${INSTALL_DATA} ${WRKBUILD}/build/sun50i_a64/debug/bl31.bin \
Index: patches/patch-plat_rockchip_rk3328_rk3328_def_h
===================================================================
RCS file: patches/patch-plat_rockchip_rk3328_rk3328_def_h
diff -N patches/patch-plat_rockchip_rk3328_rk3328_def_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-plat_rockchip_rk3328_rk3328_def_h     27 Sep 2019 14:31:37 
-0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: plat/rockchip/rk3328/rk3328_def.h
+--- plat/rockchip/rk3328/rk3328_def.h.orig
++++ plat/rockchip/rk3328/rk3328_def.h
+@@ -98,7 +98,7 @@
+  * UART related constants
+  **************************************************************************/
+ #define RK3328_UART2_BASE     UART2_BASE
+-#define RK3328_BAUDRATE       1500000
++#define RK3328_BAUDRATE       115200
+ #define RK3328_UART_CLOCK     24000000
+ 
+ 
/******************************************************************************
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/sysutils/arm-trusted-firmware/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -r1.3 PLIST
--- pkg/PLIST   7 Feb 2019 20:50:18 -0000       1.3
+++ pkg/PLIST   27 Sep 2019 14:31:37 -0000
@@ -1,5 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.3 2019/02/07 20:50:18 phessler Exp $
 @pkgpath sysutils/atf-allwinner
 share/arm-trusted-firmware/
+share/arm-trusted-firmware/rk3328-bl31.elf
 share/arm-trusted-firmware/rk3399-bl31.elf
 share/arm-trusted-firmware/sun50i_a64-bl31.bin

Reply via email to