This document describes how to build the SnapGearVirtualPRO+,
a PRO+ which runs under user-mode linux (UML) as well
as the UML kernel and tools.

Author: Steve Bennett <steveb@snapgear.com>
Date: Mon Jan 13 10:20:47 EST 2003

0. Make sure you have checked out a tree with new-wave, linux-2.4.x and
   EITHER uClibc (preferred) or glibc (uC-libc will not work).
   
         $ cd <new-wave-dir>

1. Patching the linux kernel for UML

   $ cd <new-wave-dir>/linux-2.4.x
   $ patch -p1 <../uml/patches/uml-patch-2.4.19-46
     (ignore the failures with Makefile and md_compatible.h)
   $ patch -p1 <../uml/patches/uml-2.4.20-unofficial.patch
   $ patch -p1 <../uml/patches-local/uml-cow-bitmap.patch
   $ patch -p1 <../uml/patches-local/uml-glibc-compile.patch
      
2. Building the UML kernel and a root filesystem

   Build as you would for a PRO+, but select the VirtualPRO+ instead.
   - cd <new-wave-dir>
   - make xconfig
   - select SnapGear/SnapGearVirtualPRO+ (english)
   - select either uClibc or Glibc
   - save and exit

   $ make dep
   $ make

   (If you selected glibc, be prepared to wait a LONG time)

   This will create the UML executable, 'linux-2.4.x/linux' as well as the
   root filesystem image in images/romfs.img

3. Building and installing the uml tools

   The easiest way is to get one of the packages from
   doughboy:/home/public/linux/uml/ 

   To install a RedHat package, use: uml_utilities-20021103-1.i386.rpm.
   For Debian, grab uml-utilities_20021103-2_i386.deb and "dpkg -i" it.
   If you want to compile from source, use: uml_utilities_20021205.tar.bz2

   Note that both of these packages are identical and contain a necessary
   patch to uml_switch.

4. See new-wave/uml/README for instructions on how to run your new UML
   devices.
