Power & Source of Big Ideas

U-Boot building for NanoPi Neo2

Moderators: chensy, FATechsupport

Hi,

I tried to build the latest U-Boot yesterday, followed by instructions here: Mainline U-boot Linux for H5
For building I used Ubuntu 17.10 because only this OS contains aarch64-linux-gnu version 6.x or more by default (or can install version 5.x, 6.x or 7.x). Unfortunately on Ubuntu 16.04 I got error always because there are available gcc version 5.x only.

I followed the instructions, with the git source like here:

Code: Select all

git clone --depth 1 --single-branch -b sunxi-v2017.x https://github.com/friendlyarm/u-boot.git

when I run make with aarch64-linux-gnu-gcc version 6.x, I found an error message:

Code: Select all

aarch64-linux-gnu-ld.bfd: u-boot-spl section `.got.plt' will not fit in region `.sram'
aarch64-linux-gnu-ld.bfd: region `.sram' overflowed by 152 bytes
scripts/Makefile.spl:335: recipe for target 'spl/u-boot-spl' failed
make[1]: *** [spl/u-boot-spl] Error 1
Makefile:1367: recipe for target 'spl/u-boot-spl' failed
make: *** [spl/u-boot-spl] Error 2


I tried to make with aarch64-linux-gnu-gcc-7 too, but the only differences is the overflowed byte sizes:

Code: Select all

aarch64-linux-gnu-ld.bfd: region `.sram' overflowed by 128 bytes


When I tried the branch "sunxi-v2017.03", there was not found any important error messages and the making process runs perfectly.

I saw the differences between two branch, and I found that new hardware added into some .c source code, but I not know it is important for Neo2 or Neo Plus2 or not.

I would like to know why I got this error message, the branch v2017.03 is right for me or how can I build the latest u-boot.
Thank you in advance.
I'm building the branch sunxi-v2017.x for nanopi neo air but I did not meet your issue (fortunately).

You may want to fill an issue in GitHub, or investigate the issue because it looks your build exceeds SRAM section per few dozen of bytes (sram may be about 32kb in total) ; you could find some useless code to comment out.
Thanks for your quick answer.
I tried building for Neo Air with arm-linux-gnueabihf-gcc and it works for me too without any error.
For Neo2 and/or Neo Plus2 I will try something that You mentioned to me or I will use branch 2017.03 till I can not build the another.
Thanks again.
pumuckly wrote:
Thanks for your quick answer.
I tried building for Neo Air with arm-linux-gnueabihf-gcc and it works for me too without any error.
For Neo2 and/or Neo Plus2 I will try something that You mentioned to me or I will use branch 2017.03 till I can not build the another.
Thanks again.


Check https://github.com/armbian/build

It selects correct compiler, builds ATF, u-boot, kernel, userspace, ... and produce a working result.

Who is online

In total there are 24 users online :: 0 registered, 0 hidden and 24 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 24 guests