OpenWrt Forum Archive

Topic: Which of these packages can be used as scripting lang.

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have installed those packages:

base-files - 117-r36088
blkid - 2.21.2-1
block-mount - 0.2.0-9
busybox - 1.19.4-6
dnsmasq - 2.62-2
dropbear - 2011.54-2
e2fsprogs - 1.42.4-1
fdisk - 2.21.2-1
firewall - 2-55.1
hotplug2 - 1.0-beta-4
ip - 3.3.0-1
iptables - 1.4.10-4
iw - 3.6-1
jshn - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8
kernel - 3.3.8-1-f57f4e4b03f8756fe7965db2671c97f6
kmod-b43 - 3.3.8+2012-09-07-3
kmod-b43legacy - 3.3.8+2012-09-07-3
kmod-cfg80211 - 3.3.8+2012-09-07-3
kmod-crypto-aes - 3.3.8-1
kmod-crypto-arc4 - 3.3.8-1
kmod-crypto-core - 3.3.8-1
kmod-diag - 3.3.8-10
kmod-fs-ext4 - 3.3.8-1
kmod-ipt-conntrack - 3.3.8-1
kmod-ipt-core - 3.3.8-1
kmod-ipt-nat - 3.3.8-1
kmod-ipt-nathelper - 3.3.8-1
kmod-lib-crc-ccitt - 3.3.8-1
kmod-lib-crc16 - 3.3.8-1
kmod-mac80211 - 3.3.8+2012-09-07-3
kmod-nls-base - 3.3.8-1
kmod-ppp - 3.3.8-1
kmod-pppoe - 3.3.8-1
kmod-pppox - 3.3.8-1
kmod-scsi-core - 3.3.8-1
kmod-switch - 3.3.8-5
kmod-usb-brcm47xx - 3.3.8-1
kmod-usb-core - 3.3.8-1
kmod-usb-ohci - 3.3.8-1
kmod-usb-storage - 3.3.8-1
kmod-usb-storage-extras - 3.3.8-1
kmod-usb-uhci - 3.3.8-1
kmod-usb2 - 3.3.8-1
libblkid - 2.21.2-1
libblobmsg-json - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8
libc - 0.9.33.2-1
libcom_err - 1.42.4-1
libext2fs - 1.42.4-1
libgcc - 4.6-linaro-1
libip4tc - 1.4.10-4
libiwinfo - 36
libiwinfo-lua - 36
libjson - 0.9-2
liblua - 5.1.4-8
libncurses - 5.7-5
libnl-tiny - 0.1-3
libopenssl - 1.0.1h-1
libpcap - 1.1.1-2
libpcre - 8.11-2
libpthread - 0.9.33.2-1
libubox - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8
libubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
libubus-lua - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
libuci - 2013-01-04.1-1
libuci-lua - 2013-01-04.1-1
libuuid - 2.21.2-1
libxtables - 1.4.10-4
lua - 5.1.4-8
luci - 0.11.1-1
luci-app-firewall - 0.11.1-1
luci-i18n-english - 0.11.1-1
luci-lib-core - 0.11.1-1
luci-lib-ipkg - 0.11.1-1
luci-lib-nixio - 0.11.1-1
luci-lib-sys - 0.11.1-1
luci-lib-web - 0.11.1-1
luci-mod-admin-core - 0.11.1-1
luci-mod-admin-full - 0.11.1-1
luci-proto-core - 0.11.1-1
luci-proto-ppp - 0.11.1-1
luci-sgi-cgi - 0.11.1-1
luci-theme-base - 0.11.1-1
luci-theme-openwrt - 0.11.1-1
mtd - 18.1
netifd - 2013-01-29.2-4bb99d4eb462776336928392010b372236ac3c93
nvram - 9
opkg - 618-3
ppp - 2.4.5-8
ppp-mod-pppoe - 2.4.5-8
screen - 4.0.3-3
swap-utils - 2.21.2-1
tcpdump - 4.2.1-3
terminfo - 5.7-5
ubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
ubusd - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
uci - 2013-01-04.1-1
uhttpd - 2012-10-30-e57bf6d8bfa465a50eea2c30269acdfe751a46fd
vim-full - 7.3-1
wpad-mini - 20120910-1
zlib - 1.2.7-1


Which of them can be use for scripting (possibly, turing complete)?
I know the "busybox sh" itself; "sed", "awk", "lua". Any other?

(Last edited by pier4r on 3 Feb 2015, 14:06)

Don't know about "Turing complete", but lua is the standard openWrt scripting language, and of course shell scripting is possible.

Thanks for the infor about arduino Yun and Openwrt. But still i think that some programming languages ('very small') are overlooked (like "bc" [basic calculator] for example). For this thought i asked here, i hope that some expert with openwrt packages and programming will reply someday.

smile

You can look at the packages repository or at

https://dev.openwrt.org/browser/packages/lang/ (oldpackages feed)
https://github.com/openwrt/packages/tree/master/lang (packages feed trunk)

for a list of packages that are sorted into "programming languages" category.
Notice that you find some of the languages linked by jessemonroy650 there too.
There is really not that much difference between scripting and "normal" programming languages.
You can talk a lot about the basics of Regular Expression, SED+AWK - as much as you can talk about "higher" languages and computability.

But still i think that some programming languages ('very small') are overlooked (like "bc" [basic calculator] for example)

"Overlooking" programming languages does not make that much sense.
bc is not overlooked as a programming language because it does calculations. Using it for other stuff only counts as "hacking" - it might have some academic value (like prooving that sed is in fact turing complete or you might have some fun  similar to demo scene) but using it everyday ?

Most programming languages in OpenWrt are scripting languages that can interface with OpenWrt/can be used on commandline and with other scripts/programs or some Web stuff (PHP)

You could write binary code or write your own macro assembler. The binary formats and Instructions Codes are probably somewhere documented.

People can freely chose which language they want to use (if they are hobby programmers) when they want to write code for OpenWrt.

From a "professional" / business viewpoint - look at how normal Firmware in Routers is built (IP Vendor (ARM) -> Chip Creator (Broadcom) with own SDK -> ODM (some chinese) with own SDK (maybe adapted Chip SDK?) -> Router Seller (Netgear) with own SDK / parts of other SDK ...
In this case maybe coding in Industry Standard C is not a bad idea - because C has been around for several years.

pier4r wrote:

Thanks for the infor about arduino Yun and Openwrt. But still i think that some programming languages ('very small') are overlooked (like "bc" [basic calculator] for example). For this thought i asked here, i hope that some expert with openwrt packages and programming will reply someday.

smile

@pier4r,
on your suggestion of add more "languages", feel free to compile it and post it. We're all volunteers. We all use these tools in our daily work. If you want something, there is a good chance someone else does. Otherwise, the cows don't come home for milking, unless to drive them home. ;-)

Jesse

Hm, i didn't mean to be critic or not constructive.

I will try to explain my question a bit better: i know that the openwrt distro has billions of packages, and i don't know how many of them are usable for programming. Sometimes i like, for curiosity purposes (curiosity ftw), to try to code something in a new language for:
- checking the limits of the language itself, if the language is not so expressive.
- for learning it, if the language is new for me.
- to test the platform where it runs (in case of small routers).

For example i try to code the solution of google code jam, facebook hackercup, project euler and similar stuff. For more "practical work" of course i won't choose something that is halfway unknown or not so mentioned (just because i will find less help on google xD).

So my question was just "what can i use for programming, given the list above".

And i would like to contribute with packages, but the best that i can do until now is contributing on the wiki about basic practices with openwrt (and i like it because documentation is an important part in general), better than nothing smile .

So, thanks for all the answers smile .

The discussion might have continued from here.