Hi Community,
I am trying to build U-boot from local folder using the following commands:
export ARCH=arm
export CROSS_COMPILE=/home/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
make mx6qsabreauto_defconfig
make
And I am getting following error:
/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
make[2]: *** [examples/standalone/hello_world] Fehler 1
make[1]: *** [examples/standalone] Fehler 2
make: *** [examples] Fehler 2
I am using Cross compiler from x86_64-linux as mentioned above, it is supposed to build image for i.mx devices, isn't it?
NOTE:
i got BSP from:
Solved! Go to Solution.
Hello Mahesh K K,
You would need to extract the toolchain using the following command:
$ bitbake meta-toolchain
After extracting it run the installer script and initialize it you should be able to compile with it in order to run on the i.MX6. The toolchain you need is for the CortexA9.
There is a very good training on the link below where it is shown how to compile the kernel using the extracted toolchain.
I hope this information helps!
Hi Mahesh,
Actually it's not necessary to bitbake the toolchain to build the U-boot. But you need to export one more variable. Here is the command you can refer to:
export ARCH=arm
export CROSS_COMPILE=/home/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export CC="/home/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/home/fsl-community-bsp/build/tmp/sysroots/imx6qsabreauto"
make mx6qsabreauto_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!
---------------------------------------------------------------------------------------------------------------------------
Hello Mahesh K K,
You would need to extract the toolchain using the following command:
$ bitbake meta-toolchain
After extracting it run the installer script and initialize it you should be able to compile with it in order to run on the i.MX6. The toolchain you need is for the CortexA9.
There is a very good training on the link below where it is shown how to compile the kernel using the extracted toolchain.
I hope this information helps!