/[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.18 Revision 1.19
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.18 2005/01/09 09:10:16 sejo Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml,v 1.19 2005/03/28 11:30:52 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.15</version> 11<version>2.00</version>
12<date>2005-01-09</date> 12<date>2005-03-28</date>
13 13
14<section> 14<section>
15<title>Timezone</title> 15<title>Timezone</title>
16<body> 16<body>
17 17
42available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 42available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
43Guide</uri>. 43Guide</uri>.
44</p> 44</p>
45 45
46<p> 46<p>
47For PPC you can choose between <c>development-sources</c> and 47For PPC you can choose between <c>vanilla-sources</c> and
48<c>gentoo-dev-sources</c> (both 2.6 kernels). Beside those there is a special 48<c>gentoo-sources</c> (both 2.6 kernels). The latter is available when you
49perform a networkless installation. Beside those there is a special
49kernel-2.6-patchset for the Pegasos: <c>pegasos-dev-sources</c>. So let's 50kernel-2.6-patchset for the Pegasos: <c>pegasos-sources</c>. So let's
50continue with <c>emerge</c>'ing the kernel sources: 51continue with <c>emerge</c>'ing the kernel sources:
51</p> 52</p>
52 53
53<pre caption="Installing a kernel source"> 54<pre caption="Installing a kernel source">
54# <i>emerge gentoo-dev-sources</i> 55# <i>emerge gentoo-sources</i>
55</pre> 56</pre>
57
58<note>
59The PowerPC sources are based on a 2.6.10-kernel with security patches from
602.6.11 backported. As the time of the release the 2.6.11 kernel produced
61several problems on different PowerPC machines.
62</note>
56 63
57<p> 64<p>
58When you take a look in <path>/usr/src</path> you should see a symlink called 65When you take a look in <path>/usr/src</path> you should see a symlink called
59<path>linux</path> pointing to your kernel source: 66<path>linux</path> pointing to your kernel source. We will assume the kernel
67source installed is <c>gentoo-sources-2.6.10-r8</c>:
60</p> 68</p>
61 69
62<pre caption="Viewing the kernel source symlink"> 70<pre caption="Viewing the kernel source symlink">
63# <i>ls -l /usr/src/linux</i> 71# <i>ls -l /usr/src/linux</i>
64lrwxrwxrwx 1 root root 12 Jul 10 10:55 /usr/src/linux -&gt; linux-2.6.9 72lrwxrwxrwx 1 root root 22 Mar 18 16:23 /usr/src/linux -&gt; linux-2.6.10-gentoo-r8
65</pre> 73</pre>
66 74
67<p> 75<p>
68If this isn't the case (i.e. the symlink points to a different kernel source) 76If the symlink doesn't point to the kernel source of your choice (note that
69change the symlink before you continue: 77<c>linux-2.6.10-gentoo-r8</c> is merely an example) you should change it to the
78right kernel:
70</p> 79</p>
71 80
72<pre caption="Changing the kernel source symlink"> 81<pre caption="Changing the kernel source symlink">
73# <i>rm /usr/src/linux</i> 82# <i>rm /usr/src/linux</i>
74# <i>cd /usr/src</i> 83# <i>cd /usr/src</i>
75# <i>ln -s linux-2.6.9 linux</i> 84# <i>ln -s linux-2.6.10-gentoo-r8 linux</i>
76</pre> 85</pre>
77 86
78<p> 87<p>
79Now it is time to configure and compile your kernel source. All architectures 88Now it is time to configure and compile your kernel source. You
80can use <c>genkernel</c> for this, which will build a generic kernel as used 89can use <c>genkernel</c> for this, which will build a generic kernel as used
81by the LiveCD. We explain the "manual" configuration first though, as it is 90by the Installation CD. We explain the "manual" configuration first though, as
82the best way to optimize your environment. 91it is the best way to optimize your environment.
83</p>
84
85<p> 92</p>
86Continue now with <uri link="#manual">Manual Configuration</uri>. 93
94<p>
95If you want to manually configure your kernel, continue now with <uri
96link="#manual">Default: Manual Configuration</uri>. If you want to use
97<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
98genkernel</uri> instead.
87</p> 99</p>
88 100
89</body> 101</body>
90</subsection> 102</subsection>
91</section> 103</section>
92<section id="manual"> 104<section id="manual">
93<title>Manual Configuration</title> 105<title>Default: Manual Configuration</title>
94<subsection> 106<subsection>
95<title>Introduction</title> 107<title>Introduction</title>
96<body> 108<body>
97 109
98<p> 110<p>
103 115
104<p> 116<p>
105However, one thing <e>is</e> true: you must know your system when you start 117However, one thing <e>is</e> true: you must know your system when you start
106configuring a kernel manually. Most information can be gathered by viewing the 118configuring a kernel manually. Most information can be gathered by viewing the
107contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You 119contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You
108can also run <c>lsmod</c> to see what kernel modules the LiveCD uses (it might 120can also run <c>lsmod</c> to see what kernel modules the Installation CD uses
109provide you with a nice hint on what to enable). 121(it might provide you with a nice hint on what to enable).
110</p> 122</p>
111 123
112<p> 124<p>
113Now go to your kernel source directory and execute <c>make menuconfig</c>. This 125Now go to your kernel source directory and execute <c>make menuconfig</c>. This
114will fire up an ncurses-based configuration menu. 126will fire up an ncurses-based configuration menu.
142</pre> 154</pre>
143 155
144<p> 156<p>
145Now go to <c>File Systems</c> and select support for the filesystems you use. 157Now go to <c>File Systems</c> and select support for the filesystems you use.
146<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 158<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
147able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc 159able to mount your partitions. Also select <c>/proc file system</c> and
148file system</c>: 160<c>Virtual memory</c>. Do <e>not</e> select the <c>/dev file system</c>.
149</p> 161</p>
150 162
151<pre caption="Selecting necessary file systems"> 163<pre caption="Selecting necessary file systems">
152File systems ---&gt; 164File systems ---&gt;
153 Pseudo Filesystems ---&gt; 165 Pseudo Filesystems ---&gt;
154 [*] /proc file system support 166 [*] /proc file system support
155 [ ] /dev file system support (OBSOLETE) 167 [ ] /dev file system support (OBSOLETE)
156 [ ] Automatically mount at boot
157 [*] Virtual memory file system support (former shm fs) 168 [*] Virtual memory file system support (former shm fs)
158 169
159<comment>(Select one or more of the following options as needed by your system)</comment> 170<comment>(Select one or more of the following options as needed by your system)</comment>
160 &lt;*&gt; Reiserfs support 171 &lt;*&gt; Reiserfs support
161 &lt;*&gt; Ext3 journalling file system support 172 &lt;*&gt; Ext3 journalling file system support
209 [*] Support for /dev/rtc 220 [*] Support for /dev/rtc
210</pre> 221</pre>
211 222
212<p> 223<p>
213Users of OldWorld machines will want HFS support so they can copy compiled 224Users of OldWorld machines will want HFS support so they can copy compiled
214kernels to the MacOS partition. 225kernels to the MacOS partition. This applies also to NewWorld machines as it is
226needed for the special Apple_Bootstrap partition:
215</p> 227</p>
216 228
217<pre caption="Activating HFS support"> 229<pre caption="Activating HFS support">
218File Systems ---&gt; 230File Systems ---&gt;
219 [*] HFS Support 231 [*] HFS Support
239# <i>make all &amp;&amp; make modules_install</i> 251# <i>make all &amp;&amp; make modules_install</i>
240</pre> 252</pre>
241 253
242<p> 254<p>
243When the kernel has finished compiling, copy the kernel image to 255When the kernel has finished compiling, copy the kernel image to
244<path>/boot</path>. 256<path>/boot</path> (be sure that it is mounted properly on the Pegasos).
245</p> 257</p>
246 258
247<pre caption="Installing the kernel"> 259<pre caption="Installing the kernel">
248<comment>replace 2.6.9 with your kernel-version</comment> 260<comment>replace 2.6.10 with your kernel-version</comment>
249(Apple/IBM) # <i>cp vmlinux /boot/kernel-2.6.9</i> 261(Apple/IBM) # <i>cp vmlinux /boot/kernel-2.6.10</i>
250(Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.6.9</i> 262(Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.6.10</i>
251</pre>
252
253<p>
254Also don't forget to copy over the system map:
255</p>
256
257<pre caption="Copying the system map">
258# <i>cp System.map /boot/System.map-2.6.9</i>
259</pre> 263</pre>
260 264
261<p> 265<p>
262It is also wise to copy over your kernel configuration file to 266It is also wise to copy over your kernel configuration file to
263<path>/boot</path>, just in case :) 267<path>/boot</path>, just in case :)
264</p> 268</p>
265 269
266<pre caption="Backing up your kernel configuration"> 270<pre caption="Backing up your kernel configuration">
267# <i>cp .config /boot/config-2.6.9</i> 271# <i>cp .config /boot/config-2.6.10-gentoo-r8</i>
268</pre> 272</pre>
269 273
270<p> 274<p>
271Now continue with <uri link="#kernel_modules">Installing Separate Kernel 275Now continue with <uri link="#kernel_modules">Installing Separate Kernel
272Modules</uri>. 276Modules</uri>.
319<pre caption="Running modules-update"> 323<pre caption="Running modules-update">
320# <i>modules-update</i> 324# <i>modules-update</i>
321</pre> 325</pre>
322 326
323<p> 327<p>
324Since 2004.3 we suggest people to use udev in stead of devfs. To ensure your system works with it you need to emerge udev.
325</p>
326<pre caption="Emerging udev">
327# <i>emerge udev</i>
328</pre>
329
330<p>
331On the 2004.3 <b>stage3</b> there is a problem with PAM, to resolve these issues, making sure you can login after the installation you should follow these steps:
332</p>
333<pre caption="Fix login problems 2004.3">
334<comment>First we need to add pam to our USE flags.</comment>
335# <i>nano /etc/make.conf</i>
336<comment>Now we need to re-emerge shadow, pam and pam-login.</comment>
337# <i>emerge shadow pam pam-login</i>
338</pre>
339<p>
340Continue the installation with <uri link="?part=1&amp;chap=8">Configuring 328Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
341your System</uri>. 329your System</uri>.
342</p> 330</p>
343 331
344</body> 332</body>
345</subsection> 333</subsection>
346</section> 334</section>
335<section id="genkernel">
336<title>Alternative: Using genkernel</title>
337<body>
338
339<p>
340If you are reading this section, you have chosen to use our <c>genkernel</c>
341script to configure your kernel for you.
342</p>
343
344<p>
345Now that your kernel source tree is installed, it's now time to compile your
346kernel by using our <c>genkernel</c> script to automatically build a kernel for
347you. <c>genkernel</c> works by configuring a kernel nearly identically to the
348way our Installation CD kernel is configured. This means that when you use
349<c>genkernel</c> to build your kernel, your system will generally detect all
350your hardware at boot-time, just like our Installation CD does. Because genkernel
351doesn't require any manual kernel configuration, it is an ideal solution for
352those users who may not be comfortable compiling their own kernels.
353</p>
354
355<p>
356Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
357</p>
358
359<pre caption="Emerging genkernel">
360# <i>emerge genkernel</i>
361</pre>
362
363<p>
364Next, copy over the kernel configuration used by the Installation CD to the
365location where genkernel looks for the default kernel configuration:
366</p>
367
368<pre caption="Copying over the Installation CD kernel config">
369# <i>zcat /proc/config.gz > /usr/share/genkernel/ppc/kernel-2.6</i>
370</pre>
371
372<p>
373Now, compile your kernel sources by running <c>genkernel --udev all</c>.
374Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
375hardware, this compilation will take quite a while to finish!
376</p>
377
378<p>
379Note that, if your partition where the kernel should be located doesn't use ext2
380or ext3 as filesystem you might need to manually configure your kernel using
381<c>genkernel --menuconfig all</c> and add support for your filesystem <e>in</e>
382the kernel (i.e. <e>not</e> as a module). Users of EVMS2 or LVM2 will probably
383want to add <c>--evms2</c> or <c>--lvm2</c> as argument as well.
384</p>
385
386<pre caption="Running genkernel">
387# <i>genkernel --udev all</i>
388</pre>
389
390<p>
391Once <c>genkernel</c> completes, a kernel, full set of modules and
392<e>initial root disk</e> (initrd) will be created. We will use the kernel
393and initrd when configuring a boot loader later in this document. Write
394down the names of the kernel and initrd as you will need it when writing
395the bootloader configuration file. The initrd will be started immediately after
396booting to perform hardware autodetection (just like on the Installation CD)
397before your "real" system starts up.
398</p>
399
400<pre caption="Checking the created kernel image name and initrd">
401# <i>ls /boot/kernel* /boot/initrd*</i>
402</pre>
403
404<p>
405Now, let's perform one more step to get our system to be more like the
406Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects
407hardware that is needed to boot your system, <c>coldplug</c> autodetects
408everything else. To emerge and enable <c>coldplug</c>, type the following:
409</p>
410
411<pre caption="Emerging and enabling coldplug">
412# <i>emerge coldplug</i>
413# <i>rc-update add coldplug boot</i>
414</pre>
415
416<p>
417If you want your system to react to hotplugging events, you will need to install
418and setup <c>hotplug</c> as well:
419</p>
420
421<pre caption="Emerging and enabling hotplug">
422# <i>emerge hotplug</i>
423# <i>rc-update add hotplug default</i>
424</pre>
425
426<p>
427Now continue with <uri link="?part=1&amp;chap=8">Configuring your System</uri>.
428</p>
429
430</body>
431</section>
432
347</sections> 433</sections>
434

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20