1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
Kernel modules
--------------
Modules are installed in /usr/lib/uml/modules/<version>. The easiest way to
get to them from within UML is to use hostfs, e.g.:
mount -t hostfs -o /usr/lib/uml/modules hostfs /lib/modules
or:
echo "hostfs /lib/modules hostfs /usr/lib/uml/modules 0 0" >> /etc/fstab
or copy them into your root filesystem (rootstrap can do this automatically).
NOTE: to be able to load 2.6 kernel modules you'll need to install
module-init-tools in the guest root filesystem. You can easly do this
inside the running guest by apt-get'ing the package or when building
your rootfs with rootstrap by adding the proper option in the
configuration file (include=module-init-tools or
install=module-init-tools).
Kernel configuration notes
--------------------------
Unlike the UML binaries distributed from the official UML website,
this kernel does not support DevFS as this feature has been obsoleted in the
upstream Linux kernel and will be removed very soon.
Instead of DevFS you can run udev inside the guest or simply have static /dev
nodes (which I suggest as you'll hardly have many varying devices there).
Compiling a Custom UML package
------------------------------
You must have APT configured such that 'apt-get source' works in order
to do this the easy way. See sources.list(5).
1. $ apt-get source user-mode-linux
2. # apt-get build-dep user-mode-linux
(must be run as root)
3. $ cd user-mode-linux-UMLVERSION
4. $ debian/rules unpack
Or, unpack other kernel source and update kernel_version in
debian/rules
5. $ debian/rules patch
Or, apply a UML patch by hand and touch patch-stamp
5. $ cd kernel-source-KVERSION
6. $ make defconfig ARCH=um && make [menu,x]config ARCH=um # etc.
All makefile commands must include ARCH=um
7. $ cd ..
8. $ dpkg-buildpackage -rfakeroot -nc -uc
-- Matt Zimmerman <mdz@debian.org>, Fri Jan 2 14:29:13 2004
|