/[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.4 - (show annotations) (download) (as text)
Fri Jul 9 10:27:36 2004 UTC (10 years ago) by neysx
Branch: MAIN
Changes since 1.3: +19 -13 lines
File MIME type: application/xml
#56065: make kernel options easier to find in 2.4 & 2.6 kernels

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/hb-install-ppc-kernel.xml,v 1.3 2004/05/09 11:33:37 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</i>
71 # <i>cd /usr/src</i>
72 # <i>ln -s linux-2.6.1 linux</i>
73 </pre>
74
75 <p>
76 Now it is time to configure and compile your kernel source. All architectures
77 can use <c>genkernel</c> for this, which will build a generic kernel as used
78 by the LiveCD. We explain the "manual" configuration first though, as it is
79 the best way to optimize your environment.
80 </p>
81
82 <p>
83 Continue now with <uri link="#manual">Manual Configuration</uri>.
84 </p>
85
86 </body>
87 </subsection>
88 </section>
89 <section id="manual">
90 <title>Manual Configuration</title>
91 <subsection>
92 <title>Introduction</title>
93 <body>
94
95 <p>
96 Manually configuring a kernel is often seen as the most difficult course every
97 Linux users ever has to go through. Nothing is less true -- after configuring a
98 couple of kernels you don't even remember that it was difficult ;)
99 </p>
100
101 <p>
102 However, one thing <e>is</e> true: you must know your system when you start
103 configuring a kernel manually. Most information can be gathered by viewing the
104 contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You
105 can also run <c>lsmod</c> to see what kernel modules the LiveCD uses (it might
106 provide you with a nice hint on what to enable).
107 </p>
108
109 <p>
110 Now go to your kernel source directory and execute <c>make menuconfig</c>. This
111 will fire up an ncurses-based configuration menu.
112 </p>
113
114 <pre caption="Invoking menuconfig">
115 # <i>cd /usr/src/linux</i>
116 # <i>make menuconfig</i>
117 </pre>
118
119 <p>
120 You will be greeted with several configuration sections. We'll first list some
121 options you must activate (otherwise Gentoo will not function, or not function
122 properly without additional tweaks).
123 </p>
124
125 </body>
126 </subsection>
127 <subsection>
128 <title>Activating Required Options</title>
129 <body>
130
131 <p>
132 First of all, activate the use of development and experimental code/drivers.
133 You need this, otherwise some very important code/drivers won't show up:
134 </p>
135
136 <pre caption="Selecting experimental code/drivers">
137 Code maturity level options ---&gt;
138 [*] Prompt for development and/or incomplete code/drivers
139 </pre>
140
141 <p>
142 Now go to <c>File Systems</c> and select support for the filesystems you use.
143 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
144 able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc
145 file system</c>, <c>/dev file system</c> + <c>Automatically mount at boot</c>:
146 </p>
147
148 <pre caption="Selecting necessary file systems">
149 <comment>(With a 2.4.x kernel)</comment>
150 File systems ---&gt;
151 [*] Virtual memory file system support (former shm fs)
152 [*] /proc file system support
153 [*] /dev file system support (EXPERIMENTAL)
154 [*] Automatically mount at boot
155 [ ] /dev/pts file system for Unix98 PTYs
156
157 <comment>(With a 2.6.x kernel)</comment>
158 File systems ---&gt;
159 Pseudo Filesystems ---&gt;
160 [*] /proc file system support
161 [*] /dev file system support (OBSOLETE)
162 [*] Automatically mount at boot
163 [*] /dev/pts file system for Unix98 PTYs
164 [*] Virtual memory file system support (former shm fs)
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.4.x kernel)</comment>
181 Network device support ---&gt;
182 &lt;*&gt; PPP (point-to-point protocol) support
183 &lt;*&gt; PPP support for async serial ports
184 &lt;*&gt; PPP support for sync tty ports
185
186 <comment>(With a 2.6.x kernel)</comment>
187 Device Drivers ---&gt;
188 Networking 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 <c>make dep &amp;&amp; make vmlinux modules
251 modules_install</c> or on the Pegasos run <c>make dep &amp;&amp; make zImage
252 modules modules_install</c>:
253 </p>
254
255 <pre caption="Compiling the kernel">
256 (Apple/IBM) # <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
257 (Pegasos) # <i>make dep &amp;&amp; make zImage modules modules_install</i>
258 </pre>
259
260 <p>
261 When the kernel is done compiling, copy over the kernel image to
262 <path>/boot</path>.
263 </p>
264
265 <pre caption="Installing the kernel">
266 (Apple/IBM) # <i>cp vmlinux /boot/kernel-2.4.24</i>
267 (Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.4.24</i>
268 </pre>
269
270 <p>
271 Also don't forget to copy over the system map:
272 </p>
273
274 <pre caption="Copying the system map">
275 # <i>cp System.map /boot/System.map-2.4.24</i>
276 </pre>
277
278 <p>
279 It is also wise to copy over your kernel configuration file to
280 <path>/boot</path>, just in case :)
281 </p>
282
283 <pre caption="Backing up your kernel configuration">
284 # <i>cp .config /boot/config-2.4.24</i>
285 </pre>
286
287 <p>
288 Now continue with <uri link="#kernel_modules">Installing Separate Kernel
289 Modules</uri>.
290 </p>
291
292 </body>
293 </subsection>
294 </section>
295 <section id="kernel_modules">
296 <title>Installing Separate Kernel Modules</title>
297 <subsection>
298 <title>Installing Extra Modules</title>
299 <body>
300
301 <p>
302 If appropriate, you should emerge ebuilds for any additional hardware that is
303 on your system. Here is a list of kernel-related ebuilds that you could emerge:
304 </p>
305
306 <table>
307 <tcolumn width="1in"/>
308 <tcolumn width="4in"/>
309 <tcolumn width="2in"/>
310 <tr>
311 <th>Ebuild</th>
312 <th>Purpose</th>
313 <th>Command</th>
314 </tr>
315 <tr>
316 <ti>xfree-drm</ti>
317 <ti>
318 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
319 other cards for XFree86. Please check the <c>IUSE_VIDEO_CARDS</c> variable
320 in the <path>/usr/portage/x11-base/xfree-drm</path> ebuilds to see what you
321 need to fill in as <c>yourcard</c>.
322 </ti>
323 <ti><c>VIDEO_CARDS="yourcard" emerge xfree-drm</c></ti>
324 </tr>
325 </table>
326
327 <p>
328 Beware though, some of these ebuilds might deal with big dependencies. To verify
329 what packages will be installed by emerging an ebuild, use <c>emerge
330 --pretend</c>. For instance, for the <c>xfree-drm</c> package:
331 </p>
332
333 <pre caption="View full installation package listing">
334 # <i>emerge --pretend xfree-drm</i>
335 </pre>
336
337 </body>
338 </subsection>
339 <subsection>
340 <title>Configuring the Modules</title>
341 <body>
342
343 <p>
344 You should list the modules you want automatically loaded in
345 <path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>).
346 You can add extra options to the modules too if you want.
347 </p>
348
349 <p>
350 To view all available modules, run the following <c>find</c> command. Don't
351 forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
352 just compiled:
353 </p>
354
355 <pre caption="Viewing all available modules">
356 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
357 </pre>
358
359 <p>
360 For instance, to automatically load the <c>3c59x.o</c> module, edit the
361 <path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module
362 name in it.
363 </p>
364
365 <pre caption="Editing /etc/modules.autoload.d/kernel-2.4">
366 <comment>(Example for 2.4 kernels)</comment>
367 # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
368 </pre>
369
370 <pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6">
371 3c59x
372 </pre>
373
374 <p>
375 Now run <c>modules-update</c> to commit your changes to the
376 <path>/etc/modules.conf</path> file:
377 </p>
378
379 <pre caption="Running modules-update">
380 # <i>modules-update</i>
381 </pre>
382
383 <p>
384 Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
385 your System</uri>.
386 </p>
387
388 </body>
389 </subsection>
390 </section>
391 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20