Hello all,
I am having issues when using a cross compiler on a program that is included with the kernel im using on a nitrogen6 board.
The disto I am using is:
GitHub - boundarydevices/linux-imx6 at boundary-imx_3.14.52_1.1.0_ga
The file in question is spidev_test.c which can be found in the above repo at /Documentation/spi.
I am trying to build it using a linux virtual machine (xubuntu, not sure which version at the moment)
Ive tried multiple ways of building it including just gcc or the arm cross compiler with the command
arm-linux-gnueabihf-gcc -I/home/matt/linux-imx6/arch/arm/include .... and I also tried building with the same compiler but -I/linux-imx6/include however that gave compilation errors.
Including the /arch/arm/include folder the build succeeded, the issue is when i move the file onto the nitrogen and attempt to execute it i get a file not found error and i believe ldd reveals the issue as:
libc.so.6 => not found (0x00000000)
/lib/ld-linux-armhf.so.3 => /lib/ld-linux-armhf.so.3 (0x000000)
so the issue appears to be the libc.so.6.
I will add i dont currently readially have a way to connect the nitrogen to the net to download the other libraries, how do i compile this correctly to run with my versions?
Hello,
1.
Please use the same toolchain for application and kernel compiling.
How to prepare toolchaing for Yocto approach - please look at the following
i.MX Yocto Project: How can I compile the kernel manually?
2.
as for libc.so.6 - You may try to simlink it to libc.so of other version.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------