The making off of VNUML kernel linux-2.6.18.1-bb2-xt-4m (23/12/2007)
-------------------------------------------------------------------
Fermn Galn Mrquez (galan@dit.upm.es) (based on previous howto by David Fernndez)
Updated to 4m by David Fernandez (david@dit.upm.es) to include Jeff Dike patch to solve the pts problem.
Recipe:
Download an untar vanilla kernel:
# cd /usr/local/src
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.1.tar.bz2
# tar xfj linux-2.6.18.1.tar.bz2
# cd linux-2.6.18.1
Apply Jeff Dike patch to solve pts problem described in
http://www.mail-archive.com/user-mode-linux-user@lists.sourceforge.net/msg05559.html:
# patch -p1 < ../linux-2.6.18.1-jdike-pts.patch
Apply BlaisorBlade patch:
# wget http://www.user-mode-linux.org/~blaisorblade/patches/guest/uml-2.6.18.1-bb2/uml-2.6.18.1-bb2.patch.bz2
# bzcat uml-2.6.18.1-bb2.patch.bz2 | patch -p1
Apply xterm patch:
# patch -p1 < ../linux-2.6.18.1-xterm.patch
Configure (based on the previous UML kernel):
# /usr/share/vnuml/kernels/linux-2.6.18.1-bb2-xt-2m --showconfig > .config
# make oldconfig ARCH=um (answering all with the default option)
# vi .config (and set CONFIG_LOCALVERSION="-xt-4m")
#####above part i am not sure about either i cant find the file. and i dont\ #have a previous install of uml
Configure kernel options:
# make menuconfig ARCH=um
go to "Networking-->Networking options-->Network Packet filtering" and enable
all options under "IP: Netfilter Configuration" and "Core Netfilter Configuration".
Apply the patch at http://readlist.com/lists/vger.kernel.org/linux-kernel/55/278741.html i
(otherwise you probably get errors when compiling)
Also compiling over OpenSuse 10.2, you could get an error related with function
offsetof. To solve it, just edit arch/um/sys-i386/user-offsets.c and
arch/um/sys-i386/ptrace_user.c and change:
#include <linux/stddef.h>
by:
#include <stddef.h>
More info in: http://www.webservertalk.com/message1709776.html
Make the kernel:
# make ARCH=um
# strip linux
######################### when i try make ARCH=um that is when i get the #########################errors in the other post
Make the modules tar:
# make modules_install ARCH=um
# cd /lib/modules/
# tar cfv modules-2.6.18.1-bb2-xt-4m.tar 2.6.18.1-bb2-xt-4m/
# rm -rf /lib/modules/2.6.18.1-bb2-xt-4m (you don't need the modules in the host)
Put the modules and the kernel where you want (for example, /usr/share/vnuml/kernels)
# mv /lib/modules/modules-2.6.18.1-bb2-xt-4m.tar /usr/share/vnuml/kernels
# cp /usr/local/src/linux-2.6.18.1/linux /usr/share/vnuml/kernels/linux-2.6.18.1-bb2-xt-4m
# cp /usr/local/src/linux-2.6.18.1/.config /usr/share/vnuml/kernels/config-2.6.18.1-xt-4m