[Tux3] Developing Tux3 with UML

Daniel Phillips phillips at phunq.net
Sat Nov 29 20:48:32 PST 2008


Hi,

Running the Tux3 kernel code under UML is easy, fast and safe.  Here is
a recipe where you can be up and running in about ten minutes from a
standing start:

   # get a kernel tree
   wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.5.tar.bz2
   tar -xjf linux-2.6.26.5.tar.bz2
   cd linux-2.6.26.5

   # get the latest tux3 patch and patch the kernel
   wget http://tux3.org/patches/tux3-2.6.26.5
   patch <tux3-2.6.26.5 -p1

   # build uml linux with tux3
   make defconfig ARCH=um
   make linux ARCH=um CONFIG_TUX3=y

   # get a root filesystem
   wget http://tux3.org/downloads/tuxroot.tar.bz2

   # make a tux3 filesystem in a file
   dd if=/dev/zero of=testdev bs=1M count=1
   tux3 mkfs testdev

   # boot uml using loop back on the root fs and tux3 test fs
   tar -xjf tuxroot.tar.bz2
   ./linux ubda=tuxroot ubdb=testdev

Log in to uml as root and:

   mount /dev/ubdb /mnt
   ls -l /mnt

To debug tux3/uml under gdb:
   gdb -args ./linux ubda=tuxroot ubdb=testdev
   run
   cont <a bunch of times, don't ask>
   <log in>

You can also run uml using real partitions for root and test:

   ./linux ubda=/dev/sdaX ubdb=/dev/sdaX

The only thing that needs to be special about the root filesystem is,
/etc/inittab has to refer to the uml ttys.  See umlroot/etc/inittab.

Regards,

Daniel

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list