/[gentoo]/xml/htdocs/doc/en/genkernel.xml
Gentoo

Diff of /xml/htdocs/doc/en/genkernel.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 Revision 1.11
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.10 2004/09/21 09:16:23 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.11 2004/11/05 16:39:05 plasmaroo Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/genkernel.xml"> 5<guide link="/doc/en/genkernel.xml">
6<title>Gentoo Linux Genkernel Guide</title> 6<title>Gentoo Linux Genkernel Guide</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="plasmaroo@gentoo.org">Tim Yamin</mail> 9 <mail link="plasmaroo@gentoo.org">Tim Yamin</mail>
10</author> 10</author>
11 11
12<abstract> 12<abstract>
13This guide intends to provide a reference of all the functions 13This guide intends to provide a reference of all the functions
14provided by Genkernel. 14provided by genkernel.
15</abstract> 15</abstract>
16 16
17<license/> 17<license/>
18 18
19<version>1.1</version> 19<version>1.1.1</version>
20<date>August 19, 2004</date> 20<date>November 05, 2004</date>
21 21
22<chapter> 22<chapter>
23<title>Introduction</title> 23<title>Introduction</title>
24<section> 24<section>
25<title>Introduction</title> 25<title>Introduction</title>
26<body> 26<body>
27 27
28<p> 28<p>
29Genkernel is designed to allow users who are not previously used to 29Genkernel is designed to allow users who are not previously used to
30compiling a kernel to use a similar setup to that one that is used on 30compiling a kernel to use a similar setup to that one that is used on
31the Gentoo LiveCDs which auto-detects your hardware. 31the Gentoo LiveCDs which auto-detects your hardware.
32</p> 32</p>
33 33
34<p> 34<p>
35Some users may also be interested in using genkernel for hardware 35Some users may also be interested in using genkernel for hardware
140 140
141<ul> 141<ul>
142 <li> 142 <li>
143 <b>--kernel-as=<c>someAssembler</c></b>: This specifies an assembler which 143 <b>--kernel-as=<c>someAssembler</c></b>: This specifies an assembler which
144 would be used for compiling your kernel. 144 would be used for compiling your kernel.
145 </li> 145 </li>
146 <li> 146 <li>
147 <b>--kernel-cc=<c>someCompiler</c></b>: This specifies a compiler which 147 <b>--kernel-cc=<c>someCompiler</c></b>: This specifies a compiler which
148 would be used for compiling your kernel. 148 would be used for compiling your kernel.
149 </li> 149 </li>
150 <li> 150 <li>
151 <b>--kernel-ld=<c>someLinker</c></b>: This specifies a linker which would 151 <b>--kernel-ld=<c>someLinker</c></b>: This specifies a linker which would
152 be used for compiling your kernel. 152 be used for compiling your kernel.
153 </li> 153 </li>
154 <li> 154 <li>
155 <b>--kernel-make=<c>someMake</c></b>: This specifies an alternate GNU Make 155 <b>--kernel-make=<c>someMake</c></b>: This specifies an alternate GNU make
156 which would be used for compiling your kernel. 156 which would be used for compiling your kernel.
157 </li> 157 </li>
158</ul> 158</ul>
159 159
160<ul> 160<ul>
161 <li> 161 <li>
162 <b>--utils-as=<c>someAssembler</c></b>: This specifies an assembler which 162 <b>--utils-as=<c>someAssembler</c></b>: This specifies an assembler which
163 would be used for compiling the support utilities. 163 would be used for compiling the support utilities.
164 </li> 164 </li>
165 <li> 165 <li>
166 <b>--utils-cc=<c>someCompiler</c></b>: This specifies a compiler which 166 <b>--utils-cc=<c>someCompiler</c></b>: This specifies a compiler which
167 would be used for compiling the support utilities. 167 would be used for compiling the support utilities.
168 </li> 168 </li>
169 <li> 169 <li>
170 <b>--utils-ld=<c>someLinker</c></b>: This specifies a linker which would be 170 <b>--utils-ld=<c>someLinker</c></b>: This specifies a linker which would be
171 used for compiling the support utilities. 171 used for compiling the support utilities.
172 </li> 172 </li>
173 <li> 173 <li>
174 <b>--utils-make=<c>someMake</c></b>: This specifies an alternate GNU Make 174 <b>--utils-make=<c>someMake</c></b>: This specifies an alternate GNU make
175 which would be used for compiling the support utilities. 175 which would be used for compiling the support utilities.
176 </li> 176 </li>
177</ul> 177</ul>
178 178
179<ul> 179<ul>
180 <li> 180 <li>
181 <b>--makeopts=<c>-jJobs</c></b>: This specifies the flags which would be 181 <b>--makeopts=<c>-jJobs</c></b>: This specifies the flags which would be
182 passed to GNU Make when the kernel and utilities are being compiled. 182 passed to GNU make when the kernel and utilities are being compiled.
183 </li> 183 </li>
184</ul> 184</ul>
185 185
186</body> 186</body>
187</section> 187</section>
188<section> 188<section>
189<title>Genkernel kernel flags</title> 189<title>Genkernel kernel flags</title>
190<body> 190<body>
191 191
192<p> 192<p>
193Genkernel supports the following flags, some of which have 193Genkernel supports the following flags, some of which have
194<c>--<b>no-</b>option</c> equivalents that influence 194<c>--<b>no-</b>option</c> equivalents that influence
195kernel compilation: 195kernel compilation:
196</p> 196</p>
197 197
198<ul> 198<ul>
199 <li> 199 <li>
200 <b>--callback="echo Hello"</b>: This routine calls the specified 200 <b>--callback="echo Hello"</b>: This routine calls the specified
201 arguments after the kernel and the relevant modules have been built; but 201 arguments after the kernel and the relevant modules have been built; but
202 before the initrd has been built. This is useful where you might want 202 before the initrd has been built. This is useful where you might want
203 external modules installed to the initrd by emerging the relevant item 203 external modules installed to the initrd by emerging the relevant item
204 using the callback and then redefinining a Genkernel module group. 204 using the callback and then redefinining a genkernel module group.
205 </li> 205 </li>
206 <li> 206 <li>
207 <b>--<c>no-</c>clean</b>: This runs <e>or does not 207 <b>--<c>no-</c>clean</b>: This runs <e>or does not
208 run</e> <c>make clean</c> before compiling your kernel. This 208 run</e> <c>make clean</c> before compiling your kernel. This
209 causes all object files and dependencies to be removed. 209 causes all object files and dependencies to be removed.
210 </li> 210 </li>
211 <li> 211 <li>
212 <b>--<c>no-</c>mrproper</b>: This runs <e>or does not 212 <b>--<c>no-</c>mrproper</b>: This runs <e>or does not
213 run</e> <c>make mrproper</c> before compiling your kernel. This 213 run</e> <c>make mrproper</c> before compiling your kernel. This
214 causes all object files, dependencies <b> and your 214 causes all object files, dependencies <b> and your
215 configuration</b> to be removed. 215 configuration</b> to be removed.
216 </li> 216 </li>
217</ul> 217</ul>
218 218
219<ul> 219<ul>
228 inpersistant <path>/path/to/sources/.config</path> which is used by 228 inpersistant <path>/path/to/sources/.config</path> which is used by
229 default. 229 default.
230 </li> 230 </li>
231</ul> 231</ul>
232 232
233<ul> 233<ul>
234 <li> 234 <li>
235 <b>--<c>no-</c>bootsplash</b>: This adds <e>or does not add</e> bootsplash 235 <b>--<c>no-</c>bootsplash</b>: This adds <e>or does not add</e> bootsplash
236 support in the initrd which genkernel builds. Not all architectures 236 support in the initrd which genkernel builds. Not all architectures
237 currently support bootsplash, and a kernel that supports bootsplash is 237 currently support bootsplash, and a kernel that supports bootsplash is
238 also required. 238 also required.
239 </li> 239 </li>
240 <li> 240 <li>
241 <b>--<c>no-</c>menuconfig</b>: This runs <e>or does not run</e> the kernel 241 <b>--<c>no-</c>menuconfig</b>: This runs <e>or does not run</e> the kernel
242 menu-based configurator before building your kernel, after <c>make 242 menu-based configurator before building your kernel, after <c>make
243 oldconfig</c> has ran. 243 oldconfig</c> has run.
244 </li> 244 </li>
245</ul> 245</ul>
246 246
247<ul> 247<ul>
248 <li> 248 <li>
249 <b>--no-initrdmodules</b>: This doesn't copy any modules to the initrd 249 <b>--no-initrdmodules</b>: This doesn't copy any modules to the initrd
250 which genkernel creates. 250 which genkernel creates.
251 </li> 251 </li>
252 <li> 252 <li>
253 <b>--<c>no-</c>install</b>: This installs <e>or does not install</e> your 253 <b>--<c>no-</c>install</b>: This installs <e>or does not install</e> your
254 kernel, modules, and initrd once the compilation has finished. 254 kernel, modules, and initrd once the compilation has finished.
255 </li> 255 </li>
256</ul> 256</ul>
257 257
258</body> 258</body>
281 overrides the default busybox configuration with the specifid file 281 overrides the default busybox configuration with the specifid file
282 </li> 282 </li>
283 <li> 283 <li>
284 <b>--busybox-bin=<path>/path/to/busybox-binary.tar.bz2</path></b>: Using 284 <b>--busybox-bin=<path>/path/to/busybox-binary.tar.bz2</path></b>: Using
285 this option means that a busybox binary would not be compiled, and the 285 this option means that a busybox binary would not be compiled, and the
286 specified tarball would be used. Note that busybox <e>must</e> be compiled 286 specified tarball would be used. Note that busybox <e>must</e> be compiled
287 statically! 287 statically!
288 </li> 288 </li>
289</ul> 289</ul>
290 290
291<ul> 291<ul>
292 <li> 292 <li>
293 <b>--minkernpackage=<path>/output/to/yourkernel.tar.bz2</path></b>: This 293 <b>--minkernpackage=<path>/output/to/yourkernel.tar.bz2</path></b>: This
294 flag outputs a tarball of the kernel, named as <path>kernel</path> and the 294 flag outputs a tarball of the kernel, named as <path>kernel</path> and the
295 initrd named as <path>initrd</path> to the specified file. No path 295 initrd named as <path>initrd</path> to the specified file. No path
296 information or modules will be includes in the tarball. 296 information or modules will be included in the tarball.
297 </li> 297 </li>
298</ul> 298</ul>
299 299
300</body> 300</body>
301</section> 301</section>
302<section> 302<section>
303<title>Running genkernel</title> 303<title>Running genkernel</title>
304<body> 304<body>
305 305
306<p> 306<p>
307All that is needed to run genkernel is just genkernel with the 307All that is needed to run genkernel is just genkernel with the
308necessary flags as root. For example: 308necessary flags as root. For example:
309</p> 309</p>
310 310
311<pre caption="Running genkernel"> 311<pre caption="Running genkernel">
312# genkernel --menuconfig --no-clean --no-install --bootsplash all 312# genkernel --menuconfig --no-clean --no-install --bootsplash all
313<comment>(Would produce a kernel, asking you what how to configure it 313<comment>(Would produce a kernel, asking you how to configure it
314to your desire, leaving alone any compiled object files, enabling 314to your desire, leaving alone any compiled object files, enabling
315bootsplash support but not installing anything.)</comment> 315bootsplash support but not installing anything.)</comment>
316</pre> 316</pre>
317 317
318<p> 318<p>
319If you want genkernel to install your kernel as well, you must ensure 319If you want genkernel to install your kernel as well, you must ensure
320that your <path>/boot</path> partition is mounted - recent Genkernels 320that your <path>/boot</path> partition is mounted - recent genkernels
321would automatically attempt to do this for you if MOUNTBOOT is set to 321would automatically attempt to do this for you if MOUNTBOOT is set to
322"yes" in <path>/etc/genkernel.conf</path>. 322"yes" in <path>/etc/genkernel.conf</path>.
323</p> 323</p>
324 324
325<pre caption="Mounting your /boot manually"> 325<pre caption="Mounting your /boot manually">
326<comment>(If /boot is a valid entry in /etc/fstab:)</comment> 326<comment>(If /boot is a valid entry in /etc/fstab:)</comment>
327# mount /boot 327# mount /boot
328<comment>(... otherwise for IDE disks:)</comment> 328<comment>(... otherwise for IDE disks:)</comment>
329# mount /dev/hda1 /boot 329# mount /dev/hda1 /boot
330<comment>(... and for SCSI disks:)</comment> 330<comment>(... and for SCSI disks:)</comment>
331# mount /dev/sda1 /boot 331# mount /dev/sda1 /boot
332</pre> 332</pre>
333 333
334</body> 334</body>
335</section> 335</section>
337<title>Setting up genkernel to work with your bootloader</title> 337<title>Setting up genkernel to work with your bootloader</title>
338<body> 338<body>
339 339
340<p> 340<p>
341To set up genkernel to work with your bootloader, three or four changes are 341To set up genkernel to work with your bootloader, three or four changes are
342required to your bootloader configuration. 342required to your bootloader configuration.
343</p> 343</p>
344 344
345<ol> 345<ol>
346 <li> 346 <li>
347 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the 347 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the
348 kernel parameters passed to the kernel image. 348 kernel parameters passed to the kernel image.
349 </li> 349 </li>
350 <li> 350 <li>
351 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters 351 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters
352 passed to the kernel image if <path>/dev/hda3</path> contains your root 352 passed to the kernel image, if <path>/dev/hda3</path> contains your root
353 partition. 353 partition.
354 </li> 354 </li>
355 <li> 355 <li>
356 If you are using bootsplash, add a suitable modeline such as 356 If you are using bootsplash, add a suitable modeline such as
357 <c>vga=0x317</c> to the parameters passed to the kernel and also add 357 <c>vga=0x317</c> to the parameters passed to the kernel and also add
358 <c>splash=verbose</c> or <c>splash=silent</c> depending on the verboseness 358 <c>splash=verbose</c> or <c>splash=silent</c> depending on the verboseness
359 you require from your bootsplash. 359 you require from your bootsplash.
360 </li> 360 </li>
361 <li> 361 <li>
362 Add the initrd according to how your bootloader requires it: see the <uri 362 Add the initrd according to how your bootloader requires it: see the <uri
363 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Gentoo 363 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Gentoo
364 Handbook</uri> for details on how you would do it for your bootloader. 364 Handbook</uri> for details on how you would do it for your bootloader.
365 </li> 365 </li>
366</ol> 366</ol>
367 367
379<path>/usr/share/genkernel/&lt;arch&gt;</path> instead. 379<path>/usr/share/genkernel/&lt;arch&gt;</path> instead.
380</p> 380</p>
381 381
382</body> 382</body>
383</section> 383</section>
384</chapter> 384</chapter>
385 385
386<chapter> 386<chapter>
387<title>Porting genkernel</title> 387<title>Porting genkernel</title>
388<section> 388<section>
389<title>Introduction</title> 389<title>Introduction</title>
390<body> 390<body>
391 391
392<p> 392<p>
393Provided your architecture has all the required libraries and utilties 393Provided your architecture has all the required libraries and utilties
394which genkernel requires, which includes but it not limited to a 394which genkernel requires, which includes but it is not limited to a
395working kernel for your architecture, working compiler suite, GNU 395working kernel for your architecture, working compiler suite, GNU
396Make, and a working busybox distribution, you're all set to go! 396make, and a working busybox distribution, you're all set to go!
397</p> 397</p>
398 398
399<p> 399<p>
400For each architecture, genkernel uses 400For each architecture, genkernel uses
401<path>/usr/share/genkernel/archName</path> for configuration files for 401<path>/usr/share/genkernel/$archName</path> for configuration files for
402that architecture. 402that architecture.
403</p> 403</p>
404 404
405</body> 405</body>
406</section> 406</section>
407<section> 407<section>
408<title>How the system bootstrapping works</title> 408<title>How the system bootstrapping works</title>
409<body> 409<body>
410 410
411<ol> 411<ol>
412 <li> 412 <li>
413 The bootloader loads the genkernel image, built to the specification of the 413 The bootloader loads the genkernel image, built to the specification of the
414 configuration files in the genkernel directories as well as the initrd 414 configuration files in the genkernel directories as well as the initrd
415 which is prepared by genkernel. 415 which is prepared by genkernel.
416 </li> 416 </li>

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20