README for creating root filing system images
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mkfsimg - shell script which creates and mounts a blank filing system.

piggyback.c - source code for tacking a filing system image onto a kernel.

Makefile - compiles piggyback.c, compresses the fs, runs piggyback


Example root filing system
~~~~~~~~~~~~~~~~~~~~~~~~~~
This example uses the files from jsroot_varol.tar.gz.  You should download this file and
extract it to a temporary directory.  The scripts assume you also have the following
files:

   vmlinux_2_3_99pre3_embed.aout
   System.map_2_3_99pre3_embed.aout

1) Extract the file jsroot_varol.tar.gz.  This will create a directory structure under
   jsroot.

   Note: You will need to be root in order to preserve the file permissions.

2) Create and mount a blank filing system image using the 'mkfsimg' script.  The script
   creates a 16Mb image and mounts it as '/mnt/tmp'.  If you run 'mkfsimg' a second
   time, it will skip the creation of the image.  Remove or rename the image if you
   wish to create another.

   Note: You will need to be root in order for the mount to work.

3) If (2) was successful, you should be able to 'ls -al /mnt/tmp'.

4) Copy the files from jsroot into the new filing system using:

   cp -r /path/to/jsroot/* /mnt/tmp

   Note: You will need to be root in order to preserve the file permissions.

5) Edit the following files to suit your configuration:

   /mnt/tmp/etc/hosts
   /mnt/tmp/etc/resolv.conf
   /mnt/tmp/sbin/init

   The changes mainly involve setting IP addresses to suit your network.  You should
   also set the domain name in resolve.conf.

6) Run 'make'.  This will build 'piggyback' if necessary, compress the filing system image
   using 'gzip' and finally run 'piggyback' for you.  Because of the way piggyback modifies
   the kernel image, the Makefile first copies your raw kernel to vmlinux.aout and then
   lets piggyback modify the copy.

7) Create a link from tftpboot to your newly created 'vmlinux.aout'.  This is a kernel
   image with the embedded root filing system we just created.

If you edit the filing system, simply 'touch js_fs.img' in order to get the Makefile to
rebuild the kernel image.

Happy JavaStationing.

