Gentoo Archives: gentoo-dev

From: Greg KH <gregkh@g.o>
To: Nathaniel McCallum <npmccallum@g.o>
Cc: gentoo-dev@l.g.o, gentoo-core@l.g.o, releng@l.g.o
Subject: Re: [gentoo-dev] GLEP 26 -- Handling kernels with portage
Date: Mon, 03 May 2004 03:57:18
Message-Id: 20040503035647.GB27697@kroah.com
In Reply to: [gentoo-dev] GLEP 26 -- Handling kernels with portage by Nathaniel McCallum
1 On Sun, May 02, 2004 at 10:04:35PM -0400, Nathaniel McCallum wrote:
2 > The new glep is here: http://www.gentoo.org/proj/en/glep/glep-0026.html
3
4 My formal objections:
5
6 Basically the idea is nice, but I think the proposed solution is not
7 correct. Here is why I feel this way:
8
9 > Stage 1 would be achieved through a seperate utility (perhaps like the
10 > current genkernel). This utility would help the user configure the
11 > kernel and any kernel/build related settings. This stage is optional
12 > and would only be used if a person wanted a customized kernel
13 > settings. One optional thought is to have this utility a part of the
14 > base Gentoo system. That way there are less steps to make a custom
15 > kernel.
16
17 Why reinvent the wheel here? The kernel has a _wonderful_ configuration
18 system already. It's provided in about 4 different interfaces at least
19 (command line, ncurses, gtk, qt), and in library form. Are you
20 proposing hooking into that library to do the configuration? If so,
21 what is lacking in the current implementation that is needing another
22 tool?
23
24 > Stage 2 would be implimented through an eclass. This stage is not
25 > optional. One would perform this step by typing "emerge kernel-name",
26 > where "kernel-name" is the name of the kernel package you want to use
27 > (ie. "gentoo-dev"). This package would have a "buildkernel" USE flag.
28 > If the flag was not set, it would simply download and install sources
29 > like we do currently. However, if the "buildkernel" flag is set,
30 > portage will perform the following steps:
31 >
32 > 1. (as a dependency) download and install a tarball of "generic"
33 > kernel config files.
34
35 Is this really needed? Don't we already do this today?
36
37 > 2. Check to see if customized kernel config/settings have been
38 > set via Stage 1.
39 > 3. Portage will use a custom config, if available. Otherwise, a
40 > "generic" config.
41 > 4. If neither a custom config or a "generic" config is
42 > available, die (with message). This is needed as some arches
43 > don't/can't have "generic" configs, so they will simply be
44 > presented a message telling them to run the utility from
45 > Stage 1 (which they obviously skipped).
46 > 5. Build the kernel and modules and install them
47 > 6. Remove unnecessary files from the sources and tarball it as
48 > "kernel-headers". This tarball provides the appropriate files
49 > to build external modules against, like nvidia-kernel, etc...
50 > The external modules (when built) will determine the running
51 > kernel and unpack the appropriate tarball, to build against,
52 > then remove the files.
53
54 Does this work? As specified before, I really think you need the whole
55 tree around in order to build external modules. Now with 2.6, building
56 those modules is a world easier (1 line makefile), and it works if you
57 are not root (no write access necessary). But again, all of this is
58 already being addressed in the genkernel rewrite that is happening (and
59 you can see it already in cvs.)
60
61 > Stage 3 would merely be an ebuild that constructs an initrd image for
62 > either the running kernel or, lacking a running kernel, the newest
63 > kernel installed (by version/date installed?). Initrd's can't be used
64 > on all arches, so this ebuild can be keyword masked as appropriate.
65 > The initrd package would also have a "bootsplash" USE flag (on x86,
66 > maybe others) that would build in bootsplash support. Any non-default
67 > actions desired by the user can be handled with the utility from Stage
68 > 1.
69
70 So "bootsplash" will be the only USE flag? Why stop there?
71
72 Oh, and initrd images are dead. I predict that by the end of this year
73 we will not be using them at all, as there is no need to (other distros
74 are already proving this is possible.) We also get a much more
75 flexible, portable (works on all platforms) and cleaner implementation
76 with initramfs, so that is what we will be moving to soon. So your
77 "initrd" options are pretty moot.
78
79 > There are many advantages gained by this method:
80 >
81 > 1. Full arch support (GentooInstaller really could use this)
82
83 We should fix genkernel to do this, if it doesn't already today. There
84 is no reason this should not be possible today without a total rework.
85
86 > 2. More consistent with the rest of portage (installs binaries
87 > by building from source)
88
89 True, it isn't as "clean"
90
91 > 3. Better user experience
92
93 You forgot "mom and apple pie" here too :)
94
95 > 4. More flexability (genkernel forces building of initrd on x86)
96
97 I've already outlined the issues of initrd going away, so this isn't an
98 issue.
99
100 > 5. Don't have to store full kernel sources (each source tree is
101 > ~200MB unpacked)
102
103 You don't have to that today if you don't want to build any other kernel
104 modules that are outside of the main kernel tree. I have a number of
105 boxes set up this way right now. In fact, those boxes do not even have
106 a single kernel package on them at all, I just rolled my own and
107 installed it. Once of the niceties of Gentoo is that you do not have to
108 install a Gentoo kernel in order to have a working box (which for my
109 job, is a very good thing.)
110
111 But yes, there are a few packages that want to use kernel header files
112 in their build process, but that's another issue to deal with and take
113 care of...
114
115 > 6. Creates the ability to make binary kernel packages for fast
116 > installs (think GRP kernel)
117
118 I see no where in your proposal for how this will be accomplished. In
119 fact, this is the first place in the GLEP that "binary kernel packages"
120 are even mentioned. Please either add the description of how you are
121 going to do this to the SPECIFICATION portion of the document, or take
122 it out of the RATIONAL portion.
123
124 > 7. A seperate package for "generic" kernel config files gives us
125 > better version tracking
126
127 "better version tracking"? What do you mean here? Kernel config files
128 can not be kept identical across 2 different kernel versions. And they
129 are not supposed to be. They are a vital portion of the kernel version
130 itself and can not be split out. To think otherwise is to not fully
131 understand the kernel build process.
132
133 Also, is this a problem today? I have not seen issues related to this
134 in the past, have you? Are there any bugs you can point us at that
135 would show how this would help out?
136
137
138 So in summary, again, I understand the objections to the current
139 situation. However I do not see how the proposal really helps solve the
140 issue. If a reference implementation was created it would be easier to
141 discuss it at that time.
142
143 thanks,
144
145 greg k-h
146
147 --
148 gentoo-dev@g.o mailing list

Replies