/[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.34 Revision 1.39
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
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/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml,v 1.34 2005/08/09 09:43:58 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml,v 1.39 2006/02/27 00:55:34 fox2mike Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.11</version> 11<version>2.16</version>
12<date>2005-08-09</date> 12<date>2006-02-27</date>
13 13
14<section> 14<section>
15<title>Timezone</title> 15<title>Timezone</title>
16<body> 16<body>
17 17
18<p> 18<p>
19First, select your timezone so that your system knows where it is located. Look 19You first need to select your timezone so that your system knows where it is
20for your timezone in <path>/usr/share/zoneinfo</path>, then make a symlink to 20located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy
21<path>/etc/localtime</path> using <c>ln</c>: 21it to <path>/etc/localtime</path>. Please avoid the
22<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
23indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8.
22</p> 24</p>
23 25
24<pre caption="Setting the timezone information"> 26<pre caption="Setting the timezone information">
25# <i>ls /usr/share/zoneinfo</i> 27# <i>ls /usr/share/zoneinfo</i>
26<comment>(Suppose you want to use GMT)</comment> 28<comment>(Suppose you want to use GMT)</comment>
27# <i>ln -sf /usr/share/zoneinfo/GMT /etc/localtime</i> 29# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
28</pre> 30</pre>
29 31
30</body> 32</body>
31</section> 33</section>
32<section> 34<section>
42available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
43Guide</uri>. 45Guide</uri>.
44</p> 46</p>
45 47
46<p> 48<p>
47We suggest using either <c>vanilla-sources</c> or <c>gentoo-sources</c> 49We suggest using either <c>vanilla-sources</c> or <c>gentoo-sources</c> on PPC,
48on PPC, which are both 2.6 kernels. The latter is available when you 50which are both 2.6 kernels. The latter is available when you perform a
49perform a networkless installation. So let's continue with <c>emerge</c>'ing 51networkless installation. So let's continue with <c>emerge</c>'ing the kernel
50the kernel sources: 52sources. The <c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or
53other dependencies at this point. <c>USE="symlink"</c> is not necessary for a
54new install, but ensures proper creation of the <path>/usr/src/linux</path>
55symlink.
51</p> 56</p>
52 57
53<pre caption="Installing the kernel source"> 58<pre caption="Installing the kernel source">
54# <i>emerge gentoo-sources</i> 59# <i>USE="-doc symlink" emerge gentoo-sources</i>
55</pre> 60</pre>
56
57<note>
58The suggested sources at the time of the 2005.1 release are
59<c>gentoo-sources-2.6.12-r4</c> and <c>vanilla-sources-2.6.12.2</c>.
60</note>
61 61
62<p> 62<p>
63If you take a look in <path>/usr/src</path> you should see a symlink named 63If you take a look in <path>/usr/src</path> you should see a symlink named
64<path>linux</path> pointing to your current kernel source. Here, we will assume 64<path>linux</path> pointing to your current kernel source. In this case, the
65that the kernel source installed is <c>gentoo-sources-2.6.12-r4</c>: 65installed kernel source points to <c>gentoo-sources-2.6.15</c>. Your version
66may be different, so keep this in mind.
66</p> 67</p>
67 68
68<pre caption="Viewing the kernel source symlink"> 69<pre caption="Viewing the kernel source symlink">
69# <i>ls -l /usr/src/linux</i> 70# <i>ls -l /usr/src/linux</i>
70lrwxrwxrwx 1 root root 22 Mar 18 16:23 /usr/src/linux -&gt; linux-2.6.12-gentoo-r4 71lrwxrwxrwx 1 root root 22 Mar 18 16:23 /usr/src/linux -&gt; linux-2.6.15-gentoo
71</pre>
72
73<p>
74If the symlink doesn't point to the kernel source of your choice (note that
75<c>linux-2.6.12-gentoo-r4</c> is merely an example) you should change it to the
76desired kernel sources:
77</p>
78
79<pre caption="Changing the kernel source symlink">
80# <i>rm /usr/src/linux</i>
81# <i>cd /usr/src</i>
82# <i>ln -s linux-2.6.12-gentoo-r4 linux</i>
83</pre> 72</pre>
84 73
85<p> 74<p>
86It is now time to configure and compile your kernel source. You can use 75It is now time to configure and compile your kernel source. You can use
87<c>genkernel</c> to build a generic kernel similar to the one used by the 76<c>genkernel</c> to build a generic kernel similar to the one used by the
110Linux user ever has to perform. Nothing is less true, after configuring a 99Linux user ever has to perform. Nothing is less true, after configuring a
111couple of kernels you won't even remember it being that difficult ;) 100couple of kernels you won't even remember it being that difficult ;)
112</p> 101</p>
113 102
114<p> 103<p>
115Building a successful you must know what is in your system when 104However, one thing <e>is</e> true: you must know your system when you start
116you start configuring a kernel manually. Most information can be gathered by 105configuring a kernel manually. Most information can be gathered by emerging
117emerging pciutils <c>emerge pciutils</c> which contains <c>lspci</c>. You 106pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
118can
119be able to use <c>lspci</c> within the chrooted environment. You may safely 107be able to use <c>lspci</c> within the chrooted environment. You may safely
120ignore any <e>pcilib</e> warnings (like pcilib: cannot open 108ignore any <e>pcilib</e> warnings (like pcilib: cannot open
121/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run 109/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
122<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same. 110<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
123You can also run <c>lsmod</c> to see what kernel modules the Installation CD 111You can also run <c>lsmod</c> to see what kernel modules the Installation CD
126message logs from the successful boot that got you this far. Type <c>dmesg</c> 114message logs from the successful boot that got you this far. Type <c>dmesg</c>
127to see the kernel messages. 115to see the kernel messages.
128</p> 116</p>
129 117
130<p> 118<p>
131Now go to your kernel source directory and execute <c>make menuconfig</c>. This 119Now go to your kernel source directory, it's time to configure your kernel. It
132will fire up an ncurses-based configuration menu. 120is recommended that you add the default settings to your configuration by first
121running <c>make defconfig</c>. After the default configuration has been
122generated, run <c>make menuconfig</c> which will fire up an ncurses-based
123configuration menu.
133</p> 124</p>
134 125
135<pre caption="Invoking menuconfig"> 126<pre caption="Invoking menuconfig">
136# <i>cd /usr/src/linux</i> 127# <i>cd /usr/src/linux</i>
128# <i>make defconfig</i>
137# <i>make menuconfig</i> 129# <i>make menuconfig</i>
138</pre> 130</pre>
139 131
140<p> 132<p>
141You will be greeted with several configuration sections. We'll first list some 133You will be greeted with several configuration sections. We'll first list some
163 155
164<p> 156<p>
165Now 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.
166<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
167able to mount your partitions. Also select <c>/proc file system</c> and 159able to mount your partitions. Also select <c>/proc file system</c> and
168<c>Virtual memory</c>. Do <e>not</e> select the <c>/dev file system</c>. 160<c>Virtual memory</c>.
169</p> 161</p>
170 162
171<pre caption="Selecting necessary file systems"> 163<pre caption="Selecting necessary file systems">
172File systems ---&gt; 164File systems ---&gt;
173 Pseudo Filesystems ---&gt; 165 Pseudo Filesystems ---&gt;
174 [*] /proc file system support 166 [*] /proc file system support
175 [ ] /dev file system support (OBSOLETE)
176 [*] Virtual memory file system support (former shm fs) 167 [*] Virtual memory file system support (former shm fs)
177 168
178<comment>(Select one or more of the following options as needed by your system)</comment> 169<comment>(Select one or more of the following options as needed by your system)</comment>
179 &lt;*&gt; Second extended fs support 170 &lt;*&gt; Second extended fs support
180 &lt;*&gt; Ext3 journalling file system support 171 &lt;*&gt; Ext3 journalling file system support
302# <i>make &amp;&amp; make modules_install</i> 293# <i>make &amp;&amp; make modules_install</i>
303</pre> 294</pre>
304 295
305<p> 296<p>
306When the kernel has finished compiling, copy the kernel image to 297When the kernel has finished compiling, copy the kernel image to
307<path>/boot</path> (be sure that it is mounted properly on the Pegasos). 298<path>/boot</path> (be sure that it is mounted properly on Pegasos computers).
299If you are using BootX to boot, we'll copy the kernel later.
300</p>
301
302<p>
303Yaboot and BootX expect to use an uncompressed kernel unlike many other
304bootloaders. The uncompressed kernel is called vmlinux and it is placed in
305<path>/usr/src/linux</path> after the kernel has finished compiling. If you
306are using a Pegasos machine, the Pegasos firmware requires a compressed
307kernel called zImage.chrp which can be found in
308<path>/usr/src/linux/arch/ppc/boot/images</path>.
308</p> 309</p>
309 310
310<pre caption="Installing the kernel"> 311<pre caption="Installing the kernel">
311<comment>replace 2.6.12 with your kernel-version</comment> 312# <i>cd /usr/src/linux</i>
312(Apple/IBM) # <i>cp vmlinux /boot/kernel-2.6.12</i> 313<comment>replace &lt;kernel-version&gt; with your kernel version</comment>
314<comment>(Apple/IBM)</comment>
315# <i>cp vmlinux /boot/&lt;kernel-version&gt;</i>
316<comment>(Pegasos)</comment>
313(Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.6.12</i> 317# <i>cp arch/ppc/boot/images/zImage.chrp /boot/&lt;kernel-version&gt;</i>
314</pre>
315
316<p>
317It is also wise to copy over your kernel configuration file to
318<path>/boot</path>, just in case :)
319</p>
320
321<pre caption="Backing up your kernel configuration">
322# <i>cp .config /boot/config-2.6.12-gentoo-r4</i>
323</pre> 318</pre>
324 319
325<p> 320<p>
326Now continue with <uri link="#kernel_modules">Installing Separate Kernel 321Now continue with <uri link="#kernel_modules">Installing Separate Kernel
327Modules</uri>. 322Modules</uri>.
454before your "real" system starts up. Be sure to also copy down the required 449before your "real" system starts up. Be sure to also copy down the required
455boot arguments, these are required for a successful boot with genkernel. 450boot arguments, these are required for a successful boot with genkernel.
456</p> 451</p>
457 452
458<pre caption="Checking the created kernel image name and initrd"> 453<pre caption="Checking the created kernel image name and initrd">
459# <i>ls /boot/kernel* /boot/initrd*</i> 454# <i>ls /boot/kernel* /boot/initramfs*</i>
460</pre> 455</pre>
461 456
462<p> 457<p>
463Now, let's perform one more step to get our system to be more like the 458Now, let's perform one more step to get our system to be more like the
464Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects 459Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.20