Assistance with U-Boot Compilation Error

Sean Anderson seanga2 at gmail.com
Tue Aug 27 06:01:43 CEST 2024


On 8/26/24 19:18, Reyders Morales wrote:
> Dear Tom,
> 
> I hope this message finds you well.
> 
> My name is Reyders, and I am currently working on compiling U-Boot for
> am335x_evm_defconfig. However, I have encountered a compilation error.
> I greatly respect the work being done on this project and would be
> very grateful for any guidance you could provide.
> 
> Details of the Issue:
> 
> Environment: Ubuntu 20.04, arm-linux-gnueabihf-gcc 9.4.0
> Target Board/Architecture: am335x_evm_defconfig
> U-Boot Version: v2024.10-rc3 or main
> Error Message:
> ---------
> LD      spl/u-boot-spl
> arm-linux-gnueabihf-ld.bfd: u-boot-spl section `__u_boot_list' will
> not fit in region `.sram'
> arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 156 bytes
> make[1]: *** [scripts/Makefile.spl:532: spl/u-boot-spl] Error 1
> make: *** [Makefile:2095: spl/u-boot-spl] Error 2
> ---------


Well, it's just what is says. Your U-Boot doesn't fit in ram.

> Additional Context:
> 
> I've been able to successfully compile the v2024.07-rc5 version. I
> think that this is the last one that works.

Try increasing CONFIG_SPL_MAX_SIZE and then use linux/scripts/bloat-o-meter
to see where the growth is.

But the main thing is that U-Boot is tested with the latest GCC, and older
versions tend to have worse optimization.

The easiest way to get a newer GCC is to download one from [1]. Since you
are on focal, you could also try [2] (but that only provides GCC 11).

[1] https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/
[2] https://launchpad.net/~dristan-viburnums/+archive/ubuntu/toolchain

> I was compiling the u-boot just for learning purposes. Sandly, I think
> that I do not have the knowledge to fix it. If you can guide me in a
> certain direction, I would greatly appreciate it.
> 
> In addition, I would greatly appreciate any insights or
> recommendations you might have to help resolve this. If you need
> further details or clarification on any point, I would be more than
> happy to provide them.
> 
> Thank you very much for your time and for all the hard work that goes
> into maintaining this project. I look forward to any advice you might
> offer
> 
> Thanks in advance,
> Reyders
> PD: I wrote to you because I use the get_maintainer.pl script and they
> show these names.

Please CC the U-Boot mailing list.

--Sean


More information about the U-Boot mailing list