Monday, January 2, 2012

Minimal Linux: BusyBox

If you did read my previous post by now you know that the way I like to do things is to start with minimalistic configuration and enable just what I need. So this is how I download, extract and run make with allnoconfig option:

wget http://busybox.net/downloads/busybox-1.19.3.tar.bz2
tar xjvf busybox-1.19.3.tar.bz2
cd busybox-1.19.3/
make allnoconfig


We need to enable one option:
Busybox Settings ---> Build Options ---> Build BusyBox as a static binary (no shared libs)

However this will not give us a very useful build. You also want to have some applications. For example I want a shell (ash), some tools (cat, cp, df, ls, mkdir, mknod, mv, rm, sleep, tail, uname, vi, grep, init, mount, ps). Of course you are free to choose whatever you want, just keep in mind that it is wise to have some core tools, like a shell and being able to start the system with init and maybe mount a filesystem with mount.

When you are done exit and make sure to save the configuration. You are ready to build:

make
make install


BusyBox is now ready to be used. In the same directory we have _install which will be used for our next step which is building a filesystem.

BusyBox 1.19.3 was used while taking notes.

0 comments:

Post a Comment