User manual
Linux Guide taskit GmbH
7. Creating a new root filesystem
7.1. Overview
The root filesystem is the place where system applications and libraries are stored. It is
loaded from the flash disk and decompressed to an ram disk during the boot process.
Thus all changes in the root filesystem will be lost after the next reboot. In case there is the
need to save files to flash memory (i.e.: log files) you will have to create and modify them
on the root filesystem and copy them to the config partition at the end. This approach is
dispositional because the ramdisk it is very fast and flash write cycles are limited.
When creating a new root filesystem image you have to keep in mind that it can not be
bigger than the flash disk partition used for the root filesystem (the default size can be
taken from the appendix). If it is bigger than the corresponding flash disk partition you will
overwrite other partitions during the copy process.
The first steps when creating your own root file system are: creating a directory tree
according to the File Hierarchy Standard (FHS), copying the cross-compiled C system
libraries glibc or uclibc to the new file system, copying the kernel modules and creating
device files (a.k.a. device nodes) under /dev. These steps are not covered here.
The root file system installed on the flash and found on the starterkit CD as tarred archive
can serve as a starting point for your own customized root file system.
Busybox and the MTD utilities are already integrated in these root file systems; re-
compiling and re-installing is only necessary if the configuration needs to be changed.
In the end, we will describe creating an image of the changed root file system, booting it
and copying it to flash memory.
7.2. Installing the busybox
The busybox contains the most important standard Linux commands in one binary, so that
they do not need to be compiled individually for the target system.
You can download the newest version of the Busybox packages from the project website
(www.BusyBox.net) and unpack it to the /develop/sysapps/ directory or use version from
the starter-kit CD.
To unpack it from the starterkit-CD enter the following lines into the terminal:
cd /tmp
cp /dev/cdrom/sysapps.tgz /tmp (where /dev/cdrom is the starterkit-CD)
tar -xzvf sysapps.tar
mv sysapps/ /develop
It is also necessary to extract the rootfs.tgz(root file system) from the starterkit-CD:
cp /dev/cdrom/rootfs.tgz /tmp
tar -xzvf rootfs.tgz
mv rootfs/ /develop
Page 22 of 65 Version 1.26 (2008-04-30)