AnsweredAssumed Answered

Unable to create exact toolchain for iMx6q cross-compiling

Question asked by Abhijeet Gokar on Oct 14, 2019
Latest reply on Oct 22, 2019 by gusarambula

The build configuration that I am having is:


Build Configuration:
BB_VERSION = "1.28.0"
BUILD_SYS = "i686-linux"
NATIVELSBSTRING = "Ubuntu-16.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "imx6qsabresd"
DISTRO = "poky"
TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard cortexa9"
TARGET_FPU = "vfp-neon"


I have followed the toolchain extraction procedure from the thread:


I have even extracted its path, before I want to run the cross compiling make commands.

export PATH=$PATH:/opt/poky/2.0.2/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi


The toolchain makes the C folder directory successfully, but the executables run on the iMx6 OS and abruptly stops.


On booting and searching for SPI drivers, the following boot messages are found:

dmesg | grep spi
[ 0.982809] of_dma_request_slave_channel: dma-names property of node '/soc/aips-bus@02000000/spba-bus@02000000/ecspi@02018000' missing or empty
[ 0.994407] spi_imx 2018000.ecspi: cannot get the TX DMA channel!
[ 0.999210] spi_imx 2018000.ecspi: dma setup error,use pio instead
[ 1.004858] spi_imx 2018000.ecspi: probed




What minimal changes I have to do to get a successful toolchain setup?




On running the command, $ arm-poky-linux-gnueabi-gcc h.c -o h

The following error crops up:
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crt1.o: No such file or directory
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crti.o: No such file or directory
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crtbegin.o: No such file or directory
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find -lgcc
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find -lgcc_s
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find -lc
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find -lgcc
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find -lgcc_s
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crtend.o: No such file or directory
/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status


I think this issue is because of the path not being set properly in the binary- read-ld. How do I set the correct paths in read-ld to remove this error?