Hi
I've got a hopefully simple question. I've just ran through the "Hello World" example on the Wiki and successfully produced the .ipk which I transferred to my router, installed the package and ran it to produce "Hello, world!". All great!
But my question is, how do I compile the program directly so I can copy just the program and run it?
I believe I've found the correct GCC compiler, in my case I think it is in:
~/openwrt/staging_dir/toolchain-arm_cortex-a9_gcc-8.4.0_musl_eabi/bin
then used the command to build a program from the .c file:
arm-linux-gnueabihf-gcc -c -o helloworld.o ~/openwrt/code/helloworld/helloworld.c
arm-linux-gnueabihf-gcc -o helloworld helloworld.o
but when I copy the resulting helloworld to my router and try running it with:
./helloworld
I get:
-ash: ./helloworld: not found
I've checked and I think I have the correct permission:
-rwxr-xr-x 1 root root 7984 Aug 14 11:47 helloworld
I'm using a Pi for my development environment and a ASUS RT-AC66U B1 for the test environment.
Thanks
Sam