ARM-software / tf-issues

Issue tracking for the ARM Trusted Firmware project
37 stars 16 forks source link

rk3399 fails to build: region PMUSRAM overflowed #650

Open vagrantc opened 5 years ago

vagrantc commented 5 years ago

Working on packaging arm-trusted-firmware in Debian.

Building arm-trusted-firmware from git commit cabe0a31801e99e7abb84d2114ded6bb56f3c71e or v2.0, rk3399 fails to build with a recent Debian toolchain (gcc 8.2.0, binutils 3.31.1):

Must remake target 'build/rk3399/debug/bl31/bl31.elf'. LD build/rk3399/debug/bl31/bl31.elf aarch64-linux-gnu-ld.bfd: build/rk3399/debug/bl31/bl31.elf section .pmusram' will not fit in regionPMUSRAM'
aarch64-linux-gnu-ld.bfd: region `PMUSRAM' overflowed by 3928 bytes make[2]: *** [Makefile:722: build/rk3399/debug/bl31/bl31.elf] Error 1
make[2]: Leaving directory '/<>'

Full build log available at:

https://people.debian.org/~vagrant/atf/

Works fine building with the older toolchains (gcc 6, binutils 2.28) in Debian, but it's not possible to include arm-trusted-firmware in an older release; the newer toolchains are required to work for new uploads.

Thanks!

ghost commented 5 years ago

@jwerner-chromium

ghost commented 5 years ago

By the way, there is a video about the problem of fitting all the code that is needed to be placed in the PMUSRAM: https://youtu.be/UC35q4OJg3k?t=1350

ghost commented 5 years ago

However, "overflowed by 3928 bytes" looks like there is some problem with the new version of the linker, not like GCC has become that worse in 2 major versions. There were only ~4KB of code for each CPU type (M0 and A72/53) to begin with.

jwerner-chromium commented 5 years ago

Agreed, this looks like a bug or serious regression, not just a natural change in code generation.

@rkchrome, can Rockchip people look into this?

ghost commented 5 years ago

It looks like @rkchrome is an old account and the correct one is @rockchip-linux.

ghost commented 5 years ago

Which version of the compilers are you using? I'm using the following compilers from here: https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads

gcc-arm-8.2-2019.01-x86_64-arm-eabi
gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu

And it seems to build correctly.

maschinensehen commented 2 years ago

I am getting a similar error on a current archlinux system with

aarch64-linux-gnu-gcc (GCC) 11.2.0 aarch64-linux-gnu-ld GNU ld (GNU Binutils) 2.38

LD /data/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf aarch64-linux-gnu-ld.bfd: /data/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf section .pmusram' will not fit in regionPMUSRAM' aarch64-linux-gnu-ld.bfd: .incbin_sram has exceeded its limit aarch64-linux-gnu-ld.bfd: region `PMUSRAM' overflowed by 68376 bytes make: *** [Makefile:1278: /data/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf] Error 1

ssg-bot commented 2 years ago

Hello @vagrantc!

Thank you for raising an issue for Trusted Firmware-A.

The TF-A project has now migrated to www.trustedfirmware.org. This issue tracker will still remain accessible for some time, but only for historical reasons. From now on you should raise new issues on trustedfirmware.org.

If it is a query or a design discussion it is better discussed via the mailing list. If it is issue/bug which need to be tracked, raise an issue in the issue tracking board and also send an email to the mailing list to notify the TF-A community.

How do I raise issues for TF-A?

Please use our new issue tracking board. For this you just need to login with your existing GitHub account. We also have a guide to help you raise the issue with the appropriate labels and tags. This way it will be easier for both you and us to track and address the issue most effectively.

We are looking forward to seeing you in trustedfirmware.org!

The Trusted Firmware-A team