编译了BusyBox

BusyBox是一个程序,把很多命令行工具打包到一个文件里,可以节约很大空间。使用方法就不介绍了。

编译过程

下载

在其官方网站上可以下载。

解压

tar -xjvf busybox-xx.tar.bz2

配置

  • make menuconfig

    首先,lxdialog被编译,作用是提供对话框。

    然后,选择合式的配置,具体细节也不说了,主要是选择静态编译和不用/usr。

    由于我只是想玩一下,选上了全部组件。:)

  • make

  • make install

    安装好的文件在_install目录里,可以chroot到这里试一下。

成果

大小

-rwxr-xr-x 1 roy users 1644696 2010-05-02 13:56 busybox

有点大。

Screenshot

$ ./busybox --help
BusyBox v1.16.1 (2010-05-02 12:08:02 CST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

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:
        [, [[, acpid, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk,
        basename, bbconfig, beep, blkid, brctl, bunzip2, bzcat, bzip2, cal,
        cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot,
        chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw,
        cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod,
        devfsd, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd,
        dnsdomainname, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases,
        echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, expand,
        expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk,
        fgrep, find, findfs, flash_eraseall, flash_lock, flash_unlock, flashcp,
        fold, free, freeramdisk, fsck, fsck.minix, fsync, ftpd, ftpget, ftpput,
        fuser, getopt, getty, grep, gunzip, gzip, halt, hd, hdparm, head,
        hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown,
        ifenslave, ifplugd, ifup, inetd, init, inotifyd, insmod, install,
        ionice, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule,
        iptunnel, kbd_mode, kill, killall, killall5, klogd, lash, last, length,
        less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login,
        logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lspci,
        lsusb, lzmacat, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev,
        mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix,
        mkfs.reiser, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modprobe,
        more, mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice,
        nmeter, nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof,
        ping, ping6, pipe_progress, pivot_root, pkill, popmaildir, poweroff,
        printenv, printf, ps, pscan, pwd, raidautorun, rdate, rdev, readahead,
        readlink, readprofile, realpath, reboot, reformime, renice, reset,
        resize, rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts,
        runlevel, runsv, runsvdir, rx, script, scriptreplay, sed, sendmail,
        seq, setarch, setconsole, setfont, setkeycodes, setlogcons, setsid,
        setuidgid, sh, sha1sum, sha256sum, sha512sum, showkey, slattach, 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, tcpsvd, tee, telnet, telnetd, test,
        tftp, tftpd, time, timeout, top, touch, tr, traceroute, traceroute6,
        true, tty, ttysize, tunctl, tune2fs, udhcpc, udhcpd, udpsvd, umount,
        uname, uncompress, unexpand, uniq, unix2dos, unlzma, unlzop, unzip,
        uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall,
        watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, zcip