Subject: bug#78251: arm-trusted-firmware for pine64 FTBFS

From: Efraim Flashner <[email-masked]>
Date: Mon, 5 May 2025 09:27:50 +0300

I was trying to deploy a new generation on my pine64 and the
arm-trusted-firmware failed to build.  I tried changing the make-flags
on arm-trusted-firmware to set CFLAGS=-Os but the overflow was still 216
bytes.  Changing it to -O2 made it 4312 bytes.  Adding DEBUG=0 didn't
make a difference either.

Excerpt from the build log:

  AS      plat/common/aarch64/platform_mp_stack.S
  PP      bl31/bl31.ld.S
  AR      /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/lib/libfdt.a
  AR      /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/lib/libc.a
  LD      /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf
ld: address 0x500d8 of /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf section `.data' is not within region `RAM'
ld: /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf section `.rela.dyn' will not fit in region `RAM'
ld: address 0x500d8 of /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf section `.data' is not within region `RAM'
ld: address 0x500d8 of /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf section `.data' is not within region `RAM'
ld: address 0x500d8 of /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf section `.data' is not within region `RAM'
ld: address 0x500d8 of /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf section `.data' is not within region `RAM'
ld: BL31 image has exceeded its limit.
ld: region `RAM' overflowed by 216 bytes
collect2: error: ld returned 1 exit status
make: *** [Makefile:1557: /tmp/guix-build-arm-trusted-firmware-sun50i-a64-2.12.1.drv-0/source/build/sun50i_a64/debug/bl31/bl31.elf] Error 1
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "4" "PLAT=sun50i_a64" "DEBUG=0" "CC=gcc" "DEBUG=1") exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 4.6 seconds
command "make" "-j" "4" "PLAT=sun50i_a64" "DEBUG=0" "CC=gcc" "DEBUG=1" failed with status 2
build process 6 exited with status 256
builder for `/gnu/store/9d5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv' failed with exit code 1
@ build-failed /gnu/store/9d5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv - 1 builder for `/gnu/store/9d5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv' failed with exit code 1
derivation '/gnu/store/9d5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv' offloaded to 'ubuntu.unicorn-typhon.ts.net' failed: build of `/gnu/store/9d5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv' failed
build of /gnu/store/9d5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv failed
View build log at '/var/log/guix/drvs/9d/5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv'.
guix build: error: build of `/gnu/store/9d5f5yaqsiagglzlhwak0ywwlv7gfji0-arm-trusted-firmware-sun50i-a64-2.12.1.drv' failed

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted