/[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.41 Revision 1.42
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/2.5 --> 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.41 2006/07/21 09:13:28 rane Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml,v 1.42 2006/08/30 22:52:28 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.18</version> 11<version>7.0</version>
12<date>2006-07-20</date> 12<date>2006-08-30</date>
13 13
14<section> 14<section>
15<title>Timezone</title> 15<title>Timezone</title>
16<body> 16<body>
17 17
36<subsection> 36<subsection>
37<title>Choosing a Kernel</title> 37<title>Choosing a Kernel</title>
38<body> 38<body>
39 39
40<p> 40<p>
41The base that all distributions are built upon is the Linux kernel. It is the 41The core around which all distributions are built is the Linux kernel. It is the
42layer between the your programs and your system hardware. Gentoo provides its 42layer between the user programs and your system hardware. Gentoo provides its
43users several possible kernel sources. A full listing with description is 43users several possible kernel sources. A full listing with description is
44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
45Guide</uri>. 45Guide</uri>.
46</p> 46</p>
47 47
48<p> 48<p>
49We suggest using either <c>vanilla-sources</c> or <c>gentoo-sources</c> on PPC, 49We suggest using either <c>vanilla-sources</c> or <c>gentoo-sources</c> on PPC,
50which are both 2.6 kernels. The latter is available when you perform a 50which are both 2.6 kernels. The latter is available when you perform a
51networkless installation. So let's continue with <c>emerge</c>'ing the kernel 51networkless installation. So let's continue with <c>emerge</c>'ing the kernel
52sources. The <c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or 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 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> 54new install, but ensures proper creation of the <path>/usr/src/linux</path>
55symlink. 55symlink.
56</p> 56</p>
57 57
58<pre caption="Installing the kernel source"> 58<pre caption="Installing a kernel source">
59# <i>USE="-doc symlink" emerge gentoo-sources</i> 59# <i>USE="-doc symlink" emerge gentoo-sources</i>
60</pre> 60</pre>
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
66may be different, so keep this in mind. 66may be different, so keep this in mind.
67</p> 67</p>
68 68
69<pre caption="Viewing the kernel source symlink"> 69<pre caption="Viewing the kernel source symlink">
70# <i>ls -l /usr/src/linux</i> 70# <i>ls -l /usr/src/linux</i>
71lrwxrwxrwx 1 root root 22 Mar 18 16:23 /usr/src/linux -&gt; linux-2.6.15-gentoo 71lrwxrwxrwx 1 root root 22 Mar 18 16:23 /usr/src/linux -&gt; linux-2.6.15
72</pre> 72</pre>
73 73
74<p> 74<p>
75It is now time to configure and compile your kernel source. You can use 75Now it is time to configure and compile your kernel source. You
76<c>genkernel</c> to build a generic kernel similar to the one used by the 76can use <c>genkernel</c> for this, which will build a generic kernel as used
77Installation CD, or you can perform a manual configuration to best suit your 77by the Installation CD. We explain the "manual" configuration first though, as
78system. 78it is the best way to optimize your environment.
79</p> 79</p>
80 80
81<p> 81<p>
82If you want to manually configure your kernel, continue now with <uri 82If you want to manually configure your kernel, continue now with <uri
83link="#manual">Default: Manual Configuration</uri>. If you want to use 83link="#manual">Default: Manual Configuration</uri>. If you want to use
94<title>Introduction</title> 94<title>Introduction</title>
95<body> 95<body>
96 96
97<p> 97<p>
98Manually configuring a kernel is often seen as the most difficult procedure a 98Manually configuring a kernel is often seen as the most difficult procedure a
99Linux 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
100couple of kernels you won't even remember it being that difficult ;) 100couple of kernels you don't even remember that it was difficult ;)
101</p> 101</p>
102 102
103<p> 103<p>
104However, one thing <e>is</e> true: you must know your system when you start 104However, one thing <e>is</e> true: you must know your system when you start
105configuring a kernel manually. Most information can be gathered by emerging 105configuring a kernel manually. Most information can be gathered by emerging
114message 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>
115to see the kernel messages. 115to see the kernel messages.
116</p> 116</p>
117 117
118<p> 118<p>
119Now go to your kernel source directory, it's time to configure your kernel. It 119Now, go to your kernel source directory, it's time to configure your kernel.
120is recommended that you add the default settings to your configuration by first 120It is recommended that you add the default settings to your configuration by
121running <c>make defconfig</c> (for 2.6.15 and earlier kernels) or 121first running <c>make defconfig</c>. After the default configuration has been
122<c>make pmac32_defconfig</c> (for 2.6.16 and later kernels). After the default 122generated, run <c>make menuconfig</c> which will fire up an ncurses-based
123configuration has been generated, run <c>make menuconfig</c> which will fire 123configuration menu.
124up an ncurses-based configuration menu.
125</p> 124</p>
126 125
127<pre caption="Invoking menuconfig"> 126<pre caption="Invoking menuconfig">
128# <i>cd /usr/src/linux</i> 127# <i>cd /usr/src/linux</i>
129<comment>Substitute defconfig for pmac32_defconfig below if using a 2.6.15 or earlier kernel</comment>
130# <i>make pmac32_defconfig</i> 128# <i>make defconfig</i>
131# <i>make menuconfig</i> 129# <i>make menuconfig</i>
132</pre> 130</pre>
133 131
134<p> 132<p>
135You 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
146<p> 144<p>
147First of all, activate the use of development and experimental code/drivers. 145First of all, activate the use of development and experimental code/drivers.
148You need this, otherwise some very important code/drivers won't show up: 146You need this, otherwise some very important code/drivers won't show up:
149</p> 147</p>
150 148
151<pre caption="Selecting experimental code/drivers, General setup"> 149<pre caption="Selecting experimental code/drivers">
152Code maturity level options ---&gt; 150Code maturity level options ---&gt;
153 [*] Prompt for development and/or incomplete code/drivers 151 [*] Prompt for development and/or incomplete code/drivers
154</pre> 152</pre>
155 153
156<p> 154<p>
157Now go to <c>File Systems</c> and select support for the filesystems you use. 155Now go to <c>File Systems</c> and select support for the filesystems you use.
158<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 156<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
159able to mount your partitions. Also select <c>/proc file system</c> and 157able to mount your partitions. Also select the <c>/proc file system</c> and
160<c>Virtual memory</c>. 158<c>Virtual memory</c>. Make sure that you also enable support for Amiga
159partitions if you are using a Pegasos, or Macintosh partitions if you are using
160an Apple computer.
161</p> 161</p>
162 162
163<pre caption="Selecting necessary file systems"> 163<pre caption="Selecting necessary file systems">
164File systems ---&gt; 164File systems ---&gt;
165 Pseudo Filesystems ---&gt; 165 Pseudo Filesystems ---&gt;
166 [*] /proc file system support 166 [*] /proc file system support
167 [*] Virtual memory file system support (former shm fs) 167 [*] Virtual memory file system support (former shm fs)
168 Partition Types ---&gt;
169 [*] Amiga partition table support
170 [*] Macintosh partition map support
168 171
169<comment>(Select one or more of the following options as needed by your system)</comment> 172<comment>(Select one or more of the following options as needed by your system)</comment>
173 &lt;*&gt; Reiserfs support
174 &lt;*&gt; Ext3 journalling file system support
170 &lt;*&gt; Second extended fs support 175 &lt;*&gt; Second extended fs support
171 &lt;*&gt; Ext3 journalling file system support
172 &lt;*&gt; Reiserfs support
173 &lt;*&gt; XFS filesystem support 176 &lt;*&gt; XFS filesystem support
174</pre> 177</pre>
175 178
176<p> 179<p>
177If you are using PPPoE to connect to the Internet or you are using a dial-up 180If you are using PPPoE to connect to the Internet or you are using a dial-up
213compilation failures and random segfaults. It is <e>strongly</e> suggested 216compilation failures and random segfaults. It is <e>strongly</e> suggested
214that you do not use this feature. 217that you do not use this feature.
215</p> 218</p>
216 219
217<pre caption="Ensure the Preemptible Kernel Option is Off"> 220<pre caption="Ensure the Preemptible Kernel Option is Off">
218Platform options ---&gt; 221Kernel options ---&gt;
219 [ ] Preemptible Kernel 222 Preemption Model (No Forced Preemption (Server))
220</pre> 223</pre>
221 224
222<p> 225<p>
223If you're booting from Firewire, you'll need to enable these options. If you 226If you're booting from Firewire, you'll need to enable these options. If you do
224do not want to compile in support, you'll need to include these modules and 227not want to compile in support, you'll need to include these modules and their
225their dependencies in an initrd. 228dependencies in an initrd.
226</p> 229</p>
227 230
228<pre caption="Enable support for firewire devices on boot"> 231<pre caption="Enable support for firewire devices on boot">
229Device Drivers ---&gt; 232Device Drivers ---&gt;
230 IEEE 1394 (FireWire) support ---&gt; 233 IEEE 1394 (FireWire) support ---&gt;
332<body> 335<body>
333 336
334<p> 337<p>
335You should list the modules you want automatically loaded in 338You should list the modules you want automatically loaded in
336<path>/etc/modules.autoload.d/kernel-2.6</path>. 339<path>/etc/modules.autoload.d/kernel-2.6</path>.
337You can add extra options to the modules too if needed. 340You can add extra options to the modules too if you want.
338</p> 341</p>
339 342
340<p> 343<p>
341To view all available modules, run the following <c>find</c> command. Don't 344To view all available modules, run the following <c>find</c> command. Don't
342forget to substitute "&lt;kernel version&gt;" with the version of the kernel you 345forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
382Now that your kernel source tree is installed, it's now time to compile your 385Now that your kernel source tree is installed, it's now time to compile your
383kernel by using our <c>genkernel</c> script to automatically build a kernel for 386kernel by using our <c>genkernel</c> script to automatically build a kernel for
384you. <c>genkernel</c> works by configuring a kernel nearly identically to the 387you. <c>genkernel</c> works by configuring a kernel nearly identically to the
385way our Installation CD kernel is configured. This means that when you use 388way our Installation CD kernel is configured. This means that when you use
386<c>genkernel</c> to build your kernel, your system will generally detect all 389<c>genkernel</c> to build your kernel, your system will generally detect all
387your hardware at boot-time, just like our Installation CD does. 390your hardware at boot-time, just like our Installation CD does. Because genkernel
388Because genkernel doesn't require any manual kernel configuration, it is an 391doesn't require any manual kernel configuration, it is an ideal solution for
389ideal solution for those users who may not be comfortable compiling their own 392those users who may not be comfortable compiling their own kernels.
390kernels.
391</p> 393</p>
392 394
393<p> 395<p>
394Now, let's see how to use genkernel. First, emerge the genkernel ebuild: 396Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
395</p> 397</p>
411If you are using firewire or USB to boot, you'll need to add modules to the 413If you are using firewire or USB to boot, you'll need to add modules to the
412initrd. Edit <path>/usr/share/genkernel/ppc/modules_load</path> and change 414initrd. Edit <path>/usr/share/genkernel/ppc/modules_load</path> and change
413<c>MODULES_FIREWIRE="ieee1394 ohci1394 sbp2"</c> for firewire support or 415<c>MODULES_FIREWIRE="ieee1394 ohci1394 sbp2"</c> for firewire support or
414<c>MODULES_USB="usbcore ohci-hcd ehci-hcd usb-storage"</c> for USB support. 416<c>MODULES_USB="usbcore ohci-hcd ehci-hcd usb-storage"</c> for USB support.
415</p> 417</p>
418
416 419
417<p> 420<p>
418Now, compile your kernel sources by running <c>genkernel --genzimage all</c>. 421Now, compile your kernel sources by running <c>genkernel --genzimage all</c>.
419For Pegasos, we will need to use a different config and create a zImage instead 422For Pegasos, we will need to use a different config and create a zImage instead
420of the vmlinux kernel used on Apple machines. Be aware, as <c>genkernel</c> 423of the vmlinux kernel used on Apple machines. Be aware, as <c>genkernel</c>
423</p> 426</p>
424 427
425<p> 428<p>
426Note that, if your partition where the kernel should be located doesn't use ext2 429Note that, if your partition where the kernel should be located doesn't use ext2
427or ext3 as filesystem you might need to manually configure your kernel using 430or ext3 as filesystem you might need to manually configure your kernel using
428<c>genkernel --menuconfig --genzimage all</c> and add support for your 431<c>genkernel --menuconfig all</c> and add support for your
429filesystem <e>in</e> the kernel (i.e. <e>not</e> as a module). Users of EVMS2 or 432filesystem <e>in</e> the kernel (i.e. <e>not</e> as a module). Users of EVMS2 or
430LVM2 will probably want to add <c>--evms2</c> or <c>--lvm2</c> as argument as 433LVM2 will probably want to add <c>--evms2</c> or <c>--lvm2</c> as argument as
431well. 434well.
432</p> 435</p>
433 436
453<pre caption="Checking the created kernel image name and initrd"> 456<pre caption="Checking the created kernel image name and initrd">
454# <i>ls /boot/kernel* /boot/initramfs*</i> 457# <i>ls /boot/kernel* /boot/initramfs*</i>
455</pre> 458</pre>
456 459
457<p> 460<p>
458Now, let's perform one more step to get our system to be more like the 461If you want your system to be more like the Installation CD you should,
459Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects 462when your Gentoo installation is over, emerge <c>coldplug</c>. While the
460hardware that is needed to boot your system, <c>coldplug</c> autodetects 463initrd autodetects hardware that is needed to boot your system,
461everything else. To emerge and enable <c>coldplug</c>, type the following: 464<c>coldplug</c> autodetects everything else. <c>coldplug</c> is available as one
465of the packages on the Package CD.
462</p> 466</p>
463 467
464<pre caption="Emerging and enabling coldplug"> 468<pre caption="Emerging and enabling coldplug">
469<comment>(Do this after the installation, during the GRP installation instructions)</comment>
465# <i>emerge coldplug</i> 470# <i>emerge -k coldplug</i>
466# <i>rc-update add coldplug boot</i> 471# <i>rc-update add coldplug boot</i>
467</pre> 472</pre>
468 473
469<p> 474<p>
475If you want your system to react to hotplugging events, you will need to install
476and setup <c>hotplug</c> as well:
477</p>
478
479<pre caption="Emerging and enabling hotplug">
480# <i>emerge hotplug</i>
481# <i>rc-update add hotplug default</i>
482</pre>
483
484<p>
470Now continue with <uri link="?part=1&amp;chap=8">Configuring your System</uri>. 485Now continue with <uri link="?part=1&amp;chap=8">Configuring your System</uri>.
471</p> 486</p>
472 487
473</body> 488</body>
474</section> 489</section>
475 490
476</sections> 491</sections>
492

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.20