When I followed the steps for the cross compile the hello_board c code on this link https://developer.ruggedboard.com/g5-system-development-guide/host-setup and tried to execute the hello_board on the rugged board then it gives below error.
root@rugged-board-a5d2x-sd1:~# uname -a
Linux rugged-board-a5d2x-sd1 4.9.151-linux4sam_5.8+-04823-gab4590e #1 Tue Mar 31 08:57:52 UTC 2020 armv7l GNU/Linux
root@rugged-board-a5d2x-sd1:~# ./hello
-sh: ./hello: not found
root@rugged-board-a5d2x-sd1:~#
Logs on Host system:
upesh@upesh-Lenovo-Z50-70:~/c_project$ cat hello.c
#include <stdio.h>
int main()
{
printf("Hello board!!\n");
return 0;
}
upesh@upesh-Lenovo-Z50-70:~/c_project$ arm-linux-gnueabihf-gcc hello.c -o hello_board
upesh@upesh-Lenovo-Z50-70:~/c_project$ ls
gpio_toggle.c hello_board hello.c test1
upesh@upesh-Lenovo-Z50-70:~/c_project$ sudo cp hello_board /var/lib/tftpboot/
File details:
upesh@upesh-Lenovo-Z50-70:~/c_project$ readelf -h hello_board
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: ARM
Version: 0x1
Entry point address: 0x3fd
Start of program headers: 52 (bytes into file)
Start of section headers: 6996 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 9
Size of section headers: 40 (bytes)
Number of section headers: 29
Section header string table index: 28
upesh@upesh-Lenovo-Z50-70:~/c_project$
Logs on Rugged board:
root@rugged-board-a5d2x-sd1:~# tftp -r hello_board -g 192.168.1.101
root@rugged-board-a5d2x-sd1:~# ls
hello_board
root@rugged-board-a5d2x-sd1:~# chmod +x hello_board
root@rugged-board-a5d2x-sd1:~# ls
hello_board
root@rugged-board-a5d2x-sd1:~# ls -ll
-rwxr-xr-x 1 root root 8156 Jan 1 01:04 hello_board
root@rugged-board-a5d2x-sd1:~# ./hello_board
-sh: ./hello_board: not found
root@rugged-board-a5d2x-sd1:~#
Please help to provide the solution for it.
hello,
Thank you so much for sharing this helpful information, it helped me alot
Thanks and regards.:)