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

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

  ViewVC Help
Powered by ViewVC 1.1.20