slsh (Interpreter for S-Lang scripts) and Yun

opkg update
opkg install slsh
nano hello.sls

message("Hello, world!");

slsh hello.sls
Hello, world!


Write comment (0 Comments)

Install TCL:

opkg update
opkg install tcl

Find out what installed:

opkg files tcl

Package tcl (8.5.8-1) is installed on root and has the following files:
nano /mnt/sda1/hello.tcl

puts {hello, world}

chmod 755 /mnt/sda1/hello.tcl


Error came out:

Can't find a usable init.tcl in the following directories:
    /usr/lib/tcl8.5 /usr/lib/tcl8.5 /lib/tcl8.5 /usr/library /library /tcl8.5.8/library /tcl8.5.8/library

Fix Error:

mkdir -p /usr/lib/tcl8.5
cd /usr/lib/tcl8.5
wget -O init.tcl --no-check-certificate

Run it again:

hello, world


Write comment (0 Comments)
nano hello.s
# File: hello.s -- Say Hello to MIPS Assembly Language Programmer
# Author: falcon <wuzhangjin(at)>, 2009/01/17
# Ref:
#    [*]
#    [*] MIPS Assembly Language Programmer's Guide
#    [*] See MIPS Run Linux(second version)
# Compile:
#       $ gcc -o hello hello.s
#       or
#       $ as -o hello.o hello.s
#       $ ld -e main -o hello hello.o

    .globl main

    .set noreorder
    .cpload $gp       # setup the pointer to global data
    .set reorder
                      # print sth. via sys_write
    li $a0, 1         # print to standard ouput
    la $a1, stradr    # set the string address
    lw $a2, strlen    # set the string length
    li $v0, 4004      # index of sys_write:
                      # __NR_write in /usr/include/asm/unistd.h
    syscall           # causes a system call trap.

                      # exit via sys_exit
    move $a0, $0      # exit status as 0
    li $v0, 4001      # index of sys_exit
                      # __NR_exit in /usr/include/asm/unistd.h

stradr: .asciiz "hello, world!\n"
strlen: .word . - stradr  # current address - the string address
# end
root@Arduino:/mnt/sda1# gcc -o hello hello.s
root@Arduino:/mnt/sda1# ./hello
hello, world!


Write comment (0 Comments)

Install OpenWrt-SDK:

Openwrt SDK

source ~/
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@
root@Arduino:/mnt/sda1# ./helloworld-f90-gnu
./helloworld-f90-gnu: can't load library ''

The Fortran runtime library is needed.


wget -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!


Write comment (0 Comments)