U-Boot Build failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

U-Boot Build failed

2,880 Views
christoph8446
Contributor II

Hello,

 

I can’t build a u-boot image. I got the following error.

 

/home/user1/fsl-release-bsp/build-x11/tmp/sysroots/i686-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc

Makefile:1171: recipe for target 'u-boot' failed

make: *** [u-boot] Error 1

 

 

 

#!/bin/bash

export ARCH=arm

export CROSS_COMPILE=~/fsl-release-bsp/build-x11/tmp/sysroots/i686-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

make distclean;

make mx6bur_config

make

Hope somebody can help me…

Thanks

Chris

Labels (1)
0 Kudos
Reply
7 Replies

1,825 Views
JayTu
NXP Employee
NXP Employee

The fail indicated it can't find libgcc,

/home/user1/fsl-release-bsp/build-x11/tmp/sysroots/i686-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc

Please check if your sysroots contains it,

$ find -name libgcc*
./sysroots/x86_64-pokysdk-linux/lib/libgcc_s.so.1
./sysroots/cortexa7hf-neon-poky-linux-gnueabi/lib/libgcc_s.so
./sysroots/cortexa7hf-neon-poky-linux-gnueabi/lib/libgcc_s.so.1
./sysroots/cortexa7hf-neon-poky-linux-gnueabi/lib/.debug/libgcc_s.so.1
./sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/src/debug/libgcc
./sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/src/debug/libgcc/5.3.0-r0/gcc-5.3.0/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/libgcc
./sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/5.3.0/libgcc_eh.a
./sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/5.3.0/libgcc.a

And you've pointed to it, (the settings on my environment-setup-cortexa7hf-neon-poky-linux-gnueabi)

export CC="arm-poky-linux-gnueabi-gcc -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export CXX="arm-poky-linux-gnueabi-g++ -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export CPP="arm-poky-linux-gnueabi-gcc -E -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export AS="arm-poky-linux-gnueabi-as "
export LD="arm-poky-linux-gnueabi-ld --sysroot=$SDKTARGETSYSROOT"

0 Kudos
Reply

1,825 Views
christoph8446
Contributor II

Hello,

I checked if my sysroot contains it - should be OK -->

./sysroots/imx6qsabresd/lib/libgcc_s.so.1
./sysroots/imx6qsabresd/lib/libgcc_s.so
./sysroots/imx6qsabresd/sysroot-providers/libgcc
./sysroots/imx6qsabresd/usr/lib/arm-poky-linux-gnueabi/5.3.0/libgcc_eh.a
./sysroots/imx6qsabresd/usr/lib/arm-poky-linux-gnueabi/5.3.0/libgcc.a
./sysroots/i686-linux/usr/include/gcc-build-internal-arm-poky-linux-gnueabi/gcc/libgcc.mvars
./sysroots/i686-linux/usr/include/gcc-build-internal-arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libgcc
./sysroots/i686-linux/usr/include/gcc-build-internal-initial-arm-poky-linux-gnueabi/gcc/libgcc.mvars
./sysroots/i686-linux/usr/include/gcc-build-internal-initial-arm-poky-linux-gnueabi/arm-poky-linux-gnueabi/libgcc
./sysroots/imx6qsabresd-tcbootstrap/sysroot-providers/libgcc-initial
./sysroots/imx6qsabresd-tcbootstrap/usr/lib/arm-poky-linux-gnueabi/5.3.0/libgcc.a

How can I point to it? I don't understand the line

export CC="arm-poky-linux-gnueabi-gcc -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"

Thanks!

0 Kudos
Reply

1,825 Views
JayTu
NXP Employee
NXP Employee

The file (set the environment) is generated automatically when you build the tool chain. Do you build the toolchain using our yocto?

0 Kudos
Reply

1,825 Views
christoph8446
Contributor II

I cloned fsl-release-bsp and used bitbake to build bitbake core-image-minimal according to the i.MX_Yocto_Project_User's_Guide.

0 Kudos
Reply

1,825 Views
JayTu
NXP Employee
NXP Employee

You will need build toolchain if you want make uboot without bitbake. 

$ bitbake meta-toolchain

0 Kudos
Reply

1,825 Views
Carlos_Musich
NXP Employee
NXP Employee

You can try either

#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
make distclean;
make mx6_udoo_config
make

#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=/opt/fsl-imx-x11/<Kernel>/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
make distclean;
make mx6_udoo_config
make

Next post may also be useful

Modify u-boot in Yocto 


Best regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,825 Views
christoph8446
Contributor II

Hello Carlos,

It still does not work. It seems to be that there is a problem with the sysroot...

Regards Chris

0 Kudos
Reply