Index: 2.6-koutput-user.xml =================================================================== RCS file: /home/cvsroot/gentoo/xml/htdocs/doc/en/2.6-koutput-user.xml,v retrieving revision 1.1 diff -u -b -B -r1.1 2.6-koutput-user.xml --- 2.6-koutput-user.xml 26 Mar 2004 00:25:16 -0000 1.1 +++ 2.6-koutput-user.xml 27 Mar 2004 00:33:41 -0000 @@ -21,8 +21,8 @@ -1.0 -March 14, 2004 +1.1 +March 26, 2004 Overview @@ -86,6 +86,36 @@ +Advantages +
+ + +

+You may be asking yourself, "Why should I bother?" The problem that inspired +this functionality was in fact an issue with kernel module ebuilds like +nvidia-kernel or hostap-driver. These ebuilds need to use the kernel build +system to compile, however building them would require updating files in +/usr/src/linux, and fail because of sandbox violations. +

+ + +Gentoo's sandbox is system that prevents portage from writing to the live +filesystem until the final merge step of the package installation. + + +

+Several dependant steps can be taken to resolve this issue. In short, kernel +builds must output all of their files to a different location when they are +compiled, and later external module compiles must also do this, only they +output to some subdirectory of the temporary build location. By letting the +modules output their built files into the permitted build location, those nasty +sandbox errors are prevented. +

+ + +
+
+ Enabling koutput
@@ -117,7 +147,7 @@

-# config-kernel --output-dir=/home/joe/kernels
+# config-kernel --output-dir /home/joe/kernels
 

@@ -128,7 +158,7 @@

-# config-kernel --output-dir=default
+# config-kernel --output-dir default
 

@@ -138,13 +168,13 @@

-# config-kernel --make-koutput=/usr/src/linux-2.6.3
+# config-kernel --make-koutput /usr/src/linux-2.6.3
 

The above command converts the kernel found in /usr/src/linux-2.6.3 to outputting to a different directory. If the output directory has been set -previously with --output-dir=foo, then that prefix will be used. +previously with --output-dir /some/path, then that prefix will be used. Otherwise, the Gentoo default of /var/tmp/kernel-output/KV will be used.

@@ -182,6 +212,56 @@ +

+This change of location is important. Two processes are largely affected by this +new file location, copy a kernel config into the proper location when updating +kernel sources, and copying a newly compiled bzImage into /boot. In +particular, when copying your .config, it's important to remember that you need +to copy it from the kernel output location of the original into the kernel +output location of the new kernel. To demonstrate how a kernel upgrade would be +performed using koutput, an example upgrade from vanilla-sources-2.6.4 to +vanilla-sources-2.6.5 is depicted: +

+ + +Here, we assume the output prefix is set to /var/tmp/kernel-output +and that both kernel sources are already installed + + +
+# cp /var/tmp/kernel-output/2.6.4/.config /var/tmp/kernel-output/2.6.5/
+Copy our .config into the new output directory
+# config-kernel --set-symlink 2.6.5
+# cd /usr/src/linux
+Move into our new source tree
+# make oldconfig
+# make && make modules_install
+Compile our new kernel and modules
+# mount /boot
+# cp /var/tmp/kernel-output/2.6.5/arch/i386/boot/bzImage /boot/
+# umount /boot
+Install the new kernel image
+
+ +

+For kernel modules building against kernels using the new system, nothing more +should be required beyond emerging the desired kernel module package as usual. +At the time of this writing, there are still some kernel modules being converted +over to the new setup, or still in testing phase. If the stable version of a +kernel module fails, try installing the ~arch version first: +

+ +
+# ACCEPT_KEYWORDS='~x86' emerge foo
+The above command installs the testing version of the foo package
+
+ +

+If this still fails, please open a bug at http://bugs.gentoo.org, and the kernel +module ebuild will be updated to the new system as soon as possible. +

+