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