/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml

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

Revision 1.1 Revision 1.2
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml,v 1.1 2004/04/02 08:14:45 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml,v 1.2 2004/04/28 07:52:30 swift Exp $ -->
8 8
9<sections> 9<sections>
10<section> 10<section>
11<title>Timezone</title> 11<title>Timezone</title>
12<body> 12<body>
38available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 38available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
39Guide</uri>. 39Guide</uri>.
40</p> 40</p>
41 41
42<p> 42<p>
43For PPC you must use the <c>ppc-sources</c>. So let's continue with 43For PPC you can choose between <c>ppc-sources</c>, <c>ppc-sources-benh</c>,
44<c>ppc-sources-dev</c>, <c>ppc-sources-crypto</c> and
45<c>ppc-development-sources</c>. This latter kernel is available when you
46perform a networkless installation. So let's continue with
44<c>emerge</c>'ing the kernel sources: 47<c>emerge</c>'ing the kernel sources:
45</p> 48</p>
46 49
47<pre caption="Installing a kernel source"> 50<pre caption="Installing a kernel source">
48# <i>emerge ppc-sources</i> 51# <i>emerge ppc-development-sources</i>
49</pre> 52</pre>
50 53
51<p> 54<p>
52When you take a look in <path>/usr/src</path> you should see a symlink called 55When you take a look in <path>/usr/src</path> you should see a symlink called
53<path>linux</path> pointing to your kernel source: 56<path>linux</path> pointing to your kernel source:
54</p> 57</p>
55 58
56<pre caption="Viewing the kernel source symlink"> 59<pre caption="Viewing the kernel source symlink">
57# <i>ls -l /usr/src/linux</i> 60# <i>ls -l /usr/src/linux</i>
58lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.4.24 61lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.1
59</pre> 62</pre>
60 63
61<p> 64<p>
62If this isn't the case (i.e. the symlink points to a different kernel source) 65If this isn't the case (i.e. the symlink points to a different kernel source)
63change the symlink before you continue: 66change the symlink before you continue:
64</p> 67</p>
65 68
66<pre caption="Changing the kernel source symlink"> 69<pre caption="Changing the kernel source symlink">
67# <i>rm /usr/src/linux &amp;&amp; ln -s /usr/src/linux-2.4.24 /usr/src/linux</i> 70# <i>rm /usr/src/linux &amp;&amp; ln -s /usr/src/linux-2.6.1 /usr/src/linux</i>
68</pre> 71</pre>
69 72
70<p> 73<p>
71Now it is time to configure and compile your kernel source. All architectures 74Now it is time to configure and compile your kernel source. All architectures
72can use <c>genkernel</c> for this, which will build a generic kernel as used 75can use <c>genkernel</c> for this, which will build a generic kernel as used
73by the LiveCD. We explain the "manual" configuration first though, as it is 76by the LiveCD. We explain the "manual" configuration first though, as it is
74the best way to optimize your environment. 77the best way to optimize your environment.
75</p> 78</p>
76 79
77<p> 80<p>
78If you want to manually configure your kernel, continue now with <uri 81Continue now with <uri link="#manual">Manual Configuration</uri>.
79link="#manual">Default: Manual Configuration</uri>. If you want to use
80<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
81genkernel</uri> instead.
82</p> 82</p>
83 83
84</body> 84</body>
85</subsection> 85</subsection>
86</section> 86</section>
87<section id="manual"> 87<section id="manual">
88<title>Default: Manual Configuration</title> 88<title>Manual Configuration</title>
89<subsection> 89<subsection>
90<title>Introduction</title> 90<title>Introduction</title>
91<body> 91<body>
92 92
93<p> 93<p>
187The two compression options won't harm but are not definitely needed, neither 187The two compression options won't harm but are not definitely needed, neither
188does the <c>PPP over Ethernet</c> option, that might only be used by 188does the <c>PPP over Ethernet</c> option, that might only be used by
189<c>rp-pppoe</c> when configured to do kernel mode PPPoE. 189<c>rp-pppoe</c> when configured to do kernel mode PPPoE.
190</p> 190</p>
191 191
192<note>
193Users of a 2.6 kernel will find the mentioned options under <c>Device
194Drivers</c>.
195</note>
196
197<p> 192<p>
198If you require it, don't forget to include support in the kernel for your 193If you require it, don't forget to include support in the kernel for your
199ethernet card. 194ethernet card.
200</p> 195</p>
201 196
243<body> 238<body>
244 239
245<p> 240<p>
246Now that your kernel is configured, it is time to compile and install it. Exit 241Now that your kernel is configured, it is time to compile and install it. Exit
247the configuration and run <c>make dep &amp;&amp; make vmlinux modules 242the configuration and run <c>make dep &amp;&amp; make vmlinux modules
243modules_install</c> or on the Pegasos run <c>make dep &amp;&amp; make zImage
248modules_install</c>: 244modules modules_install</c>:
249</p> 245</p>
250 246
251<pre caption="Compiling the kernel"> 247<pre caption="Compiling the kernel">
252# <i>make dep &amp;&amp; make vmlinux modules modules_install</i> 248(Apple/IBM) # <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
249(Pegasos) # <i>make dep &amp;&amp; make zImage modules modules_install</i>
253</pre> 250</pre>
254 251
255<p> 252<p>
256When the kernel is done compiling, copy over the kernel image to 253When the kernel is done compiling, copy over the kernel image to
257<path>/boot</path>. 254<path>/boot</path>.
258</p> 255</p>
259 256
260<pre caption="Installing the kernel"> 257<pre caption="Installing the kernel">
261# <i>cp vmlinux /boot/kernel-2.4.24</i> 258(Apple/IBM) # <i>cp vmlinux /boot/kernel-2.4.24</i>
259(Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.4.24</i>
260</pre>
261
262<p>
263Also don't forget to copy over the system map:
264</p>
265
266<pre caption="Copying the system map">
262# <i>cp System.map /boot/System.map-2.4.24</i> 267# <i>cp System.map /boot/System.map-2.4.24</i>
263</pre> 268</pre>
264 269
265<p> 270<p>
266It is also wise to copy over your kernel configuration file to 271It is also wise to copy over your kernel configuration file to
276Modules</uri>. 281Modules</uri>.
277</p> 282</p>
278 283
279</body> 284</body>
280</subsection> 285</subsection>
281</section>
282<section id="genkernel">
283<title>Alternative: Using genkernel</title>
284<body>
285
286<p>
287If you are reading this section, you have chosen to use our <c>genkernel</c>
288script to configure your kernel for you.
289</p>
290
291<p>
292Now that your kernel source tree is installed, it's now time to compile your
293kernel by using our <c>genkernel</c> script to automatically build a kernel for
294you. <c>genkernel</c> works by configuring a kernel nearly identically to the
295way our LiveCD kernel is configured. This means that when you use
296<c>genkernel</c> to build your kernel, your system will generally detect all
297your hardware at boot-time, just like our Live CD does. Because genkernel
298doesn't require any manual kernel configuration, it is an ideal solution for
299those users who may not be comfortable compiling their own kernels.
300</p>
301
302<p>
303Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
304</p>
305
306<pre caption="Emerging genkernel">
307# <i>emerge genkernel</i>
308</pre>
309
310<p>
311Now, compile your kernel sources by running <c>genkernel all</c>.
312Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
313hardware, this compilation will take quite a while to finish!
314</p>
315
316<p>
317Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
318need to manually configure your kernel using <c>genkernel --menuconfig all</c>
319and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
320module).
321</p>
322
323<pre caption="Running genkernel">
324# <i>genkernel all</i>
325GenKernel v3.0.1_beta10
326* ARCH: ppc
327* KERNEL VER: 2.4.24
328* kernel: configuring source
329* kernel: running mrproper
330<comment>(Output removed to increase readability)</comment>
331* Kernel compiled successfully!
332* Required Kernel Params:
333* : root=/dev/ram0 init=/linuxrc real_root=/dev/$ROOT
334* where $ROOT is the devicenode for your root partition as
335* you should have specified in /etc/fstab
336*
337* You MUST tell your bootloader to use the generated initrd
338*
339* Recommended Kernel Params:
340* : vga=0x317 splash=verbose
341*
342* Do NOT report kernel bugs (configs included) as genkernel bugs.
343* Make sure you have the latest genkernel before reporting bugs
344*
345* For more info see /usr/share/genkernel/README
346</pre>
347
348<p>
349Once <c>genkernel</c> completes, a kernel, full set of modules and
350<e>initial root disk</e> (initrd) will be created. We will use the kernel
351and initrd when configuring a boot loader later in this document. Write
352down the names of the kernel and initrd as you will need it when writing
353the bootloader configuration file. The initrd will be started immediately after
354booting to perform hardware autodetection (just like on the Live CD) before
355your "real" system starts up.
356</p>
357
358<pre caption="Checking the created kernel image name and initrd">
359# <i>ls /boot/kernel* /boot/initrd*</i>
360</pre>
361
362<p>
363Now, let's perform one more step to get our system to be more like the Live
364CD -- let's emerge <c>hotplug</c>. While the initrd autodetects hardware that
365is needed to boot your system, <c>hotplug</c> autodetects everything else.
366To emerge and enable <c>hotplug</c>, type the following:
367</p>
368
369<pre caption="Emerging and enabling hotplug">
370# <i>emerge hotplug</i>
371# <i>rc-update add hotplug default</i>
372</pre>
373
374</body>
375</section> 286</section>
376<section id="kernel_modules"> 287<section id="kernel_modules">
377<title>Installing Separate Kernel Modules</title> 288<title>Installing Separate Kernel Modules</title>
378<subsection> 289<subsection>
379<title>Installing Extra Modules</title> 290<title>Installing Extra Modules</title>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20