Toolchain to crosscompile Applications for BBB
Here is a very usefull link how to set up the crosscompiler, uboot, kernel and the filesystem for a beaglebone black.
If you only want to crosscompiler, then just follow the few code lines in the Crosscompiler chapter
https://eewiki.net/display/linuxonarm/BeagleBone+Black
Trying to run a cross-compiled executable on target device fails with: No such file or directory
Since nobody from the comments posted the answer, I guess I get the pleasure ;)
No such file or directory
comes from when the kernel tries to invoke the dynamic linker specified by the ELF executable's .interp
field, but no such file exists.
The .interp
field can be found with the following command:
objdump -j .interp -s ./hello_world
In the case of this example, the executable's .interp
field was /lib/ld-linux.so.3
, but the name of the dynamic linker on the BeagleBone Black is /lib/ld-linux-armhf.so.3
.
This happened because the program was compiled with a slightly different toolchain to the one required for the platform. It should be arm-linux-gnueabihf-*
rather than arm-linux-gnueabi-*
.
The difference between the two is that the Cortex-A8 uses specific floating point registers with the hard-float version (armhf
) of the EABI, but the original EABI (armel
) uses integer registers for passing around floating point numbers. As a result, armel
programs will run on armhf
(provided the dynamic linker is set to the correct path!), but not vice versa.
Simply adding a symbolic link ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3
is enough to resolve this issue, but the correct fix is to use the right toolchain when compiling the program in the first place.
BeagleBoneBlack Cross Compile on Mac Error
It seems that the problem is related to missmatch of toolchain complier version and my corresponding libraries on BBB.
I downgraded my Linaro toolchain to 4.8 from this link:
http://www.welzels.de/blog/projekte/arm-cross-toolchain/
QT Creator, compiling and deploying a c or c++ to a remote device (BeagleBone or R pi)
You need a complete toolchain
A toolchain is just a name for a group of things:
- Compiler for the target platform (or cross compiler in your case)
- Sysroot: An image of the filesystem in the target platform
- A cross compiling qmake
- QtCreator and the kit
You are lacking a cross compiling qmake. Please see my answer at this other post.
Furthermore, you need a toolchain for the Pi, and another toolchain for the Beagle.
Related Topics
Linux: How to Send a Whole Packet to a Specific Port on Another Host
Function Return Values Within Bash If Statements
Find Is Returning "Find: .: Permission Denied", But I Am Not Searching In
"Unknown Symbol in Module" on Module Insertion Despite Export_Symbol
How to Sort The String Array in Linux Bash Shell
How My Custom Module on Linux 3.2.28 Can Make a Call to Print_Cpu_Info
Linux Set End of File (Shrink, Truncate, Cut Out Some Data @ End)
Jenkins Cannot Run Firefox: No Protocol Specified Error: Cannot Open Display:: 0
Editing The Sudo File in a Shell Script
Kernel Oops Page Fault Error Codes for Arm
Perl System Calls When Running as Another User Using Sudo
Install Opencl(Amd Sdk Kit) on Linux Without Root Privilege
Jmeter:Difference Between Jmeter.Sh and Jmeter Without Extension File in Jmeter