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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.20 - (show annotations) (download) (as text)
Mon Nov 21 15:37:12 2005 UTC (13 years ago) by neysx
Branch: MAIN
Changes since 1.19: +10 -8 lines
File MIME type: application/xml
#112802 USE="-doc" when emerging kernel sources to avoid dependencies (until the USE flags are described later in the handbook)
#110596 (PPC only) Add make defconfig before make menuconfig
#110038 cp time zone file instead of symlinking to it

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/2.5 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc64-kernel.xml,v 1.19 2005/10/06 20:43:41 so Exp $ -->
8
9 <sections>
10
11 <version>2.8</version>
12 <date>2005-11-21</date>
13
14 <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 copy
21 it to <path>/etc/localtime</path>. 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 </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>cp /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 The core around which all distributions are built is the Linux kernel.
42 It is the layer between the user programs and your system hardware.
43 Gentoo provides its users several possible kernel sources. A full
44 listing with description is available at the <uri
45 link="/doc/en/gentoo-kernel.xml">Gentoo Kernel Guide</uri>.
46 </p>
47
48 <p>
49 For PPC64 you should use <c>gentoo-sources</c>. So let's continue with
50 <c>emerge</c>'ing the kernel sources.
51 The <c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other
52 dependencies at this point:
53 </p>
54
55 <pre caption="Installing a kernel source">
56 # <i>USE="-doc" emerge gentoo-sources</i>
57 </pre>
58
59 <p>
60 When you take a look in <path>/usr/src</path> you should see a symlink
61 called <path>linux</path> pointing to your kernel source:
62 </p>
63
64 <pre caption="Viewing the kernel source symlink">
65 # <i>ls -l /usr/src/linux</i>
66 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux
67 -&gt; linux-2.6.7-gentoo-r8
68 </pre>
69
70 <p>
71 If this isn't the case (i.e. the symlink points to a different kernel
72 source) change the symlink before you continue:
73 </p>
74
75 <pre caption="Changing the kernel source symlink">
76 # <i>rm /usr/src/linux</i>
77 # <i>cd /usr/src</i>
78 # <i>ln -s linux-2.6.7-gentoo-r8 linux</i>
79 </pre>
80
81 <p>
82 Now it is time to configure and compile your kernel source. There is the
83 ability to use "genkernel" which would create a generic kernel like the
84 ones used on the installation CDs, but it is not fully functional for PPC64 at
85 the moment.
86 </p>
87
88 <p>
89 Continue now with <uri link="#manual">Manual Configuration</uri>.
90 </p>
91
92 </body>
93 </subsection>
94 </section>
95 <section id="manual">
96 <title>Manual Configuration</title>
97 <subsection>
98 <title>Introduction</title>
99 <body>
100
101 <p>
102 Manually configuring a kernel is often seen as the most difficult procedure a
103 Linux user ever has to perform. Nothing is less true -- after configuring a
104 couple of kernels you don't even remember that it was difficult ;)
105 </p>
106
107 <p>
108 However, one thing <e>is</e> true: you must know your system when you
109 configuring a kernel manually. Most information can be gathered by emerging
110 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
111 be able to use <c>lspci</c> within the chrooted environment. You may safely
112 ignore any <e>pcilib</e> warnings (like pcilib: cannot open
113 /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
114 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
115 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
116 uses (it might provide you with a nice hint on what to enable).
117 </p>
118
119 <p>
120 Now go to your kernel source directory and execute <c>make
121 menuconfig</c>. This will fire up an ncurses-based configuration menu.
122 </p>
123
124 <pre caption="Invoking menuconfig">
125 # <i>cd /usr/src/linux</i>
126 # <i>make menuconfig</i>
127 </pre>
128
129 <p>
130 You will be greeted with several configuration sections. We'll first
131 list some options you must activate (otherwise Gentoo will not function,
132 or not function properly without additional tweaks).
133 </p>
134
135 </body>
136 </subsection>
137 <subsection>
138 <title>Activating Required Options</title>
139 <body>
140
141 <p>
142 First of all, activate the use of development and experimental
143 code/drivers. You need this, otherwise some very important code/drivers
144 won't show up:
145 </p>
146
147 <pre caption="Selecting experimental code/drivers, General setup">
148 Code maturity level options ---&gt;
149 [*] Prompt for development and/or incomplete code/drivers
150 General setup --->
151 [*] Support for hot-pluggable devices
152 </pre>
153
154 <p>
155 Now go to <c>File Systems</c> and select support for the filesystems you
156 use. <e>Don't</e> compile them as modules, otherwise your Gentoo system
157 will not be able to mount your partitions. Also select <c>Virtual
158 memory</c>, <c>/proc file system</c>, <c>/dev file system</c> +
159 <c>Automatically mount at boot</c> and <c>/dev/pts file system for
160 Unix98 PTYs</c>:
161 </p>
162
163 <pre caption="Selecting necessary file systems">
164 File systems ---&gt;
165 [*] Virtual memory file system support (former shm fs)
166 [*] /proc file system support
167 [*] /dev file system support (EXPERIMENTAL)
168 [*] Automatically mount at boot
169 [*] /dev/pts file system for Unix98 PTYs
170
171 <comment>(Select one or more of the following options as needed by your system)</comment>
172 &lt;*&gt; Reiserfs support
173 &lt;*&gt; Ext3 journalling file system support
174 &lt;*&gt; JFS filesystem support
175 &lt;*&gt; Second extended fs support
176 &lt;*&gt; XFS filesystem support
177 </pre>
178
179 <note>
180 You will find some of the mentioned options under <c>Pseudo
181 filesystems</c> which is a subpart of <c>File systems</c>.
182 </note>
183
184 <p>
185 If you are using PPPoE to connect to the Internet or you are using a
186 dial-up modem, you will need the following options in the kernel (you
187 will find the mentioned options under <c>Networking support</c> which is
188 a subpart of <c>Device Drivers</c>):
189 </p>
190
191 <pre caption="Selecting PPPoE necessary drivers">
192 Network device support ---&gt;
193 &lt;*&gt; PPP (point-to-point protocol) support
194 &lt;*&gt; PPP support for async serial ports
195 &lt;*&gt; PPP support for sync tty ports
196 </pre>
197
198 <p>
199 The two compression options won't harm but are not definitely needed, neither
200 does the <c>PPP over Ethernet</c> option, that might only be used by
201 <c>rp-pppoe</c> when configured to do kernel mode PPPoE.
202 </p>
203
204 <p>
205 If you require it, don't forget to include support in the kernel for your
206 ethernet card.
207 </p>
208
209 <p>
210 Disable ADB raw keycodes:
211 </p>
212
213 <pre caption="Disabling ADB raw keycodes">
214 Macintosh Device Drivers ---&gt;
215 [ ] Support for ADB raw keycodes
216 </pre>
217
218 <p>
219 When you're done configuring your kernel, continue with <uri
220 link="#compiling">Compiling and Installing</uri>.
221 </p>
222
223 </body>
224 </subsection>
225 <subsection id="compiling">
226 <title>Compiling and Installing</title>
227 <body>
228
229 <p>
230 Now that your kernel is configured, it is time to compile and install it. Exit
231 the configuration and start the compilation process:
232 </p>
233
234 <pre caption="Compiling the kernel">
235 (Apple/IBM) # <i>make &amp;&amp; make modules_install</i>
236 </pre>
237
238 <p>
239 When the kernel has finished compiling, copy the kernel image to
240 <path>/boot</path>.
241 </p>
242
243 <pre caption="Installing the kernel">
244 (Apple/IBM) # <i>cp vmlinux /boot/kernel-2.6.7-gentoo-r8</i>
245 </pre>
246
247 <p>
248 It is also wise to copy over your kernel configuration file to
249 <path>/boot</path>, just in case :)
250 </p>
251
252 <pre caption="Backing up your kernel configuration">
253 # <i>cp .config /boot/config-2.6.7-gentoo-r8</i>
254 </pre>
255
256 <p>
257 Now continue with <uri link="#kernel_modules">Configuring the Modules</uri>.
258 </p>
259
260 </body>
261 </subsection>
262 </section>
263 <section id="kernel_modules">
264 <title>Configuring the Modules</title>
265 <body>
266
267 <p>
268 You should list the modules you want automatically loaded in
269 <path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra
270 options to the modules too if you want.
271 </p>
272
273 <p>
274 To view all available modules, run the following <c>find</c> command. Don't
275 forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
276 just compiled:
277 </p>
278
279 <pre caption="Viewing all available modules">
280 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
281 </pre>
282
283 <p>
284 For instance, to automatically load the <c>3c59x.o</c> module, edit the
285 <path>kernel-2.6</path> file and enter the module name in it.
286 </p>
287
288 <pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
289 # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
290 </pre>
291
292 <pre caption="/etc/modules.autoload.d/kernel-2.6">
293 3c59x
294 </pre>
295
296 <p>
297 Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
298 your System</uri>.
299 </p>
300
301 </body>
302 </section>
303 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20