Difference between revisions of "Vnx-rootfs-uml-kernel"
Line 1: | Line 1: | ||
{{Title|How to create a User-Mode-Linux Kernel for VNX}} | {{Title|How to create a User-Mode-Linux Kernel for VNX}} | ||
− | This document describes how to create a UML kernel to be used with VNX. The procedure has been mainly tested for version 3.3.8, although it should work sith minor changes with previous 3.X versions (it does not with 3.4 version). | + | This document describes how to create a 32 bits UML kernel to be used with VNX. The procedure has been mainly tested for version 3.3.8, although it should work sith minor changes with previous 3.X versions (it does not with 3.4 version). |
+ | |||
+ | This procedure has been tested over a system with Ubuntu 10.04.4 32 bits. Although the procedure should work over a 64 bits system (installing gcc-multilib and using the SUBARCH variable should do the work), we had some problems trying to compile the 32 bits kernel over a 64 bits system (mainly when linking some libraries, for example, VDE ones). | ||
<ul> | <ul> |
Revision as of 01:01, 11 June 2012
How to create a User-Mode-Linux Kernel for VNX
This document describes how to create a 32 bits UML kernel to be used with VNX. The procedure has been mainly tested for version 3.3.8, although it should work sith minor changes with previous 3.X versions (it does not with 3.4 version).
This procedure has been tested over a system with Ubuntu 10.04.4 32 bits. Although the procedure should work over a 64 bits system (installing gcc-multilib and using the SUBARCH variable should do the work), we had some problems trying to compile the 32 bits kernel over a 64 bits system (mainly when linking some libraries, for example, VDE ones).
- Download and uncompress kernel sources:
wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.3.8.tar.gz tar xfvz linux-3.3.8.tar.gz cd linux-3.3.8
wget vnx.dit.upm.es/vnx/kernels/mconsole-exec-3.3.8.patch
patch -p1 < mconsole-exec-3.3.8.patch
make defconfig ARCH=um SUBARCH=i386 make menuconfig ARCH=um SUBARCH=i386
make ARCH=um SUBARCH=i386 strip linux
./linux --version ./linux --showconfig
./linux ubda=rootfs mem=128M
Note: change 'rootfs' by the root filesystem filename you will use to test the kernel.
mkdir linux-um-3.3.8-src cp linux linux-um-3.3.8-src/linux-um-3.3.8 mkdir linux-um-3.3.8-src/modules make modules_install INSTALL_MOD_PATH=linux-um-3.3.8-src/modules/ ARCH=um SUBARCH=i386 cd linux-um-3.3.8-src/modules/lib/modules/ tar cfv modules-3.3.8.tar 3.3.8 mv modules-3.3.8.tar ../../../ cd ../../../ rm -rf modules vi README-linux-um-3.3.8 cp ../.config config-linux-um-3.3.8 cd .. tar cfvz linux-um-3.3.8.tgz linux-um-3.3.8-src