Bering
Home
About
Developing
   Section 1
   Section 2
   Section 3
   Section 4
   Section 5
   Section 6
   Section 7

Search Web Pages




6. How-to build an UML kernel for LEAF

Login as root on your favorite Linux box.

Download in the /usr/src directory:

Issue the following commands:

tar xzvf freeswan-X.XX.tar.gz
tar xIvf linux-2.4.XX.tar.bz2
cd linux
bunzip2  ../uml-patch-2.4.XX.YY.bz2 -c | patch -p1

Apply the Bering kernel patches as explained in the README.txt file of the Bering kernel patches directory.

Warning

Do not apply the grsecurity patch

You should now have a fresh uml source code with all the Bering patches applied. If you run your session in a console mode issue:

cd /usr/src/linux
make menuconfig ARCH=um

or, if you work within an xterm:

cd /usr/src/linux
make xconfig ARCH=um

You will see a configuration menu which is much shorter than the one you are seeing when compiling a normal kernel. A lot of options being irrelevant in the virtual environment are just skipped by the configuration program. Configure the UML kernel to fit your needs, save and quit.

Tip

To create an appropriate config file for your UML kernel, you can start from the config files available in the Leaf_UML section of the LEAF download area.

Compile one your regular kernel from the freeswan directory:

cd /usr/src/freeswan-X.XX
make xgo

Once you know you can compile your kernel, go for the UML version.

cd /usr/src/linux
make linux ARCH=um

Go for coffee. At the end of the compilation you will end up in your linux directory with a linux file and a vmlinux.o file.

Compile the modules and install them in the current directory:

make modules ARCH=um
make modules_install ARCH=um INSTALL_MOD_PATH=`pwd`/linux

If you want to spare some disk space, do:

strip linux

OK. Your linux UML kernel is ready to be executed. But before being able to use it you need a filesystem. It's default name is root_fs and it must reside in the same directory as your linux UML kernel. The next section describes how to build it.


  • Created on 2004-03-26 12:55:35 by mhnoyes
  • Updated on 2004-05-02 12:18:14 by mhnoyes

 Printable Version


Hosted on Get LEAF Linux Embedded Appliance Framework at SourceForge.net. Fast, secure and Free Open Source software downloads, and powered by phpWebSite.