Mirror of git://git.busybox.net/busybox with our patches on top
Source
Building a Busybox Boot Floppy
==============================
This document describes how to buid a boot floppy using the following
components:
- Linux Kernel (http://www.kernel.org)
- uClibc: C library (http://cvs.uclinux.org/uClibc.html)
- Busybox: Unix utilities (http://busybox.lineo.com)
- Syslinux: bootloader (http://syslinux.zytor.com)
It is based heavily on a paper presented by Erik Andersen at the 2001 Embedded
Systems Conference.
Building The Software Components
--------------------------------
Detailed instructions on how to build Busybox, uClibc, or a working Linux
kernel are beyond the scope of this document. The following guidelines will
help though:
- Stock Busybox from CVS or a tarball will work with no modifications to
any files. Just extract and go.
- Ditto uClibc.
- Your Linux kernel must include support for initrd or else the floppy
won't be able to mount it's root file system.
If you require further information on building Busybox uClibc or Linux, please
refer to the web pages and documentation for those individual programs.
Making a Root File System
-------------------------
The following steps will create a root file system.
- Create an empty file that you can format as a filesystem:
dd if=/dev/zero of=rootfs bs=1k count=4000
- Set up the rootfs file we just created to be used as a loop device (may not
be necessary)
losetup /dev/loop0 rootfs
- Format the rootfs file with a filesystem:
mkfs.ext2 -F -i 2000 rootfs
- Mount the file on a mountpoint so we can place files in it:
mkdir loop
mount -o loop rootfs loop/
(you will probably need to be root to do this)
- Copy on the C library, the dynamic linking library, and other necessary
libraries. For this example, we copy the following files from the uClibc
tree: