/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.36 - (hide annotations) (download) (as text)
Sun Aug 21 17:47:46 2005 UTC (8 years, 10 months ago) by neysx
Branch: MAIN
Changes since 1.35: +9 -7 lines
File MIME type: application/xml
#103041 Warn users against Etc/GMT* timezones

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

  ViewVC Help
Powered by ViewVC 1.1.20