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

Diff of /xml/htdocs/doc/en/handbook/hb-install-mips-kernel.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 Revision 1.11
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-mips-kernel.xml,v 1.10 2005/01/04 18:11:20 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-mips-kernel.xml,v 1.11 2005/02/14 14:59:19 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.6</version> 11<version>1.7</version>
12<date>2004-09-01</date> 12<date>2005-02-14</date>
13 13
14<section> 14<section>
15<title>Timezone</title> 15<title>Timezone</title>
16<body> 16<body>
17 17
19You first need to select your timezone so that your system knows where it is 19You first need to select your timezone so that your system knows where it is
20located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then make a 20located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then make a
21symlink to <path>/etc/localtime</path> using <c>ln</c>: 21symlink to <path>/etc/localtime</path> using <c>ln</c>:
22</p> 22</p>
23 23
24<pre caption="Setting the timezone information"> 24<pre caption="Setting the timezone information to GMT">
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> 25# <i>ln -sf /usr/share/zoneinfo/GMT /etc/localtime</i>
28</pre> 26</pre>
29 27
30</body> 28</body>
31</section> 29</section>
52<p> 50<p>
53Choose your kernel source and install it using <c>emerge</c>. 51Choose your kernel source and install it using <c>emerge</c>.
54Of course substitute with your choice of sources, this is merely an example: 52Of course substitute with your choice of sources, this is merely an example:
55</p> 53</p>
56 54
55<note>
56Special patches are needed to make a kernel work on Cobalt servers. Grab the
57sources using the command <c>USE=cobalt export mips-sources</c> -- this will
58grab the necessary patches and apply them for you.
59</note>
60
57<pre caption="Installing a kernel source"> 61<pre caption="Installing a kernel source">
62<comment>(For SGI machines)</comment>
58# <i>emerge mips-sources</i> 63# <i>emerge mips-sources</i>
64
65<comment>(For Cobalt machines)</comment>
66# <i>USE=cobalt emerge mips-sources</i>
59</pre> 67</pre>
60 68
61<p> 69<p>
62When you take a look in <path>/usr/src</path> you should see a symlink called 70When you take a look in <path>/usr/src</path> you should see a symlink called
63<path>linux</path> pointing to your kernel source: 71<path>linux</path> pointing to your kernel source:
85 93
86</body> 94</body>
87</subsection> 95</subsection>
88</section> 96</section>
89<section> 97<section>
90<title>Manual Configuration</title> 98<title>Kernel Compilation &amp; Installation</title>
91<subsection> 99<subsection>
92<title>Introduction</title> 100<title>Introduction</title>
93<body> 101<body>
94 102
95<p> 103<p>
96Manually configuring a kernel is often seen as the most difficult procedure a 104Previously, we went through the manual configuration of how to set up the kernel
97Linux user ever has to perform. Nothing is less true -- after configuring a 105sources. Instead, we have uploaded a number of sample configurations which you
98couple of kernels you don't even remember that it was difficult ;) 106can base your configuration upon. Simply click on the closest option that
99</p> 107matches your system and kernel version. You may also find other configuration
100 108samples at the URLs mentioned below.
101<p> 109</p>
102However, one thing <e>is</e> true: you must know your system when you start 110
103configuring a kernel manually. Most information can be gathered by viewing the 111<table>
104contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You 112 <tr>
105can also run <c>lsmod</c> to see what kernel modules the LiveCD uses (it might 113 <th>System</th>
106provide you with a nice hint on what to enable). 114 <th>Kernel Version</th>
115 </tr>
116 <tr>
117 <ti>SGI IP22 (Indy, Indigo 2, Challenge S)</ti>
118 <ti>
119 <uri link="http://www.longlandclan.hopto.org/~stuartl/mips-linux/sgi/ip22/config/2.4.29-mipscvs-20050130.gz">2.4.29</uri>
120 </ti>
121 </tr>
122 <tr>
123 <ti>Cobalt Qube/Raq 2800</ti>
124 <ti>
125 <uri link="http://dev.gentoo.org/~kumba/mips/cobalt/kernel/cobalt-2605.config">2.6.5</uri>
126 <uri link="http://dev.gentoo.org/~kumba/mips/cobalt/kernel/cobalt-2606.config">2.6.6</uri>
127 <uri link="http://dev.gentoo.org/~kumba/mips/cobalt/kernel/cobalt-config-2609">2.6.9</uri>
128 </ti>
129 </tr>
130</table>
131
132<ul>
133 <li>
134 IP22 (Indy, Indigo2, Challenge S) Configurations:
135 <uri link="http://www.longlandclan.hopto.org/~stuartl/mips-linux/sgi/ip22/config">
136 http://www.longlandclan.hopto.org/~stuartl/mips-linux/sgi/ip22/config
137 </uri>
138 </li>
139 <li>
140 Cobalt Server Configurations:
141 <uri link="http://dev.gentoo.org/~kumba/mips">
142 http://dev.gentoo.org/~kumba/mips
143 </uri>
144 </li>
145</ul>
146
107</p> 147<p>
108 148Once you have found a configuration, download it into your kernel source
149directory, and rename it to <path>.config</path>. From there, you can run
150<c>make oldconfig</c> to bring everything up to date, and allow you to customise
151the configuration before compiling.
109<p> 152</p>
110Now go to your kernel source directory and execute <c>make menuconfig</c>. This
111will fire up an ncurses-based configuration menu.
112</p>
113 153
114<pre caption="Invoking menuconfig"> 154<pre caption="Configuring the kernel">
115# <i>cd /usr/src/linux</i> 155# <i>cd /usr/src/linux</i>
156# <i>cp /path/to/example-config .config</i>
157# <i>make oldconfig</i>
158<comment>(Just press ENTER at each prompt to accept the defaults... we'll customise later)</comment>
116# <i>make menuconfig</i> 159# <i>make menuconfig</i>
117</pre> 160</pre>
118
119<p>
120You will be greeted with several configuration sections. We'll first list some
121options you must activate (otherwise Gentoo will not function, or not function
122properly without additional tweaks).
123</p>
124
125</body>
126</subsection>
127<subsection>
128<title>Activating Required Options</title>
129<body>
130
131<p>
132First of all, activate the use of development and experimental code/drivers.
133You need this, otherwise some very important code/drivers won't show up:
134</p>
135
136<pre caption="Selecting experimental code/drivers">
137Code maturity level options ---&gt;
138 [*] Prompt for development and/or incomplete code/drivers
139</pre>
140
141<p>
142Now 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
144able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc
145file 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>
150File 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>
158File systems ---&gt;
159 Pseudo Filesystems ---&gt;
160 [*] /proc file system support
161 [*] /dev file system support (OBSOLETE)
162 [*] Automatically mount at boot
163 [*] Virtual memory file system support (former shm fs)
164
165<comment>(Select one or more of the following options as needed by your system)</comment>
166 &lt;*&gt; Reiserfs support
167 &lt;*&gt; Ext3 journalling file system support
168 &lt;*&gt; JFS filesystem support
169 &lt;*&gt; Second extended fs support
170 &lt;*&gt; XFS filesystem support
171</pre>
172
173<p>
174If you are using PPPoE to connect to the Internet or you are using a dial-up
175modem, you will need the following options in the kernel:
176</p>
177
178<pre caption="Selecting PPPoE necessary drivers">
179<comment>(With a 2.4.x kernel)</comment>
180Network device support ---&gt;
181 &lt;*&gt; PPP (point-to-point protocol) support
182 &lt;*&gt; PPP support for async serial ports
183 &lt;*&gt; PPP support for sync tty ports
184
185<comment>(With a 2.6.x kernel)</comment>
186Device Drivers ---&gt;
187 Networking support ---&gt;
188 &lt;*&gt; PPP (point-to-point protocol) support
189 &lt;*&gt; PPP support for async serial ports
190 &lt;*&gt; PPP support for sync tty ports
191</pre>
192
193<p>
194The two compression options won't harm but are not definitely needed, neither
195does the <c>PPP over Ethernet</c> option, that might only be used by
196<c>rp-pppoe</c> when configured to do kernel mode PPPoE.
197</p>
198
199<p>
200If you require it, don't forget to include support in the kernel for your
201ethernet card.
202</p>
203
204<p>
205If you are using an Indy/Indigo2 based system, you need to activate support for
206it.
207</p>
208
209<pre caption="Activating SGI IP22">
210Machine selection ---&gt;
211 [*] Support for SGI IP22 (Indy/Indigo2)
212</pre>
213
214<p>
215If you want to run Irix binaries, include the following option:
216</p>
217
218<pre caption="Including IRIX Binary support">
219General setup ---&gt;
220 [*] Include IRIX binary compatibility
221</pre>
222
223<p>
224If you have ISA/EISA cards in your SGI Indigo2, enable support for it.
225</p>
226
227<pre caption="Enabling ISA/EISA support for SGI Indigo2">
228General setup ---&gt;
229 [*] Indigo-2 (IP22) EISA bus support
230 [*] ISA bus support
231</pre>
232
233<p>
234If you have a SGI parallel port, you can enable support for it. If you have an
235ISA parallel port you should select "PC-style hardware" instead.
236</p>
237
238<pre caption="Enabling SGI Parallel Port Support">
239Parallel port support ---&gt;
240 &lt;*&gt; Parallel port support
241 &lt;*&gt; SGI Indy/Indigo2 hardware (EXPERIMENTAL) (NEW)
242 &lt;*&gt; IEEE 1284 transfer modes (NEW)
243</pre>
244
245<p>
246If you want to use the Indigo2 ISA slots, enable the plug and play support.
247</p>
248
249<pre caption="Enabling PnP support for ISA">
250Plug and Play configuration ---&gt;
251 &lt;*&gt; Plug and Play support
252 &lt;*&gt; ISA Plug and Play support
253</pre>
254
255<p>
256Don't forget to enable SCSI support, and use the SGI WD93C93 Driver:
257</p>
258
259<pre caption="Enabling WD93C93 Driver Support">
260SCSI low-level drivers ---&gt;
261 &lt;*&gt; SGI WD93C93 SCSI Driver
262</pre>
263
264<p>
265For network cards you probably need support for the SGI Seeq ethernet
266controller:
267</p>
268
269<pre caption="Enabling SGI Seeq Support">
270Network device support ---&gt;
271 Ethernet (10 or 100Mbit) ---&gt;
272 [*] Ethernet (10 or 100Mbit)
273 [*] SGI Seeq ethernet controller support
274</pre>
275
276<p>
277Don't forget to enable serial console support and enable support for the SGI
278Zilog85C30:
279</p>
280
281<pre caption="Enable SGI Zilog85C30 Support">
282Character devices ---&gt;
283 [*] Non-standard serial port support
284 [*] SGI Zilog85C30 serial support
285</pre>
286
287<p>
288Also don't forget to enable the Indy/I2 Watchdog support as well as the SGI
289DS1286 RTC support:
290</p>
291
292<pre caption="Enable Watchdog and RTC Support">
293Character Devices ---&gt;
294 [*] SGI DS1286 RTC support
295 Watchdog Cards ---&gt;
296 [*] Watchdog Timer Support
297 &lt;*&gt; Indy/I2 Hardware Watchdog
298</pre>
299
300<p>
301You should also enable support for SGI partitions :)
302</p>
303
304<pre caption="Enabling Support for SGI Partitions">
305File Systems ---&gt;
306 Partition Types ---&gt;
307 [*] Advanced partition selection
308 [*] SGI partition support
309</pre>
310
311<p>
312If you have an SGI Newport (XL Gfx) Card and want to use it, then you'll want to
313enable support for it:
314</p>
315
316<pre caption="Enabling Support for the SGI Newport Card">
317Console drivers ---&gt;
318 &lt;*&gt; SGI Newport Console support (NEW)
319</pre>
320
321<p>
322If you want sound support on your Indy/Indigo2, enable support for it:
323</p>
324
325<pre caption="Enabling Support for the SGI HAL2">
326Sound ---&gt;
327 &lt;*&gt; Sound card support
328 &lt;*&gt; SGI HAL2 sound (EXPERIMENTAL)
329</pre>
330
331<p>
332When you're done configuring your kernel, continue with <uri
333link="#compiling">Compiling and Installing</uri>.
334</p>
335 161
336</body> 162</body>
337</subsection> 163</subsection>
338<subsection id="compiling"> 164<subsection id="compiling">
339<title>Compiling and Installing</title> 165<title>Compiling and Installing</title>
370 196
371<pre caption="Backing up your kernel configuration"> 197<pre caption="Backing up your kernel configuration">
372# <i>cp .config /boot/config-2.4.24</i> 198# <i>cp .config /boot/config-2.4.24</i>
373</pre> 199</pre>
374 200
201<!--
202Moot point, now that we use arcboot on SGI, and CoLo on Cobalts
375<p> 203<p>
376If your system doesn't boot ELF kernels, compile the 204If your system doesn't boot ELF kernels, compile the
377kernel using <c>make vmlinux.ecoff</c> instead of <c>make vmlinux</c>. The 205kernel using <c>make vmlinux.ecoff</c> instead of <c>make vmlinux</c>. The
378kernel image will be saved as <path>arch/mips/boot/vmlinux.ecoff</path> instead 206kernel image will be saved as <path>arch/mips/boot/vmlinux.ecoff</path> instead
379of <path>vmlinux</path>. 207of <path>vmlinux</path>.
380</p> 208</p>
381 209-->
382</body> 210</body>
383</subsection> 211</subsection>
384</section> 212</section>
385<section id="kernel_modules"> 213<section id="kernel_modules">
386<title>Installing Separate Kernel Modules</title> 214<title>Installing Separate Kernel Modules</title>
387<subsection> 215<subsection>
388<title>Configuring the Modules</title> 216<title>Configuring the Modules</title>
389<body> 217<body>
390 218
391<p> 219<p>
392You should list the modules you want automatically loaded in 220You should list the modules you want automatically loaded in one of the relevant
393<path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>).
394You can add extra options to the modules too if you want. 221files listed below. You can add extra options to the modules too if you want.
222</p>
223
224<ul>
225 <li><path>/etc/modules.autoload.d/kernel-2.4</path> - Kernel 2.4 only</li>
226 <li><path>/etc/modules.autoload.d/kernel-2.6</path> - Kernel 2.6 only</li>
227 <li><path>/etc/modules.autoload</path> - All Kernels</li>
228</ul>
229
230<p>
231Therefore, if you have a kernel module that you want to load -- which is common
232to both 2.4 and 2.6, then place it in <path>/etc/modules.autoload</path>.
233Otherwise it can be placed in the appropriate file.
395</p> 234</p>
396 235
397<p> 236<p>
398To view all available modules, run the following <c>find</c> command. Don't 237To view all available modules, run the following <c>find</c> command. Don't
399forget to substitute "&lt;kernel version&gt;" with the version of the kernel you 238forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
404# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i> 243# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
405</pre> 244</pre>
406 245
407<p> 246<p>
408For instance, to automatically load the <c>3c59x.o</c> module, edit the 247For instance, to automatically load the <c>3c59x.o</c> module, edit the
409<path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module 248appropriate file and enter the module name in it.
410name in it.
411</p> 249</p>
412 250
413<pre caption="Editing /etc/modules.autoload.d/kernel-2.4"> 251<pre caption="Editing /etc/modules.autoload.d/kernel-2.4">
414<comment>(Example for 2.4 kernels)</comment>
415# <i>nano -w /etc/modules.autoload.d/kernel-2.4</i> 252# <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
416</pre> 253</pre>
417 254
418<pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6"> 255<pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6">
4193c59x 2563c59x
420</pre> 257</pre>
421 258
422<p> 259<p>
260This can be also done in a one-liner:
261</p>
262
263<pre caption="Adding a module -- the one-liner method">
264# <i>echo '3c59x' >> /etc/modules.autoload.d/kernel-2.4</i>
265<comment>(or kernel-2.6, or /etc/modules.autoload...)</comment>
266</pre>
267
268<p>
423Now run <c>modules-update</c> to commit your changes to the 269Now run <c>modules-update</c> to commit your changes to the
424<path>/etc/modules.conf</path> file: 270<path>/etc/modules.conf</path> file:
425</p> 271</p>
426 272
427<pre caption="Running modules-update"> 273<pre caption="Running modules-update">

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20