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:
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?