[Yocto BSP 1.8_ga] Build u-boot image failed

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

[Yocto BSP 1.8_ga] Build u-boot image failed

1,289 Views
charleshuang
Senior Contributor II

Duplicate steps:

step 1) source environment

#!/bin/bash

export CROSS_COMPILE=/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

export ARCH=arm

step 2) cd u-boot-imx/

step 3) make distclean

step 4) make mx6qpsabresd_config

step 5) make

error log message:

...

...

  CC      examples/standalone/stubs.o

  LD      examples/standalone/libstubs.o

  CC      examples/standalone/hello_world.o

  LD      examples/standalone/hello_world

/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc

make[2]: *** [examples/standalone/hello_world] Error 1

make[1]: *** [examples/standalone] Error 2

make: *** [examples] Error 2

Can you help me to solve this issue?

Thanks.

Best Regards,

Alex

0 Kudos
2 Replies

442 Views
danwei_luo
NXP Employee
NXP Employee

Hi Alex,

Here is the command you can refer to:

export ARCH=arm

export CROSS_COMPILE=/opt/poky/1.8/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

export CC="/opt/poky/1.8/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/poky/1.8/sysroots/imx6qpsabresd"

make mx6qpsabresd_defconfig

make CC="$CC"

I have the same problem with you before, and this setting solved my problem.

Hope it will be helpful to you too!

Best regards,

Danwei Luo

---------------------------------------------------------------------------------------------------------------------------

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

---------------------------------------------------------------------------------------------------------------------------

0 Kudos

442 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Alex,

      Try following way, please!

gcc - U-boot build fails - cannot find lgcc / libgcc.a - Ask Ubuntu

Regards,

Weidong

0 Kudos