Install OpenWrt-SDK:

Openwrt SDK

source ~/setup.sh
nano helloworld.f90
program HelloWorldF90
    write(*,*) "Hello World!"
end program HelloWorldF90
mips-openwrt-linux-uclibc-gfortran helloworld.f90 -o helloworld-f90-gnu
scp helloworld-f90-gnu root@192.168.0.102:/mnt/sda1
root@Arduino:/mnt/sda1# ./helloworld-f90-gnu
./helloworld-f90-gnu: can't load library 'libgfortran.so.3'

The Fortran runtime library is needed.

 

wget https://www.dropbox.com/s/w9nmw1nilbbs475/libgfortran_4.6-linaro-1_ar71xx.ipk?dl=0 -O libgfortran_4.6-linaro-1_ar71xx.ipk --no-check-certificate
opkg install libgfortran_4.6-linaro-1_ar71xx.ipk

Test run:

root@Arduino:/mnt/sda1# ./helloworld-f90-gnu
 Hello World!

 

Comments powered by CComment