/[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.6 - (show annotations) (download) (as text)
Mon Jul 26 09:04:42 2004 UTC (10 years, 9 months ago) by dertobi123
Branch: MAIN
Changes since 1.5: +42 -38 lines
File MIME type: application/xml
Move over files from the draft/ directory. 2004.2 is released :)

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

  ViewVC Help
Powered by ViewVC 1.1.20