Gentoo Archives: gentoo-dev

From: Peter Johanson <latexer@g.o>
To: gentoo-dev@l.g.o
Cc: brix@××××.org, x86-kernel@g.o
Subject: [gentoo-dev] [LAST CHANCE]: kernel + kernel module ebuild changes
Date: Tue, 16 Mar 2004 15:01:35
Message-Id: 20040316150045.GA23580@gonzo.wireless.peterjohanson.com
1 hey everyone,
2
3 SUMMARY:
4
5 This is a follow up to the email i sent out about a month ago concerning
6 kernel and kernel module ebuilds. As many people have probably noticed,
7 kernel module ebuilds against 2.6 kernels generally fall victim to the
8 "need to write to /usr/src/linux" problem. I'm in the finishing touches
9 phase of a new system which will resolve this. For the full nasty
10 details, see bug #32737 on bugs.gentoo.org (beware, it's a long one).
11 Docs aimed at both users and developers can be found at:
12 http://dev.gentoo.org/~latexer/2.6-koutput-user.html
13 http://dev.gentoo.org/~latexer/2.6-koutput.html
14
15 PROBLEM/SOLUTION:
16
17 1) Kernel modules which build against a 2.6 tree keep trying to open
18 things for writing, the solution is to have them output to a different
19 spot for all of their generated files using the O= variable.
20
21 2) The above requires that the kernel source tree not be dirty, so we
22 must have the *kernel* outputting to a separate directory *also*, using
23 the KBUILD_OUTPUT directory. Having a clean source tree has many
24 benefits beyond kernel module building.
25
26 3) We need an easy way to transition. This can be accomplished by a
27 *standardized* way of making /usr/src/linux writable, while keeping the
28 user AWARE of what is going on (this is a mild security hazard, and just
29 not a good idea, thus the more complicated/elegant solution). This will
30 allow people to slowly migrate to using the new "koutput" method without
31 just breaking the module ebuilds for them.
32
33 IMPLEMENTATION:
34
35 1) Kernel modules can use the new kmod.eclass (completely unrelated to
36 the *old* kmod.eclass, i need a good easy name) to handle determining
37 which kernel situation they are in. Will handle patching as needed,
38 determining kernel version, etc. Full details are in the eclass and
39 developer doc linked above.
40
41 2) Additions will be made to johnm's great kernel-2.eclass to handle
42 enabling a seperate kernel output for kernel as they are installed,
43 among a few other features planned with the advent of:
44
45 3) config-kernel - A new tool for manipulating a few things relating to
46 your kernel environment. It is purely meant to affect the way your
47 kernels live on your system, and NOT for generating kernels, etc.
48 Features include:
49 - setting a prefix for kernel output (e.g. a new kernel
50 2.6.4-mm1 will have it's output set to
51 /var/tmp/kernel-output/2.6.4-mm1). Users can choose a new prefix, or
52 disable using koutput using config-kernel.
53 - Auto config/symlink - Enable or disable having the kernel-2.eclass
54 updating the /usr/src/linux symlink, and copying your .config from
55 your previous kernel into the new tree you emerge.
56 - Writing to /usr/src/linux - Enable/Disable having the kmod.eclass
57 handle making /usr/src/linux writable if using the "normal method"
58
59 CONCLUSSION:
60
61 So, all above is finally done, excepting a little of the code in
62 kernel-2.eclass for the auto symlink/config abilities! Besides needing
63 to flesh out the user doc a bit, I want to get this stuff done! it's
64 been too long on the making, and we need to really get the 2.6 module
65 issue dealt with. SPEAK NOW, or forever hold your peace, because I'm
66 ready to roll with this along with the help of a few of the kernel
67 people.
68
69 Thanks for your time. (if you made it to reading this far)
70
71 -pete
72
73
74 --
75 Peter Johanson
76 <latexer@g.o>
77
78 Key ID = 0x6EFA3917
79 Key fingerprint = A90A 2518 57B1 9D20 9B71 A2FF 8649 439B 6EFA 3917

Replies