Here's a sample log:
Add the cross-compiler to your path:
Code:
export PATH=$PATH:/scratchbox/compilers/cs2007q3-glibc2.5-arm6/bin
A small program:
Code:
~> cat hello.c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello, World.\n");
return 0;
}
Compile:
Code:
arm-none-linux-gnueabi-gcc hello.c -o hello-kindle
Verify that you have an arm executable
Code:
file hello-kindle
hello-kindle: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), not stripped
Transfer program to Kindle:
Code:
cat hello-kindle | ssh root@192.168.2.2 "cat - > /tmp/hello-arm"
SSH into Kindle and run:
Code:
~> ssh root@192.168.2.2
root@192.168.2.2's password:
[root@kindle root]# cd /tmp/
[root@kindle tmp]# ls -la hello-arm
-rw-r--r-- 1 root root 5064 Oct 26 15:49 hello-arm
[root@kindle tmp]# chmod +x hello-arm
[root@kindle tmp]# ./hello-arm
Hello, World.