Skip to content

busybox: configure full version

sethismyfriend edited this page Sep 25, 2014 · 1 revision

I wanted to include dnsd on the iotdevkit build provided by Intel for the Galileo but the version of busybox currently included, although recent did not include dnsd or many of the other utilities I needed - it looks like the folks who installed it did a generic install - or selected only the applets they thought people would need.

There is a great article that explains how to build busybox here, which I followed down a few paths, but I'll just outline the one that ended up working:

Make sure your galileo is on a wifi network using the connmanctl utility. Join the same network with your PC and SSH into your board. I recommend using SSH vs. using the serial cable because some of the text formatting in the menuconfiguration utility provided by busybox is not compatible with the serial protocol.

cd ~
git clone git://git.busybox.net/busybox
cd busybox
make menuconfig

this will bring up a utility that allows you to create your own configuration file. I had trouble using the "allyesconfig" and "allbareconfig" options because one of the more recent features requires selinux. This is related to some NSA security features - so in the menu I went in and disabled the option (NEW) NSA Security.

For the rest of the configuration I used the defaults, making sure that 'dnsd' was included in the network utilities section. Save this configuration and exit menuconfig. Continue by typing:

make
make install

This will issue a lot of warnings but will create an _install directory in the "busybox" folder. This contains four folders with all the files you will need, but does not migrate the files or the symlinks to your system. However, busybox is a single binary file with a series of symlinks. The symlinks in the _install directory are relative, but the filesystem is the same, so you just need to move all the simlinks using the -P option to ensure the the symlinks are copied - not the files they refer to:

cd ~/busybox/_install/usr/sbin
cp -P * /usr/sbin
cd ~/busybox/_install/usr/bin
cp -P * /usr/bin
cd ~/busybox/_install/bin
cp -P * /bin
cd ~/busybox/_install/sbin
cp -P * /sbin

Now if you type busybox on the console, you should see:

root@quark0171ae:/bin# busybox
BusyBox v1.23.0.git (2014-09-03 13:28:58 UTC) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   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, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, awk, base64, basename,
	beep, blkid, blockdev, bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr,
	chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, conspy, cp,
	cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser,
	depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du,
	dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, expand,
	expr, fakeidentd, false, fatattr, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep,
	find, findfs, flock, fold, free, freeramdisk, fsck, fsck.minix, fstrim, fsync, ftpd, ftpget,
	ftpput, fuser, getopt, getty, grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump,
	hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup, inetd,
	init, insmod, install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute,
	iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last, less, linux32, linux64,
	linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq, lpr, ls,
	lsattr, lsmod, lsof, lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man,
	md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix,
	mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint,
	mpstat, mt, mv, nameif, nanddump, nandwrite, nbd-client, nc, netstat, nice, nmeter, nohup,
	nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress,
	pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pstree,
	pwd, pwdx, raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath, reboot,
	reformime, remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio,
	rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script, scriptreplay, sed, sendmail, seq,
	setarch, setconsole, setfont, setkeycodes, setlogcons, setserial, setsid, setuidgid, sh,
	sha1sum, sha256sum, sha3sum, sha512sum, showkey, shuf, slattach, sleep, smemcap, softlimit,
	sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff,
	swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd,
	test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true, tty, ttysize,
	tunctl, ubiattach, ubidetach, ubimkvol, ubirmvol, ubirsvol, ubiupdatevol, udhcpc, udhcpd,
	udpsvd, umount, uname, unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unxz, unzip, uptime,
	users, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc,
	wget, which, who, whoami, whois, xargs, xz, xzcat, yes, zcat, zcip