This post has already been read 7932 times!
Busybox is your gateway to exploring the 770. It’s called “The Swiss Army Knife of Embedded Linux” for good reason. When you login to the 770 and use the CLI (or shell) what you are using is Busybox. Traditional Unix machines uses many small programs (most often the GNU toolset) for most common tasks. Almost all small handheld devices with limited resources (RAM) use this one application which emulates all those small programs. Using Busybox is much smaller in terms of a memory footprint that all those other apps. Busybox on the 770 is only 272k.
To learn more about Busybox, visit its home page. They have a wonderful page with every command that is possible with a full build of Busybox. The Busybox in the 770 doesn’t implement all of these commands however. The full list of what you have available to you on the 770 is available by executing Busybox by itself:
Nokia770-51:~# busybox BusyBox v1.00 (Debian 2:20041102-11) multi-call binary Usage: busybox [function] [arguments]... or: [function] [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use, and BusyBox will act like whatever it was invoked as. Currently defined functions: [, ash, basename, busybox, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp, cut, date, dd, df, dirname, dmesg, du, echo, egrep, env, expr, false, fgrep, find, free, getty, grep, gunzip, gzip, head, hostname, id, ifconfig, ifdown, ifup, insmod, kill, killall, ln, logger, login, ls, lsmod, mkdir, mkfifo, mknod, mkswap, mktemp, modprobe, more, mount, mv, netstat, nslookup, pivot_root, printf, ps, pwd, realpath, renice, reset, rm, rmdir, rmmod, route, run-parts, sed, seq, sh, sleep, sort, stty, su, swapoff, swapon, sync, tail, tar, tee, test, time, top, touch, tr, true, tty, umount, uname, uniq, uptime, wc, which, who, whoami, xargs, yes, zcat
To see how much Busybox does take a look at /bin and /usr/bin. Almost all the programs in /bin are just links to the Busybox binary.
One thing I’m doing is investigating using swap with the .51 firmware. I still get out of memory errors when I swapon my little 32M swap partition on the MMC card. Once I’ve activated swap I can’t load any applications– and if I have something running (say the browser) the device will reboot.
I’m tracking what is happening by running this small script:
# while true; do > cat /proc/meminfo > echo '----------------' > sleep 2 > done
Which spits out stats similar to these:
MemTotal: 61828 kB MemFree: 5916 kB Buffers: 112 kB Cached: 27556 kB SwapCached: 0 kB Active: 24296 kB Inactive: 16624 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 61828 kB LowFree: 5916 kB SwapTotal: 32728 kB SwapFree: 32728 kB Dirty: 0 kB Writeback: 0 kB Mapped: 25936 kB Slab: 6692 kB CommitLimit: 63640 kB Committed_AS: 36728 kB PageTables: 1140 kB VmallocTotal: 188416 kB VmallocUsed: 640 kB VmallocChunk: 187776 kB
And by watching the output I see that my swap is never used by the 770! So while I’m not sure what is going on with this, I’m continuing to poke around the 770.