/[gentoo]/xml/htdocs/proj/en/glep/glep-0026.html
Gentoo

Contents of /xml/htdocs/proj/en/glep/glep-0026.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download) (as text)
Sun Oct 14 17:00:15 2007 UTC (6 years, 10 months ago) by antarus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +4 -251 lines
File MIME type: text/html
the canary on 53 went well, changing the rest

1 g2boojum 1.1 <?xml version="1.0" encoding="utf-8" ?>
2     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 antarus 1.5
5 g2boojum 1.1 <head>
6     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 g2boojum 1.3 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
8 g2boojum 1.1 <title>GLEP 26 -- Handling kernels with portage</title>
9 antarus 1.5 <link rel="stylesheet" href="tools/glep.css" type="text/css" />
10 g2boojum 1.1 </head>
11     <body bgcolor="white">
12     <table class="navigation" cellpadding="0" cellspacing="0"
13     width="100%" border="0">
14     <tr><td class="navicon" width="150" height="35">
15     <a href="http://www.gentoo.org/" title="Gentoo Linux Home Page">
16     <img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]"
17     border="0" width="150" height="35" /></a></td>
18     <td class="textlinks" align="left">
19     [<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>]
20 antarus 1.5 [<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>]
21 g2boojum 1.3 [<b><a href="http://www.gentoo.org/proj/en/glep/glep-0026.txt">GLEP Source</a></b>]
22 g2boojum 1.1 </td></tr></table>
23 g2boojum 1.3 <table class="rfc2822 docutils field-list" frame="void" rules="none">
24 g2boojum 1.1 <col class="field-name" />
25     <col class="field-body" />
26     <tbody valign="top">
27     <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">26</td>
28     </tr>
29     <tr class="field"><th class="field-name">Title:</th><td class="field-body">Handling kernels with portage</td>
30     </tr>
31 g2boojum 1.2 <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.2</td>
32 g2boojum 1.1 </tr>
33 g2boojum 1.3 <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0026.txt?cvsroot=gentoo">2004/11/11 21:32:21</a></td>
34 g2boojum 1.1 </tr>
35     <tr class="field"><th class="field-name">Author:</th><td class="field-body">Nathaniel McCallum &lt;npmccallum&#32;&#97;t&#32;gentoo.org&gt;, Joshua Campbell &lt;warpzero&#32;&#97;t&#32;gentoo.org&gt;</td>
36     </tr>
37 g2boojum 1.2 <tr class="field"><th class="field-name">Status:</th><td class="field-body">deferred</td>
38 g2boojum 1.1 </tr>
39     <tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
40     </tr>
41 g2boojum 1.3 <tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="glep-0002.html">text/x-rst</a></td>
42 g2boojum 1.1 </tr>
43     <tr class="field"><th class="field-name">Created:</th><td class="field-body">2-May-2004</td>
44     </tr>
45 g2boojum 1.2 <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">2-May-2004, 11-Nov-2004</td>
46 g2boojum 1.1 </tr>
47     </tbody>
48     </table>
49     <hr />
50 g2boojum 1.3 <div class="contents topic">
51     <p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
52 g2boojum 1.1 <ul class="simple">
53     <li><a class="reference" href="#abstract" id="id2" name="id2">Abstract</a></li>
54 g2boojum 1.2 <li><a class="reference" href="#status" id="id3" name="id3">Status</a></li>
55     <li><a class="reference" href="#motivation" id="id4" name="id4">Motivation</a></li>
56     <li><a class="reference" href="#specification" id="id5" name="id5">Specification</a></li>
57     <li><a class="reference" href="#rationale" id="id6" name="id6">Rationale</a></li>
58     <li><a class="reference" href="#backwards-compatibility" id="id7" name="id7">Backwards Compatibility</a></li>
59     <li><a class="reference" href="#reference-implementation" id="id8" name="id8">Reference Implementation</a></li>
60     <li><a class="reference" href="#copyright" id="id9" name="id9">Copyright</a></li>
61 g2boojum 1.1 </ul>
62     </div>
63 g2boojum 1.3 <div class="section">
64     <h1><a class="toc-backref" href="#id2" id="abstract" name="abstract">Abstract</a></h1>
65 g2boojum 1.1 <p>This GLEP proposes to create a more consistent handling of kernels and kernel building.
66     Currently &quot;emerge kernel-name&quot; only installs the sources and does not build anything.
67 g2boojum 1.3 &quot;emerge kernel-name&quot; should install only sources OR only a binary kernel, its modules,
68 g2boojum 1.1 and a tarballed package of kernel-headers, depending on USE flag.</p>
69     </div>
70 g2boojum 1.3 <div class="section">
71     <h1><a class="toc-backref" href="#id3" id="status" name="status">Status</a></h1>
72 g2boojum 1.2 <p>Timed out</p>
73     </div>
74 g2boojum 1.3 <div class="section">
75     <h1><a class="toc-backref" href="#id4" id="motivation" name="motivation">Motivation</a></h1>
76 g2boojum 1.1 <p>Currently, the only automated kernel build proceedure that we have is genkernel. While
77     genkernel is a great tool, its main weakness is that it does not port well to other
78     arches because of the initrd and the lack of good &quot;generic&quot; settings for other arches.
79     This GLEP hopes to overcome this by abstracting the various layers of genkernel and
80     implementing the most common aspect (the build proceedure) into a portage eclass.</p>
81     </div>
82 g2boojum 1.3 <div class="section">
83     <h1><a class="toc-backref" href="#id5" id="specification" name="specification">Specification</a></h1>
84 g2boojum 1.1 <p>There would be 3 layers to kernel building: (place of implementation)</p>
85     <blockquote>
86     <ul class="simple">
87     <li>Stage 1 - Configuring the kernel (optional) -- external utility</li>
88     <li>Stage 2 - Building the kernel -- in an eclass</li>
89     <li>Stage 3 - Building the initrd (optional) -- in an ebuild</li>
90     </ul>
91     </blockquote>
92     <p>Stages 1 and 3 are optional on most arches.</p>
93     <p>Stage 1 would be achieved through a seperate utility (perhaps like the current
94     genkernel). This utility would help the user configure the kernel and any kernel/build
95     related settings. This stage is optional and would only be used if a person wanted a
96 g2boojum 1.3 customized kernel settings. One optional thought is to have this utility a part of the
97 g2boojum 1.1 base Gentoo system. That way there are less steps to make a custom kernel.</p>
98     <p>Stage 2 would be implimented through an eclass. This stage is not optional. One would
99     perform this step by typing &quot;emerge kernel-name&quot;, where &quot;kernel-name&quot; is the name of
100     the kernel package you want to use (ie. &quot;gentoo-dev&quot;). This package would have a
101     &quot;buildkernel&quot; USE flag. If the flag was not set, it would simply download and install
102 g2boojum 1.3 sources like we do currently. However, if the &quot;buildkernel&quot; flag is set, portage will
103 g2boojum 1.1 perform the following steps:</p>
104     <blockquote>
105     <ol class="arabic simple">
106     <li>(as a dependency) download and install a tarball of &quot;generic&quot; kernel config files.</li>
107     <li>Check to see if customized kernel config/settings have been set via Stage 1.</li>
108     <li>Portage will use a custom config, if available. Otherwise, a &quot;generic&quot; config.</li>
109     <li>If neither a custom config or a &quot;generic&quot; config is available, die (with message).
110     This is needed as some arches don't/can't have &quot;generic&quot; configs, so they will
111     simply be presented a message telling them to run the utility from Stage 1 (which
112     they obviously skipped).</li>
113     <li>Build the kernel and modules and install them</li>
114     <li>Remove unnecessary files from the sources and tarball it as &quot;kernel-headers&quot;.
115     This tarball provides the appropriate files to build external modules against, like
116     nvidia-kernel, etc... The external modules (when built) will determine the running
117     kernel and unpack the appropriate tarball, to build against, then remove the files.</li>
118     </ol>
119     </blockquote>
120     <p>Stage 3 would merely be an ebuild that constructs an initrd image for either the running
121     kernel or, lacking a running kernel, the newest kernel installed (by version/date installed?).
122     Initrd's can't be used on all arches, so this ebuild can be keyword masked as appropriate.
123     The initrd package would also have a &quot;bootsplash&quot; USE flag (on x86, maybe others) that
124     would build in bootsplash support. Any non-default actions desired by the user can be
125     handled with the utility from Stage 1.</p>
126 g2boojum 1.3 <p>This would lead us to several case scenarios (assuming kernel-config is part of the base
127 g2boojum 1.1 system):</p>
128     <blockquote>
129     <ol class="arabic">
130     <li><p class="first">default kernel, no initrd: &quot;emerge gentoo-kernel&quot;</p>
131     </li>
132     <li><p class="first">default kernel, initrd: &quot;emerge aa-kernel initrd&quot;</p>
133     </li>
134     <li><p class="first">default kernel, bootsplash initrd: &quot;USE=bootsplash emerge mm-kernel initrd&quot;</p>
135     </li>
136 g2boojum 1.3 <li><dl class="first docutils">
137 g2boojum 1.1 <dt>non-default kernel, no initrd: &quot;kernel-config gentoo-dev-kernel&quot;</dt>
138     <dd><p class="first last">&quot;emerge gentoo-dev-kernel&quot;</p>
139     </dd>
140     </dl>
141     </li>
142 g2boojum 1.3 <li><dl class="first docutils">
143 g2boojum 1.1 <dt>non-default kernel, initrd: &quot;kernel-config alpha-kernel&quot;</dt>
144     <dd><p class="first last">&quot;emerge alpha-kernel initrd&quot;</p>
145     </dd>
146     </dl>
147     </li>
148     <li><p class="first">JUST sources, no binary &quot;USE=-buildkernel emerge grsec-kernel&quot;</p>
149     </li>
150     </ol>
151     </blockquote>
152     </div>
153 g2boojum 1.3 <div class="section">
154     <h1><a class="toc-backref" href="#id6" id="rationale" name="rationale">Rationale</a></h1>
155 g2boojum 1.1 <p>There are many advantages gained by this method:</p>
156     <blockquote>
157     <ol class="arabic simple">
158     <li>Full arch support (GentooInstaller really could use this)</li>
159     <li>More consistent with the rest of portage (installs binaries by building from source)</li>
160     <li>Better user experience</li>
161     <li>More flexability (genkernel forces building of initrd on x86)</li>
162     <li>Don't have to store full kernel sources (each source tree is ~200MB unpacked)</li>
163     <li>Creates the ability to make binary kernel packages for fast installs (think GRP kernel)</li>
164     <li>A seperate package for &quot;generic&quot; kernel config files gives us better version tracking</li>
165     </ol>
166     </blockquote>
167     <p>The major problem is, however, that we currently have two different build systems,
168     portage and genkernel. Having competing build systems is not a GoodThing TM. Therefore,
169     we can either make portage build kernels or we can make genkernel build everything else.</p>
170     </div>
171 g2boojum 1.3 <div class="section">
172     <h1><a class="toc-backref" href="#id7" id="backwards-compatibility" name="backwards-compatibility">Backwards Compatibility</a></h1>
173 g2boojum 1.1 <p>If you want to emerge kernel sources the old way, just do: USE=&quot;-buildkernel&quot; emerge kernel-name</p>
174 g2boojum 1.3 <p>Perhaps we could also name the new kernel-config program (from Stage 1) &quot;genkernel&quot; so that users
175 g2boojum 1.1 can have a seemless transition.</p>
176     </div>
177 g2boojum 1.3 <div class="section">
178     <h1><a class="toc-backref" href="#id8" id="reference-implementation" name="reference-implementation">Reference Implementation</a></h1>
179 g2boojum 1.1 <p>not yet ..</p>
180     </div>
181 g2boojum 1.3 <div class="section">
182     <h1><a class="toc-backref" href="#id9" id="copyright" name="copyright">Copyright</a></h1>
183 g2boojum 1.1 <p>This document has been placed in the public domain.</p>
184     </div>
185 g2boojum 1.3
186 g2boojum 1.1 </div>
187 g2boojum 1.3 <div class="footer">
188 g2boojum 1.2 <hr class="footer" />
189 g2boojum 1.1 <a class="reference" href="glep-0026.txt">View document source</a>.
190 antarus 1.5 Generated on: 2007-10-13 13:39 UTC.
191 g2boojum 1.1 Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
192 g2boojum 1.3
193 g2boojum 1.1 </div>
194     </body>
195     </html>

  ViewVC Help
Powered by ViewVC 1.1.20