Jump to content
serene

U-Boot build error (Tinkerboard 2S)

Recommended Posts

Hi,

I got multiple errors when trying to build the U-Boot for TinkerBoard2.

I downloaded rkbin, and then execute "make.sh tinker2"

linaro@linaro-alip:~/u-boot$ ./make.sh tinker2
## make tinker2_defconfig -j12
arch/../configs/tinker2_defconfig:140:warning: override: reassigning to symbol OF_LIBFDT_OVERLAY
#
# configuration written to .config
#
ERROR: No toolchain: ../prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin

I then downloaded the toolchain, put it in the location mentioned on the error above, then I got these multiple errors:

linaro@linaro-alip:~/u-boot$ ./make.sh tinker2
## make tinker2_defconfig -j12
arch/../configs/tinker2_defconfig:140:warning: override: reassigning to symbol OF_LIBFDT_OVERLAY
#
# configuration written to .config
#
/home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found
/home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 2: /home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected
/bin/sh: 1: /home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
dirname: missing operand
Try 'dirname --help' for more information.
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk.dep
/bin/sh: 1: /home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
  CFG     spl/u-boot.cfg
/bin/sh: 1: /home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
make[1]: *** [scripts/Makefile.autoconf:79: u-boot.cfg] Error 1
make[1]: *** Waiting for unfinished jobs....
  CFG     tpl/u-boot.cfg
make[1]: *** [scripts/Makefile.autoconf:50: include/autoconf.mk.dep] Error 1
/bin/sh: 1: /home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
make[1]: *** [scripts/Makefile.autoconf:83: spl/u-boot.cfg] Error 1
/bin/sh: 1: /home/linaro/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error
make[1]: *** [scripts/Makefile.autoconf:87: tpl/u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
linaro@linaro-alip:~/u-boot$ 

 

Share this post


Link to post
Share on other sites

hello @serene

what's the build environment? you'll need x86_64 environment in order to build gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu

use the command lscpu and you will see the architecture: x86_64C

Architecture:                    x86_64 CPU op-mode(s):                  32-bit, 64-bit

Share this post


Link to post
Share on other sites
7 hours ago, tooz said:

hello @serene

what's the build environment? you'll need x86_64 environment in order to build gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu

use the command lscpu and you will see the architecture: x86_64C

Architecture:                    x86_64 CPU op-mode(s):                  32-bit, 64-bit

Thanks @tooz

I thought the script compiles natively, I ran it on aarch64.

I successfully built it on x86_64 (Ubuntu PC).

Share this post


Link to post
Share on other sites

Hi serene:

Can you try the SOP?
Let me know if you have any questions

[Tinker2 Source Download]
1)  u-boot Code => git clone https://github.com/TinkerBoard2/u-boot.git
2)  GCC            =>  wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz
3)  tar -Jxvf gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz -C ~

[Tinker2 u-boot]
1)  cd u-boot
2)  make tinker2_defconfig
3)  make CROSS_COMPILE=~/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- all --jobs=80
4)  ./tools/loaderimage --pack --uboot u-boot.bin uboot.img 0x00200000
5)  compile finish,copy u-boot/uboot.img to Tinker2
6)  dd if=uboot.img of=/dev/mmcblk1p1 (excute in tinker2)

Thank you.
Joe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...