/[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.51
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.51 2007/05/20 04:16:25 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.11</version> 11<version>8.2</version>
12<date>2005-08-09</date> 12<date>2007-05-19</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
24GMT+8.
22</p> 25</p>
23 26
24<pre caption="Setting the timezone information"> 27<pre caption="Setting the timezone information">
25# <i>ls /usr/share/zoneinfo</i> 28# <i>ls /usr/share/zoneinfo</i>
26<comment>(Suppose you want to use GMT)</comment> 29<comment>(Suppose you want to use GMT)</comment>
27# <i>ln -sf /usr/share/zoneinfo/GMT /etc/localtime</i> 30# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
31</pre>
32
33<p>
34Next, define the timezone you just used in <path>/etc/conf.d/clock</path> so
35that further upgrades of the <c>sys-libs/timezone-data</c> package can update
36<path>/etc/localtime</path> automatically.
37</p>
38
39<pre caption="Setting the TIMEZONE variable in /etc/conf.d/clock">
40# <i>nano -w /etc/conf.d/clock</i>
41TIMEZONE="GMT"
28</pre> 42</pre>
29 43
30</body> 44</body>
31</section> 45</section>
32<section> 46<section>
33<title>Installing the Sources</title> 47<title>Installing the Kernel Sources</title>
34<subsection> 48<subsection>
35<title>Choosing a Kernel</title> 49<title>Choosing a Kernel</title>
36<body> 50<body>
37 51
38<p> 52<p>
39The base that all distributions are built upon is the Linux kernel. It is the 53The core around which all distributions are built is the Linux kernel. It is the
40layer between the your programs and your system hardware. Gentoo provides its 54layer between the user programs and your system hardware. Gentoo provides its
41users several possible kernel sources. A full listing with description is 55users several possible kernels to choose from. A full listing with description
56is available at the
42available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 57<uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel Guide</uri>.
43Guide</uri>.
44</p>
45
46<p> 58</p>
47We suggest using either <c>vanilla-sources</c> or <c>gentoo-sources</c> 59
48on PPC, which are both 2.6 kernels. The latter is available when you
49perform a networkless installation. So let's continue with <c>emerge</c>'ing
50the kernel sources:
51</p> 60<p>
61We suggest using <c>gentoo-sources</c> on PPC, which is a recent 2.6 kernel.
62</p>
52 63
53<pre caption="Installing the kernel source"> 64<pre caption="Installing a kernel source">
54# <i>emerge gentoo-sources</i> 65# <i>emerge gentoo-sources</i>
55</pre> 66</pre>
56 67
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
62<p> 68<p>
63If you take a look in <path>/usr/src</path> you should see a symlink named 69If 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 70<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>: 71installed kernel source points to <c>gentoo-sources-<keyval
72id="kernel-version"/></c>. Your version may be different, so keep this in mind.
66</p> 73</p>
67 74
68<pre caption="Viewing the kernel source symlink"> 75<pre caption="Viewing the kernel source symlink">
69# <i>ls -l /usr/src/linux</i> 76# <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 77lrwxrwxrwx 1 root root 22 Mar 18 16:23 /usr/src/linux -&gt; linux-<keyval id="kernel-gentoo"/>
71</pre> 78</pre>
72 79
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> 80<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>
84
85<p>
86It is now time to configure and compile your kernel source. You can use 81Now it is 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 82<c>genkernel</c> for this, which will build a generic kernel as used by the
88Installation CD, or you can perform a manual configuration to best suit your 83Installation CD. We explain the "manual" configuration first though, as it is
89system. 84a more efficient configuration.
90</p> 85</p>
91 86
92<p> 87<p>
93If you want to manually configure your kernel, continue now with <uri 88If you want to manually configure your kernel, continue now with <uri
94link="#manual">Default: Manual Configuration</uri>. If you want to use 89link="#manual">Default: Manual Configuration</uri>. If you want to use
105<title>Introduction</title> 100<title>Introduction</title>
106<body> 101<body>
107 102
108<p> 103<p>
109Manually configuring a kernel is often seen as the most difficult procedure a 104Manually configuring a kernel is often seen as the most difficult procedure a
110Linux user ever has to perform. Nothing is less true, after configuring a 105Linux user ever has to perform. Nothing is less true -- after configuring a
111couple of kernels you won't even remember it being that difficult ;) 106few kernels you won't even remember that it was difficult ;)
112</p>
113
114<p> 107</p>
115Building a successful you must know what is in your system when 108
109<p>
110However, 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 111configuring a kernel manually. Most information can be gathered by emerging
117emerging pciutils <c>emerge pciutils</c> which contains <c>lspci</c>. You 112pciutils (<c>emerge pciutils</c>) which contains the program
118can 113<c>lspci</c>. You will now be able to use <c>lspci</c> within the chrooted
119be able to use <c>lspci</c> within the chrooted environment. You may safely 114environment. You may safely ignore any <e>pcilib</e> warnings (such as pcilib:
120ignore any <e>pcilib</e> warnings (like pcilib: cannot open
121/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run 115cannot open /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively,
122<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same. 116you can run <c>lspci</c> from a <e>non-chrooted</e> environment. The results
123You can also run <c>lsmod</c> to see what kernel modules the Installation CD 117are the same. You can also run <c>lsmod</c> to see what kernel modules the
124uses (it might provide you with a nice hint on what to enable). Another place 118Installation CD uses (it might provide you with a nice hint on what to enable).
125to look for clues as to what components to enable is to check the kernel 119Another place to look for clues as to what components to enable is to check the
126message logs from the successful boot that got you this far. Type <c>dmesg</c> 120kernel message logs from the successful boot that got you this far. Type
127to see the kernel messages. 121<c>dmesg</c> to see these kernel messages.
128</p>
129
130<p> 122</p>
131Now go to your kernel source directory and execute <c>make menuconfig</c>. This 123
132will fire up an ncurses-based configuration menu. 124<p>
125Now, go to your kernel source directory, it's time to configure your kernel.
126Start by configuring a kernel that will boot on most 32 Bit PowerPC machines
127by first running <c>make pmac32_defconfig</c>. After the default configuration
128has been generated, run <c>make menuconfig</c> to start an ncurses-based
129configuration menu.
133</p> 130</p>
134 131
135<pre caption="Invoking menuconfig"> 132<pre caption="Invoking menuconfig">
136# <i>cd /usr/src/linux</i> 133# <i>cd /usr/src/linux</i>
134# <i>make pmac32_defconfig</i>
137# <i>make menuconfig</i> 135# <i>make menuconfig</i>
138</pre> 136</pre>
139 137
140<p> 138<p>
141You will be greeted with several configuration sections. We'll first list some 139You will be greeted with several configuration sections. We'll first list some
152<p> 150<p>
153First of all, activate the use of development and experimental code/drivers. 151First of all, activate the use of development and experimental code/drivers.
154You need this, otherwise some very important code/drivers won't show up: 152You need this, otherwise some very important code/drivers won't show up:
155</p> 153</p>
156 154
157<pre caption="Selecting experimental code/drivers, General setup"> 155<pre caption="Selecting experimental code/drivers">
158Code maturity level options ---&gt; 156Code maturity level options ---&gt;
159 [*] Prompt for development and/or incomplete code/drivers 157 [*] Prompt for development and/or incomplete code/drivers
160General setup --->
161 [*] Support for hot-pluggable devices
162</pre> 158</pre>
163 159
164<p> 160<p>
165Now go to <c>File Systems</c> and select support for the filesystems you use. 161Now 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 162<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 163able to mount your partitions. Also select the <c>/proc file system</c> and
168<c>Virtual memory</c>. Do <e>not</e> select the <c>/dev file system</c>. 164<c>Virtual memory</c>. Make sure that you also enable support for Amiga
165partitions if you are using a Pegasos, or Macintosh partitions if you are using
166an Apple computer.
169</p> 167</p>
170 168
171<pre caption="Selecting necessary file systems"> 169<pre caption="Selecting necessary file systems">
172File systems ---&gt; 170File systems ---&gt;
173 Pseudo Filesystems ---&gt; 171 Pseudo Filesystems ---&gt;
172<comment>(/proc may already be forced on by your configuration, if so, you'll see --- instead)</comment>
174 [*] /proc file system support 173 [*] /proc file system support
175 [ ] /dev file system support (OBSOLETE)
176 [*] Virtual memory file system support (former shm fs) 174 [*] Virtual memory file system support (former shm fs)
175 Partition Types ---&gt;
176 [*] Amiga partition table support
177 [*] Macintosh partition map support
177 178
178<comment>(Select one or more of the following options as needed by your system)</comment> 179<comment>(Select one or more of the following options as needed by your system)</comment>
180 &lt;*&gt; Reiserfs support
181 &lt;*&gt; Ext3 journalling file system support
179 &lt;*&gt; Second extended fs support 182 &lt;*&gt; Second extended fs support
180 &lt;*&gt; Ext3 journalling file system support
181 &lt;*&gt; Reiserfs support
182 &lt;*&gt; XFS filesystem support 183 &lt;*&gt; XFS filesystem support
184</pre>
185
186<p>
187Users of NewWorld and OldWorld machines will want HFS support as well. OldWorld
188users require it for copying compiled kernels to the MacOS partition. NewWorld
189users require it for configuring the special Apple_Bootstrap partition:
190</p>
191
192<pre caption="Activating HFS support">
193File Systems ---&gt;
194 Miscellaneous filesystems ---&gt;
195 &lt;*&gt; Apple Macintosh file system support
196 &lt;*&gt; Apple Extended HFS file system support
183</pre> 197</pre>
184 198
185<p> 199<p>
186If you are using PPPoE to connect to the Internet or you are using a dial-up 200If you are using PPPoE to connect to the Internet or you are using a dial-up
187modem, you will need the following options in the kernel: 201modem, you will need the following options in the kernel:
188</p> 202</p>
189 203
190<pre caption="Selecting PPPoE necessary drivers"> 204<pre caption="Selecting PPPoE necessary drivers">
191Device Drivers ---&gt; 205Device Drivers ---&gt;
192 Networking support ---&gt; 206 Network device support ---&gt;
193 &lt;*&gt; PPP (point-to-point protocol) support 207 &lt;*&gt; PPP (point-to-point protocol) support
194 &lt;*&gt; PPP support for async serial ports 208 &lt;*&gt; PPP support for async serial ports
195 &lt;*&gt; PPP support for sync tty ports 209 &lt;*&gt; PPP support for sync tty ports
196</pre> 210</pre>
197 211
198<p> 212<p>
199The two compression options won't harm but are not definitely needed, neither 213The two compression options won't harm but are not always needed. The <c>PPP
200does the <c>PPP over Ethernet</c> option, that might only be used by 214over Ethernet</c> option might only be used by <c>ppp</c> when configured to
201<c>rp-pppoe</c> when configured to do kernel mode PPPoE. 215perform kernel mode PPPoE.
202</p>
203
204<p> 216</p>
205If you require it, don't forget to include support in the kernel for your 217
206ethernet card.
207</p> 218<p>
208 219Don't forget to include support in the kernel for your ethernet card! Most
220newer Apple computers use the SunGEM ethernet driver. Older iMacs commonly use
221the BMAC driver.
209<p> 222</p>
210Users of NewWorld and OldWorld machines will want HFS support as well. OldWorld 223
211users require it for copying compiled kernels to the MacOS partition. NewWorld 224<pre caption="Selecting the network driver">
212users require it for configuring the special Apple_Bootstrap partition: 225Device Drivers ---&gt;
226 Network device support ---&gt;
227 Ethernet (10 or 100Mbit) ---&gt;
228 [*] Ethernet (10 or 100Mbit)
229 &lt;*&gt; Generic Media Independent Interface device support
230 &lt;*&gt; MACE (Power Mac ethernet) support
231 &lt;*&gt; BMAC (G3 ethernet) support
232 &lt;*&gt; Sun GEM support
233</pre>
234
213</p> 235<p>
214
215<pre caption="Activating HFS support">
216File Systems ---&gt;
217 [*] HFS Support
218</pre>
219
220<p>
221At this time, kernel preemption is still unstable on PPC and may cause 236At this time, full kernel preemption may still be unstable on PPC and may cause
222compilation failures and random segfaults. It is <e>strongly</e> suggested 237compilation failures and random segfaults. It is <e>strongly</e> suggested
223that you do not use this feature. 238that you do not use this feature. Both <e>Voluntary Preemption</e> and
239<e>No Forced Preemption</e> should be safe.
224</p> 240</p>
225 241
226<pre caption="Ensure the Preemptible Kernel Option is Off"> 242<pre caption="Ensure the Preemptible Kernel Option is Off">
227Platform options ---&gt; 243Kernel options ---&gt;
228 [ ] Preemptible Kernel 244<comment>(Select One)</comment>
245 Preemption Model
246 (X) No Forced Preemption (Server)
247 (X) Voluntary Kernel Preemption (Desktop)
229</pre> 248</pre>
230 249
231<p> 250<p>
232If you're booting from Firewire, you'll need to enable these options. If you 251If you're booting from Firewire, you'll need to enable these options. If you do
233do not want to compile in support, you'll need to include these modules and 252not want to compile in support, you'll need to include these modules and their
234their dependencies in an initrd. 253dependencies in an initrd.
235</p> 254</p>
236 255
237<pre caption="Enable support for firewire devices on boot"> 256<pre caption="Enable support for firewire devices on boot">
238Device Drivers ---&gt; 257Device Drivers ---&gt;
239 IEEE 1394 (FireWire) support ---&gt; 258 IEEE 1394 (FireWire) support ---&gt;
261boot. If you are using an NVIDIA based chipset, you should use the OpenFirmware 280boot. If you are using an NVIDIA based chipset, you should use the OpenFirmware
262framebuffer. If you are using an ATI based chipset, you should select the 281framebuffer. If you are using an ATI based chipset, you should select the
263framebuffer driver based upon your chipset (Mach64, Rage128 or Radeon). 282framebuffer driver based upon your chipset (Mach64, Rage128 or Radeon).
264</p> 283</p>
265 284
266<pre caption="Chosing a Framebuffer Driver"> 285<pre caption="Choosing a Framebuffer Driver">
267Device Drivers ---&gt; 286Device Drivers ---&gt;
268 Graphics support ---&gt; 287 Graphics support ---&gt;
269 &lt;*&gt; Support for frame buffer devices 288 &lt;*&gt; Support for frame buffer devices
270 [*] Open Firmware frame buffer device support 289 [*] Open Firmware frame buffer device support
271 &lt;*&gt; ATI Radeon display support 290 &lt;*&gt; ATI Radeon display support
276</pre> 295</pre>
277 296
278<note> 297<note>
279If you select more than one framebuffer device, it may default to a less than 298If you select more than one framebuffer device, it may default to a less than
280optimal driver. Either use only one framebuffer device or specify which 299optimal driver. Either use only one framebuffer device or specify which
281to use by passing the driver to use to the kernel on boot such as 300to use by passing the driver to use to the kernel on boot by appending a video
282<c>video=radeonfb</c>. 301line such as: <c>video=radeonfb</c>.
283</note> 302</note>
284 303
285<p> 304<p>
286When you're done configuring your kernel, continue with <uri 305When you're done configuring your kernel, continue with <uri
287link="#compiling">Compiling and Installing</uri>. 306link="#compiling">Compiling and Installing</uri>.
293<title>Compiling and Installing</title> 312<title>Compiling and Installing</title>
294<body> 313<body>
295 314
296<p> 315<p>
297Now that your kernel is configured, it is time to compile and install it. Exit 316Now that your kernel is configured, it is time to compile and install it. Exit
298the configuration and run the commands which will compile the kernel: 317the configuration menu and run the following commands:
299</p> 318</p>
300 319
301<pre caption="Compiling the kernel"> 320<pre caption="Compiling the kernel">
302# <i>make &amp;&amp; make modules_install</i> 321# <i>make &amp;&amp; make modules_install</i>
303</pre> 322</pre>
304 323
305<p> 324<p>
306When the kernel has finished compiling, copy the kernel image to 325When the kernel has finished compiling, copy the kernel image to
307<path>/boot</path> (be sure that it is mounted properly on the Pegasos). 326<path>/boot</path> as shown below. If you have a separate boot partition, as
327on Pegasos computers, be sure that it is mounted properly. If you are using
328BootX to boot, we'll copy the kernel later.
329</p>
330
331<p>
332Yaboot and BootX expect to use an uncompressed kernel unlike many other
333bootloaders. The uncompressed kernel is called vmlinux and it is placed in
334<path>/usr/src/linux</path> after the kernel has finished compiling. If you are
335using a Pegasos machine, the Pegasos firmware requires a compressed kernel
336called zImage which can be found in
337<path>/usr/src/linux/arch/powerpc/boot/images</path>.
308</p> 338</p>
309 339
310<pre caption="Installing the kernel"> 340<pre caption="Installing the kernel">
311<comment>replace 2.6.12 with your kernel-version</comment> 341# <i>cd /usr/src/linux</i>
312(Apple/IBM) # <i>cp vmlinux /boot/kernel-2.6.12</i> 342<comment>Note, your kernel version might be different</comment>
313(Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.6.12</i> 343<comment>(Apple/IBM)</comment>
314</pre> 344# <i>cp vmlinux /boot/<keyval id="kernel-name"/></i>
315 345<comment>(Pegasos)</comment>
316<p> 346# <i>cp arch/powerpc/boot/images/zImage /boot/&lt;kernel-version&gt;</i>
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> 347</pre>
324 348
325<p> 349<p>
326Now continue with <uri link="#kernel_modules">Installing Separate Kernel 350Now continue with <uri link="#kernel_modules">Installing Separate Kernel
327Modules</uri>. 351Modules</uri>.
335<subsection> 359<subsection>
336<title>Configuring the Modules</title> 360<title>Configuring the Modules</title>
337<body> 361<body>
338 362
339<p> 363<p>
340You should list the modules you want automatically loaded in 364You should list the modules you want automatically loaded in
341<path>/etc/modules.autoload.d/kernel-2.6</path>. 365<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
342You can add extra options to the modules too if needed. 366the modules if required.
343</p> 367</p>
344 368
345<p> 369<p>
346To view all available modules, run the following <c>find</c> command. Don't 370To view all available modules, run the following <c>find</c> command. Don't
347forget to substitute "&lt;kernel version&gt;" with the version of the kernel you 371forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
351<pre caption="Viewing all available modules"> 375<pre caption="Viewing all available modules">
352# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i> 376# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
353</pre> 377</pre>
354 378
355<p> 379<p>
356For instance, to automatically load the <c>3c59x.o</c> module, edit the 380For instance, to automatically load the <c>3c59x</c> module, edit the
357<path>kernel-2.6</path> file and enter the module 381<path>kernel-2.6</path> file and add the module to it, one module on a line.
358name in it.
359</p> 382</p>
360 383
361<pre caption="Editing /etc/modules.autoload.d/kernel-2.6"> 384<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
362# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i> 385# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
363</pre> 386</pre>
377<section id="genkernel"> 400<section id="genkernel">
378<title>Alternative: Using genkernel</title> 401<title>Alternative: Using genkernel</title>
379<body> 402<body>
380 403
381<p> 404<p>
382If you are reading this section, you have chosen to use our <c>genkernel</c>
383script to configure your kernel for you.
384</p>
385
386<p>
387Now that your kernel source tree is installed, it's now time to compile your 405Now that your kernel source tree is installed, it's now time to compile your
388kernel by using our <c>genkernel</c> script to automatically build a kernel for 406kernel by using our <c>genkernel</c> script to automatically build a kernel for
389you. <c>genkernel</c> works by configuring a kernel nearly identically to the 407you. <c>genkernel</c> works by configuring a kernel nearly identically to the
390way our Installation CD kernel is configured. This means that when you use 408way our Installation CD kernel is configured. This means that when you use
391<c>genkernel</c> to build your kernel, your system will generally detect all 409<c>genkernel</c> to build your kernel, your system will generally detect all
392your hardware at boot-time, just like our Installation CD does. 410your hardware at boot-time, just like our Installation CD does. Because
393Because genkernel doesn't require any manual kernel configuration, it is an 411genkernel doesn't require any manual kernel configuration, it is an ideal
394ideal solution for those users who may not be comfortable compiling their own 412solution for those users who may not be comfortable compiling their own
395kernels. 413kernels.
396</p> 414</p>
397 415
398<p> 416<p>
399Now, let's see how to use genkernel. First, emerge the genkernel ebuild: 417Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
416If you are using firewire or USB to boot, you'll need to add modules to the 434If you are using firewire or USB to boot, you'll need to add modules to the
417initrd. Edit <path>/usr/share/genkernel/ppc/modules_load</path> and change 435initrd. Edit <path>/usr/share/genkernel/ppc/modules_load</path> and change
418<c>MODULES_FIREWIRE="ieee1394 ohci1394 sbp2"</c> for firewire support or 436<c>MODULES_FIREWIRE="ieee1394 ohci1394 sbp2"</c> for firewire support or
419<c>MODULES_USB="usbcore ohci-hcd ehci-hcd usb-storage"</c> for USB support. 437<c>MODULES_USB="usbcore ohci-hcd ehci-hcd usb-storage"</c> for USB support.
420</p> 438</p>
439
440<p>
441Before compiling your sources, the fstab needs a slight adjustment. The rest of
442the fstab will be completed during a later step, so don't worry about the
443details now. If you did not create a separate boot partition (NOT bootstrap,
444that's different), remove the line referencing <path>/boot</path> from
445<path>/etc/fstab</path>. This will need to be done on most Apple computers.
446</p>
447
448<pre caption="Removing /boot from /etc/fstab on machines without a boot partition">
449# <i>nano -w /etc/fstab</i>
450<comment>Remove this line</comment>
451/dev/BOOT /boot ext2 noauto,noatime 1 2
452</pre>
421 453
422<p> 454<p>
423Now, compile your kernel sources by running <c>genkernel --genzimage all</c>. 455Now, compile your kernel sources by running <c>genkernel --genzimage all</c>.
424For Pegasos, we will need to use a different config and create a zImage instead 456For Pegasos, we will need to use a different config and create a zImage instead
425of the vmlinux kernel used on Apple machines. Be aware, as <c>genkernel</c> 457of the vmlinux kernel used on Apple machines. Be aware, as <c>genkernel</c>
428</p> 460</p>
429 461
430<p> 462<p>
431Note that, if your partition where the kernel should be located doesn't use ext2 463Note that, if your partition where the kernel should be located doesn't use ext2
432or ext3 as filesystem you might need to manually configure your kernel using 464or ext3 as filesystem you might need to manually configure your kernel using
433<c>genkernel --menuconfig --genzimage all</c> and add support for your 465<c>genkernel --menuconfig all</c> and add support for your
434filesystem <e>in</e> the kernel (i.e. <e>not</e> as a module). Users of EVMS2 or 466filesystem <e>in</e> the kernel (i.e. <e>not</e> as a module). Users of EVMS2 or
435LVM2 will probably want to add <c>--evms2</c> or <c>--lvm2</c> as argument as 467LVM2 will probably want to add <c>--evms2</c> or <c>--lvm2</c> as an argument as
436well. 468well.
437</p> 469</p>
438 470
439<pre caption="Running genkernel"> 471<pre caption="Running genkernel">
440# <i>genkernel all</i> 472# <i>genkernel all</i>
446 478
447<p> 479<p>
448Once <c>genkernel</c> completes, a kernel, full set of modules and 480Once <c>genkernel</c> completes, a kernel, full set of modules and
449<e>initial root disk</e> (initrd) will be created. We will use the kernel 481<e>initial root disk</e> (initrd) will be created. We will use the kernel
450and initrd when configuring a boot loader later in this document. Write 482and initrd when configuring a boot loader later in this document. Write
451down the names of the kernel and initrd as you will need it when writing 483down the names of the kernel and initrd as you will need them when writing
452the bootloader configuration file. The initrd will be started immediately after 484the bootloader configuration file. The initrd will be started immediately after
453booting to perform hardware autodetection (just like on the Installation CD) 485booting to perform hardware autodetection (just like on the Installation CD)
454before your "real" system starts up. Be sure to also copy down the required 486before your "real" system starts up. Be sure to also copy down the required
455boot arguments, these are required for a successful boot with genkernel. 487boot arguments, these are required for a successful boot with genkernel.
456</p> 488</p>
457 489
458<pre caption="Checking the created kernel image name and initrd"> 490<pre caption="Checking the created kernel image name and initrd">
459# <i>ls /boot/kernel* /boot/initrd*</i> 491<comment>Note, your kernel version might be different</comment>
460</pre> 492# <i>ls /boot/kernel-genkernel-ppc-<keyval id="kernel-gentoo"/> /boot/initramfs-genkernel-ppc-<keyval id="kernel-gentoo"/></i>
461
462<p>
463Now, 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
465hardware that is needed to boot your system, <c>coldplug</c> autodetects
466everything else. To emerge and enable <c>coldplug</c>, type the following:
467</p>
468
469<pre caption="Emerging and enabling coldplug">
470# <i>emerge coldplug</i>
471# <i>rc-update add coldplug boot</i>
472</pre> 493</pre>
473 494
474<p> 495<p>
475Now continue with <uri link="?part=1&amp;chap=8">Configuring your System</uri>. 496Now continue with <uri link="?part=1&amp;chap=8">Configuring your System</uri>.
476</p> 497</p>
477 498
478</body> 499</body>
479</section> 500</section>
480
481</sections> 501</sections>
502

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

  ViewVC Help
Powered by ViewVC 1.1.20