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