Just to say that it worked! Thanks a lot again. So if it may help others, here is what I did to compile my first C program for Onion:
-
install Kubuntu 14.04 64 bits on a VirtualBox VM
-
follow KitBishop guidelines (great stuff initially here : https://community.onion.io/topic/9/how-to-install-gcc/22
-
Download the tool chain from https://s3-us-west-2.amazonaws.com/onion-cdn/community/openwrt/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
-
Unpack it to some suitable directory (referred to below as <tc_dir>)
-
Set up environment variables as follows (I put this in my ~/.profile file so it was always there):
PATH=<tc_dir>/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin:$PATH
STAGING_DIR=<tc_dir>/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2
export STAGING_DIR
-
Create your c program - e.g. test-prog.c
-
Compile the program using (e.g.): mips-openwrt-linux-uclibc-gcc test-prog.c -o test-prog
-
Transfer the output file (test-prog) to your Omega using you favourite tools.
-
On the Omega in the directory you placed the file, run it by: ./test-prog - and there you are