Difference between revisions of "Busybox replacement"

From eLinux.org
Jump to: navigation, search
(Busybox commands: add list of default-used busybox commands by Sony)
(Update list of commands toybox is implementing.)
Line 13: Line 13:
 
The triaged toybox is currently implementing usable versions of:
 
The triaged toybox is currently implementing usable versions of:
  
   bzcat cat catv chroot chvt cksum count cp df dmesg echo false help
+
   bzcat cal cat catv chroot chvt cksum count cp df dirname dmesg
  mdev mkswap nc netcat nice oneit patch pwd rmdir seq setsid sh
+
  echo false help link mkswap nc netcat nice nohup oneit patch pwd
  sha1sum sleep sort sync tee toysh true uname which yes
+
  rmdir seq setsid sha1sum sleep sort sync tee true truncate tty
 +
  uname unlink unshare wc which yes
  
See http://landley.net/code/toybox/todo.txt
+
And minimal versions of:
 +
  mdev sh
 +
 
 +
See [http://landley.net/code/toybox/todo.txt the Toybox todo list] for the most up to date status.
  
 
== Toolbox commands ==
 
== Toolbox commands ==
Line 30: Line 34:
  
 
The following are unique to Android:
 
The following are unique to Android:
* schedtop
+
  alarm schedtop newfs_msdos getprop log setprop watchprops notify wipe
* newfs_msdos
+
  iftop getevent sendevent nandread stop smd setconsole
* getprop
 
* log
 
* setprop
 
* watchprops
 
* notify
 
* wipe
 
* iftop
 
* getevent
 
* sendevent
 
* nandread
 
* stop
 
* smd
 
* setconsole
 
  
Ones I;m not sure about:
+
Ones I'm not sure about:
 
* r?
 
* r?
 
* ioctl?
 
* ioctl?

Revision as of 19:02, 17 January 2012

This page has information about the commands and features desired for a busybox replacement program.

See Busybox replacement project for the project proposal for this work.

Command List

[Rob - can you massage this list?]

The first release of a busybox replacement should include the following commands: [insert candidate list here]

Toybox currently implements

The triaged toybox is currently implementing usable versions of:

 bzcat cal cat catv chroot chvt cksum count cp df dirname dmesg
 echo false help link mkswap nc netcat nice nohup oneit patch pwd
 rmdir seq setsid sha1sum sleep sort sync tee true truncate tty
 uname unlink unshare wc which yes

And minimal versions of:

 mdev sh

See the Toybox todo list for the most up to date status.

Toolbox commands

Toolbox in Android (what version?) implements the following commands:

date id uptime schedtop ifconfig start newfs_msdos
ls route netstat ioctl reboot getprop cmp insmod chmod
r cat lsmod chown log df top printenv ionice setprop rmmod setconsole
sleep watchprops notify wipe smd iftop rmdir dd vmstat hd rm mount
ln lsof getevent ps dmesg renice kill mkdir sendevent nandread mv
sync stop umount

The following are unique to Android:

 alarm schedtop newfs_msdos getprop log setprop watchprops notify wipe
 iftop getevent sendevent nandread stop smd setconsole

Ones I'm not sure about:

  • r?
  • ioctl?

Busybox commands

default 1.10 build

A default build of Busybox 1.10 has the following commands:

	[, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash,
	awk, basename, bunzip2, bzcat, bzip2, cal, cat, catv,
	chattr, chgrp, chmod, chown, chpasswd, chpst, chroot,
	chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond,
	crontab, cryptpw, cut, date, dc, dd, deallocvt, delgroup,
	deluser, df, dhcprelay, diff, dirname, dmesg, dos2unix,
	du, dumpkmap, dumpleases, echo, ed, egrep, eject, env,
	envdir, envuidgid, expand, expr, false, fbset, fdflush,
	fdformat, fdisk, fgrep, find, fold, free, freeramdisk,
	fsck, fsck.minix, fuser, getopt, getty, grep, gunzip,
	gzip, halt, hdparm, head, hexdump, hostid, hostname, hwclock,
	id, ifconfig, ifdown, ifup, inetd, init, insmod, install,
	ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule,
	iptunnel, kbd_mode, kill, killall, killall5, klogd, last,
	length, less, linux32, linux64, linuxrc, ln, loadfont,
	loadkmap, logger, login, logname, logread, losetup, lpd,
	lpq, lpr, ls, lsattr, lsmod, lzmacat, makedevs, md5sum,
	mdev, mesg, microcom, mkdir, mkfifo, mkfs.minix, mknod,
	mkswap, mktemp, modprobe, more, mount, mountpoint, mt,
	mv, nameif, netstat, nice, nmeter, nohup, nslookup, od,
	openvt, passwd, patch, pgrep, pidof, ping, pipe_progress,
	pivot_root, pkill, poweroff, printenv, printf, ps, pscan,
	pwd, raidautorun, rdate, readlink, readprofile, realpath,
	reboot, renice, reset, resize, rm, rmdir, rmmod, route,
	rpm, rpm2cpio, run-parts, runlevel, runsv, runsvdir, rx,
	script, sed, sendmail, seq, setarch, setconsole, setkeycodes,
	setlogcons, setsid, setuidgid, sh, sha1sum, sleep, softlimit,
	sort, split, start-stop-daemon, stat, strings, stty, su,
	sulogin, sum, sv, svlogd, swapoff, swapon, switch_root,
	sync, sysctl, syslogd, tac, tail, tar, taskset, tee, telnetd,
	test, time, top, touch, tr, true, tty, ttysize, udhcpc,
	udhcpd, umount, uname, uncompress, unexpand, uniq, unix2dos,
	unlzma, unzip, uptime, usleep, uudecode, uuencode, vi,
	vlock, watch, watchdog, wc, wget, which, who, whoami,
	xargs, yes, zcat

Sony CE Linux (internal distribution) 1.13.4 build

This is from a version of busybox used in lots of Sony products: Currently defined functions:

        [, [[, ash, basename, bunzip2, bzcat, cat, chgrp, chmod, chown,
        chroot, cmp, cp, cpio, cut, date, dd, dirname, dmesg, echo, egrep,
        env, expr, false, fgrep, freeramdisk, ftpget, ftpput, getty, grep,
        gunzip, gzip, halt, ifconfig, insmod, kill, killall, klogd, ln,
        logger, login, ls, lsmod, md5sum, mkdir, mkfifo, mknod, mktemp,
        modprobe, mount, mv, pidof, ping, ping6, pivot_root, poweroff,
        pwd, readlink, reboot, rm, rmdir, rmmod, route, sed, sfdisk, sh,
        sha1sum, sleep, sort, stty, swapoff, swapon, switch_root, sync,
        syslogd, tail, tar, taskset, telnet, telnetd, test, touch, true,
        umount, uname, uniq, usleep, vconfig, wc, xargs, zcat

Random Notes

Can implement incrementally

Rob wrote:

One nice thing about busybox/toybox/toolbox is you can install multiple implementations side by side, and have what symlinks you create (or what comes first in the $PATH) determine who is implementing what.

This allows gradual transitions. Each release, we replace a couple more commands from the old one, until the old one finally isn't being used for anything anymore and we can uninstall it...