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