/[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.2 - (show annotations) (download) (as text)
Wed Apr 28 07:52:30 2004 UTC (10 years, 2 months ago) by swift
Branch: MAIN
Changes since 1.1: +23 -112 lines
File MIME type: application/xml
2004.1 release. Moving docs from draft/ to correct space. Hopefully this goes without any issues *crosses fingers*

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 <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6
7 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-ppc-kernel.xml,v 1.8 2004/04/19 19:08:57 swift Exp $ -->
8
9 <sections>
10 <section>
11 <title>Timezone</title>
12 <body>
13
14 <p>
15 You first need to select your timezone so that your system knows where it is
16 located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then make a
17 symlink to <path>/etc/localtime</path> using <c>ln</c>:
18 </p>
19
20 <pre caption="Setting the timezone information">
21 # <i>ls /usr/share/zoneinfo</i>
22 <comment>(Suppose you want to use GMT)</comment>
23 # <i>ln -sf /usr/share/zoneinfo/GMT /etc/localtime</i>
24 </pre>
25
26 </body>
27 </section>
28 <section>
29 <title>Installing the Sources</title>
30 <subsection>
31 <title>Choosing a Kernel</title>
32 <body>
33
34 <p>
35 The core around which all distributions are built is the Linux kernel. It is the
36 layer between the user programs and your system hardware. Gentoo provides its
37 users several possible kernel sources. A full listing with description is
38 available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
39 Guide</uri>.
40 </p>
41
42 <p>
43 For PPC you can choose between <c>ppc-sources</c>, <c>ppc-sources-benh</c>,
44 <c>ppc-sources-dev</c>, <c>ppc-sources-crypto</c> and
45 <c>ppc-development-sources</c>. This latter kernel is available when you
46 perform a networkless installation. So let's continue with
47 <c>emerge</c>'ing the kernel sources:
48 </p>
49
50 <pre caption="Installing a kernel source">
51 # <i>emerge ppc-development-sources</i>
52 </pre>
53
54 <p>
55 When you take a look in <path>/usr/src</path> you should see a symlink called
56 <path>linux</path> pointing to your kernel source:
57 </p>
58
59 <pre caption="Viewing the kernel source symlink">
60 # <i>ls -l /usr/src/linux</i>
61 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.1
62 </pre>
63
64 <p>
65 If this isn't the case (i.e. the symlink points to a different kernel source)
66 change the symlink before you continue:
67 </p>
68
69 <pre caption="Changing the kernel source symlink">
70 # <i>rm /usr/src/linux &amp;&amp; ln -s /usr/src/linux-2.6.1 /usr/src/linux</i>
71 </pre>
72
73 <p>
74 Now it is time to configure and compile your kernel source. All architectures
75 can use <c>genkernel</c> for this, which will build a generic kernel as used
76 by the LiveCD. We explain the "manual" configuration first though, as it is
77 the best way to optimize your environment.
78 </p>
79
80 <p>
81 Continue now with <uri link="#manual">Manual Configuration</uri>.
82 </p>
83
84 </body>
85 </subsection>
86 </section>
87 <section id="manual">
88 <title>Manual Configuration</title>
89 <subsection>
90 <title>Introduction</title>
91 <body>
92
93 <p>
94 Manually configuring a kernel is often seen as the most difficult course every
95 Linux users ever has to go through. Nothing is less true -- after configuring a
96 couple of kernels you don't even remember that it was difficult ;)
97 </p>
98
99 <p>
100 However, one thing <e>is</e> true: you must know your system when you start
101 configuring a kernel manually. Most information can be gathered by viewing the
102 contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You
103 can also run <c>lsmod</c> to see what kernel modules the LiveCD uses (it might
104 provide you with a nice hint on what to enable).
105 </p>
106
107 <p>
108 Now go to your kernel source directory and execute <c>make menuconfig</c>. This
109 will fire up an ncurses-based configuration menu.
110 </p>
111
112 <pre caption="Invoking menuconfig">
113 # <i>cd /usr/src/linux</i>
114 # <i>make menuconfig</i>
115 </pre>
116
117 <p>
118 You will be greeted with several configuration sections. We'll first list some
119 options you must activate (otherwise Gentoo will not function, or not function
120 properly without additional tweaks).
121 </p>
122
123 </body>
124 </subsection>
125 <subsection>
126 <title>Activating Required Options</title>
127 <body>
128
129 <p>
130 First of all, activate the use of development and experimental code/drivers.
131 You need this, otherwise some very important code/drivers won't show up:
132 </p>
133
134 <pre caption="Selecting experimental code/drivers">
135 Code maturity level options ---&gt;
136 [*] Prompt for development and/or incomplete code/drivers
137 </pre>
138
139 <p>
140 Now go to <c>File Systems</c> and select support for the filesystems you use.
141 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
142 able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc
143 file system</c>, <c>/dev file system</c> + <c>Automatically mount at boot</c>:
144 </p>
145
146 <pre caption="Selecting necessary file systems">
147 File systems ---&gt;
148 [*] Virtual memory file system support (former shm fs)
149 [*] /proc file system support
150 [*] /dev file system support (EXPERIMENTAL)
151 [*] Automatically mount at boot
152
153 <comment>(Deselect the following unless you have a 2.6 kernel)</comment>
154 [ ] /dev/pts file system for Unix98 PTYs
155
156 <comment>(Select one or more of the following options as needed by your system)</comment>
157 &lt;*&gt; Reiserfs support
158 &lt;*&gt; Ext3 journalling file system support
159 &lt;*&gt; JFS filesystem support
160 &lt;*&gt; Second extended fs support
161 &lt;*&gt; XFS filesystem support
162 </pre>
163
164 <note>
165 Users of a 2.6 kernel will find some of the mentioned options under <c>Pseudo
166 filesystems</c> which is a subpart of <c>File systems</c>.
167 </note>
168
169 <p>
170 If you are using PPPoE to connect to the Internet or you are using a dial-up
171 modem, you will need the following options in the kernel:
172 </p>
173
174 <pre caption="Selecting PPPoE necessary drivers">
175 Network device support ---&gt;
176 &lt;*&gt; PPP (point-to-point protocol) support
177 &lt;*&gt; PPP support for async serial ports
178 &lt;*&gt; PPP support for sync tty ports
179 </pre>
180
181 <note>
182 Users of a 2.6 kernel will find the mentioned options under <c>Networking
183 support</c> which is a subpart of <c>Device Drivers</c>.
184 </note>
185
186 <p>
187 The two compression options won't harm but are not definitely needed, neither
188 does the <c>PPP over Ethernet</c> option, that might only be used by
189 <c>rp-pppoe</c> when configured to do kernel mode PPPoE.
190 </p>
191
192 <p>
193 If you require it, don't forget to include support in the kernel for your
194 ethernet card.
195 </p>
196
197 <p>
198 Disable ADB raw keycodes:
199 </p>
200
201 <pre caption="Disabling ADB raw keycodes">
202 Macintosh Device Drivers ---&gt;
203 [ ] Support for ADB raw keycodes
204 </pre>
205
206 <p>
207 Also choose the correct RTC support (<e>disable</e> the <c>Enhanced RTC</c>
208 option):
209 </p>
210
211 <pre caption="Activating the correct RTC option">
212 Character devices ---&gt;
213 [ ] Enhanced RTC
214
215 General setup ---&gt;
216 [*] Support for /dev/rtc
217 </pre>
218
219 <p>
220 Users of OldWorld machines will want HFS support so they can copy compiled
221 kernels to the MacOS partition.
222 </p>
223
224 <pre caption="Activating HFS support">
225 File Systems ---&gt;
226 [*] HFS Support
227 </pre>
228
229 <p>
230 When you're done configuring your kernel, continue with <uri
231 link="#compiling">Compiling and Installing</uri>.
232 </p>
233
234 </body>
235 </subsection>
236 <subsection id="compiling">
237 <title>Compiling and Installing</title>
238 <body>
239
240 <p>
241 Now that your kernel is configured, it is time to compile and install it. Exit
242 the configuration and run <c>make dep &amp;&amp; make vmlinux modules
243 modules_install</c> or on the Pegasos run <c>make dep &amp;&amp; make zImage
244 modules modules_install</c>:
245 </p>
246
247 <pre caption="Compiling the kernel">
248 (Apple/IBM) # <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
249 (Pegasos) # <i>make dep &amp;&amp; make zImage modules modules_install</i>
250 </pre>
251
252 <p>
253 When the kernel is done compiling, copy over the kernel image to
254 <path>/boot</path>.
255 </p>
256
257 <pre caption="Installing the kernel">
258 (Apple/IBM) # <i>cp vmlinux /boot/kernel-2.4.24</i>
259 (Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.4.24</i>
260 </pre>
261
262 <p>
263 Also don't forget to copy over the system map:
264 </p>
265
266 <pre caption="Copying the system map">
267 # <i>cp System.map /boot/System.map-2.4.24</i>
268 </pre>
269
270 <p>
271 It is also wise to copy over your kernel configuration file to
272 <path>/boot</path>, just in case :)
273 </p>
274
275 <pre caption="Backing up your kernel configuration">
276 # <i>cp .config /boot/config-2.4.24</i>
277 </pre>
278
279 <p>
280 Now continue with <uri link="#kernel_modules">Installing Separate Kernel
281 Modules</uri>.
282 </p>
283
284 </body>
285 </subsection>
286 </section>
287 <section id="kernel_modules">
288 <title>Installing Separate Kernel Modules</title>
289 <subsection>
290 <title>Installing Extra Modules</title>
291 <body>
292
293 <p>
294 If appropriate, you should emerge ebuilds for any additional hardware that is
295 on your system. Here is a list of kernel-related ebuilds that you could emerge:
296 </p>
297
298 <table>
299 <tcolumn width="1in"/>
300 <tcolumn width="4in"/>
301 <tcolumn width="2in"/>
302 <tr>
303 <th>Ebuild</th>
304 <th>Purpose</th>
305 <th>Command</th>
306 </tr>
307 <tr>
308 <ti>xfree-drm</ti>
309 <ti>
310 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
311 other cards for XFree86. Please check the <c>IUSE_VIDEO_CARDS</c> variable
312 in the <path>/usr/portage/x11-base/xfree-drm</path> ebuilds to see what you
313 need to fill in as <c>yourcard</c>.
314 </ti>
315 <ti><c>VIDEO_CARDS="yourcard" emerge xfree-drm</c></ti>
316 </tr>
317 </table>
318
319 <p>
320 Beware though, some of these ebuilds might deal with big dependencies. To verify
321 what packages will be installed by emerging an ebuild, use <c>emerge
322 --pretend</c>. For instance, for the <c>xfree-drm</c> package:
323 </p>
324
325 <pre caption="View full installation package listing">
326 # <i>emerge --pretend xfree-drm</i>
327 </pre>
328
329 </body>
330 </subsection>
331 <subsection>
332 <title>Configuring the Modules</title>
333 <body>
334
335 <p>
336 You should list the modules you want automatically loaded in
337 <path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>).
338 You can add extra options to the modules too if you want.
339 </p>
340
341 <p>
342 To view all available modules, run the following <c>find</c> command. Don't
343 forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
344 just compiled:
345 </p>
346
347 <pre caption="Viewing all available modules">
348 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
349 </pre>
350
351 <p>
352 For instance, to automatically load the <c>3c59x.o</c> module, edit the
353 <path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module
354 name in it.
355 </p>
356
357 <pre caption="Editing /etc/modules.autoload.d/kernel-2.4">
358 <comment>(Example for 2.4 kernels)</comment>
359 # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
360 </pre>
361
362 <pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6">
363 3c59x
364 </pre>
365
366 <p>
367 Now run <c>modules-update</c> to commit your changes to the
368 <path>/etc/modules.conf</path> file:
369 </p>
370
371 <pre caption="Running modules-update">
372 # <i>modules-update</i>
373 </pre>
374
375 <p>
376 Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
377 your System</uri>.
378 </p>
379
380 </body>
381 </subsection>
382 </section>
383 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20