[BPI-R3] ATF build error - Solved

Hi everyone.

Got an error by attempting to build the ATF from the source:

Frank’s r3-atf:

  PP      bl2/bl2_el3.ld.S
  LD      /home/alex/Src/BPI-R3/u-boot/build/mt7986/release/bl2/bl2.elf
/usr/bin/aarch64-linux-gnu-ld: warning: /home/alex/Src/BPI-R3/u-boot/build/mt7986/release/bl2/bl2.elf has a LOAD segment with RWX permissions
make[1]: *** [/home/alex/Src/BPI-R3/u-boot/Makefile:1305: /home/alex/Src/BPI-R3/u-boot/build/mt7986/release/bl2/bl2.elf] Error 1
make[1]: Leaving directory '/home/alex/Src/BPI-R3/u-boot'
make: *** [makefile:127: atf] Error 2

Mtk atf:

Building fvp
  LD      /home/alex/Src/BPI-R3/ATF/arm-trusted-firmware/build/fvp/release/bl2/bl2.elf
aarch64-linux-gnu-ld.bfd: warning: /home/alex/Src/BPI-R3/ATF/arm-trusted-firmware/build/fvp/release/bl2/bl2.elf has a LOAD segment with RWX permissions
make: *** [Makefile:1307: /home/alex/Src/BPI-R3/ATF/arm-trusted-firmware/build/fvp/release/bl2/bl2.elf] Error 1

The error looks the same, or very similar.

Did anyone had such issue before? Both uses the default conf from Frank’s branch

Thanks in advance!

UPD:

Solved by downgrading crossdev binutils from 2.39 to 2.38

You could try --no-warn-rwx-segment with 2.39

https://developer.trustedfirmware.org/T996

Have you tried mtksoc branch for all boot-devices (sd,emmc,nand,nor)?

Maybe i add this into my uboot-repo and add my patches on top

Not yet, i’ll update you on an attempt