Hello,
I'm in charge of evaluating the iMX6 SoloX CPU using the iMX6SX Sabre SD demo board.
I succeeded in compiling the rootfs and the meta toolchain using Yocto but now I'm facing an issue with arm-poky-linux-gnueabi-gcc.
I'm able to compile some GPU samples but I can't run them on the demo board, linux tells me "no such file or directory".
I checked the header section with readelf and everything seems to be ok (if I compare it with the /sbin/ifconfig header section).
To figure out why I can compile an ELF file but I can't execute it, I created a simple hello world sample.
If I compile using the following commands everything's ok and I can run the output file (hello).
arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/freescale/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -o hello hello.c
But if I compile the same source file in several stages (as It's done in makefiles).
Frist I create a .o file and then I create the ELF file, I can't execute the output file (hello_bin).
Here's the command I use to generate the .o file.
arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/freescale/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -c hello.c -o hello_bis.o
and the command to generate the ELF file.
arm-poky-linux-gnueabi-gcc --sysroot=/opt/freescale/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -o hello_bis hello_bis.o
I can execute hello but not hello_bis. The files do not have the same size.
I tried to repeat those two tests using arm-linux-gnueabihf-gcc, which is the gcc from the iMX6-based Toradex module, and the sysroot generated by freescale Yocto.
With this configuration (Toradex's gcc + freescale's sysroot) I can compile hello and hello_bis, they have the same size and they both work fine on the demo board.
After that I tried to recompile one of our biggest app using its makefile. I can't run the output generated by the arm-poky-linux-gnueabi-gcc but I can run the one generated by arm-linux-gnueabihf-gcc.
Is arm-poky-linux-gnueabi-gcc buggy ?
Does anyone can explain why the hello binary generated in one stage works fine and the hello_bis binary generated in two stages does not when using arm-poky-linux-gnueabi-gcc but they both work fine when generated with arm-linux-gnueabihf-gcc using the same compiling flags ?