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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.38 - (show annotations) (download) (as text)
Tue Dec 29 18:56:22 2009 UTC (4 years, 9 months ago) by nightmorph
Branch: MAIN
Changes since 1.37: +4 -4 lines
File MIME type: application/xml
use CROSS_COMPILE environment variable when compile recent sparc 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/2.5 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-sparc-kernel.xml,v 1.37 2009/12/09 18:44:01 nightmorph Exp $ -->
8
9 <sections>
10
11 <version>9.4</version>
12 <date>2009-12-29</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
24 GMT+8.
25 </p>
26
27 <pre caption="Setting the timezone information">
28 # <i>ls /usr/share/zoneinfo</i>
29 <comment>(Suppose you want to use GMT)</comment>
30 # <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
31 </pre>
32
33 </body>
34 </section>
35 <section>
36 <title>Installing the Sources</title>
37 <subsection>
38 <title>Choosing a Kernel</title>
39 <body>
40
41 <p>
42 The core around which all distributions are built is the Linux kernel. It is the
43 layer between the user programs and your system hardware. Gentoo provides its
44 users several possible kernel sources. A full listing with description is
45 available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
46 Guide</uri>.
47 </p>
48
49 <p>
50 For sparc-based systems we have <c>gentoo-sources</c> (recommended 2.6 kernel
51 sources).
52 </p>
53
54 <p>
55 In the next example we install <c>gentoo-sources</c>.
56 </p>
57
58 <pre caption="Installing a kernel source">
59 # <i>emerge gentoo-sources</i>
60 </pre>
61
62 <p>
63 When you take a look in <path>/usr/src</path> you should see a symlink called
64 <path>linux</path> pointing to your kernel source. In this case, the installed
65 kernel source points to <c>linux-<keyval id="kernel-version"/></c>. Your version
66 may be different, so keep this in mind.
67 </p>
68
69 <pre caption="Viewing the kernel source symlink">
70 # <i>ls -l /usr/src/linux</i>
71 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
72 </pre>
73
74 <p>
75 Now it is time to configure and compile your kernel source.
76 </p>
77
78 </body>
79 </subsection>
80 </section>
81 <section>
82 <title>Manual Configuration</title>
83 <subsection>
84 <title>Introduction</title>
85 <body>
86
87 <p>
88 Manually configuring a kernel is often seen as the most difficult procedure a
89 Linux user ever has to perform. Nothing is less true -- after configuring a
90 couple of kernels you don't even remember that it was difficult ;)
91 </p>
92
93 <p>
94 However, one thing <e>is</e> true: you must know your system when you start
95 configuring a kernel manually. Most information can be gathered by emerging
96 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
97 be able to use <c>lspci</c> within the chrooted environment. You may safely
98 ignore any <e>pcilib</e> warnings (like pcilib: cannot open
99 /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
100 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
101 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
102 uses (it might provide you with a nice hint on what to enable).
103 </p>
104
105 <p>
106 Now go to your kernel source directory and execute <c>make menuconfig</c>. This
107 will fire up an ncurses-based configuration menu.
108 </p>
109
110 <pre caption="Invoking menuconfig">
111 # <i>cd /usr/src/linux</i>
112 # <i>make menuconfig</i>
113 </pre>
114
115 <p>
116 You will be greeted with several configuration sections. We'll first list some
117 options you must activate (otherwise Gentoo will not function, or not function
118 properly without additional tweaks).
119 </p>
120
121 </body>
122 </subsection>
123 <subsection>
124 <title>Activating Required Options</title>
125 <body>
126
127 <p>
128 First go to <c>File Systems</c> and select support for the filesystems you use.
129 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
130 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
131 file system</c>:
132 </p>
133
134 <pre caption="Selecting necessary file systems">
135 File systems ---&gt;
136 Pseudo Filesystems ---&gt;
137 [*] /proc file system support
138 [*] Virtual memory file system support (former shm fs)
139
140 <comment>(Select one or more of the following options as needed by your system)</comment>
141 &lt;*&gt; Ext3 journalling file system support
142 &lt;*&gt; Second extended fs support
143 </pre>
144
145 <p>
146 If you are using PPPoE to connect to the Internet or you are using a dial-up
147 modem, you will need the following options in the kernel:
148 </p>
149
150 <pre caption="Selecting PPPoE necessary drivers">
151 Device Drivers ---&gt;
152 Networking support ---&gt;
153 &lt;*&gt; PPP (point-to-point protocol) support
154 &lt;*&gt; PPP support for async serial ports
155 &lt;*&gt; PPP support for sync tty ports
156 </pre>
157
158 <p>
159 The two compression options won't harm but are not definitely needed, neither
160 does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
161 when configured to do kernel mode PPPoE.
162 </p>
163
164 <p>
165 Now activate the correct bus-support:
166 </p>
167
168 <pre caption="Activating SBUS/UPA">
169 Console drivers ---&gt;
170 Frame-buffer support ---&gt;
171 [*] SBUS and UPA framebuffers
172 [*] Creator/Creator3D support <comment>(Only for UPA slot adapter used in many Ultras)</comment>
173 [*] CGsix (GX,TurboGX) support <comment>(Only for SBUS slot adapter used in many SPARCStations)</comment>
174 </pre>
175
176 <p>
177 Of course you want support for the OBP:
178 </p>
179
180 <pre caption="Activating OBP Support">
181 Misc Linux/SPARC drivers ---&gt;
182 [*] /dev/openprom device support
183 </pre>
184
185 <p>
186 You will also need SCSI-specific support:
187 </p>
188
189 <pre caption="Activating SCSI-specific support">
190 SCSI support ---&gt;
191 SCSI low-level drivers ---&gt;
192 &lt;*&gt; Sparc ESP Scsi Driver <comment>(Only for SPARC ESP on-board SCSI adapter)</comment>
193 &lt;*&gt; PTI Qlogic, ISP Driver <comment>(Only for SBUS SCSI controllers from PTI or QLogic)</comment>
194 &lt;*&gt; SYM53C8XX Version 2 SCSI support <comment>(Only for Ultra 60 on-board SCSI adapter)</comment>
195 </pre>
196
197 <p>
198 To support your network card, select one of the following:
199 </p>
200
201 <pre caption="Activating networking support">
202 Network device support ---&gt;
203 Ethernet (10 or 100Mbit) ---&gt;
204 &lt;*&gt; Sun LANCE support <comment>(Only for SPARCStation, older Ultra systems, and as Sbus option)</comment>
205 &lt;*&gt; Sun Happy Meal 10/100baseT support <comment>(Only for Ultra; also supports "qfe" quad-ethernet on PCI and Sbus)</comment>
206 &lt;*&gt; DECchip Tulip (dc21x4x) PCI support <comment>(For some Netras, like N1)</comment>
207 Ethernet (1000Mbit) ---&gt;
208 &lt;*&gt; Broadcom Tigon3 support <comment>(Modern Netra, Sun Fire machines)</comment>
209 </pre>
210
211 <p>
212 When you have a 4-port Ethernet machine (10/100 or 10/100/1000) the port order
213 is different from the one used by Solaris. You can use <c>sys-apps/ethtool</c>
214 to check the port link status.
215 </p>
216
217 <p>
218 If you're using a qla2xxx disk controller, you'll need to be a 2.6.27 kernel or
219 newer, and you'll also need to emerge <c>sys-block/qla-fc-firmware</c>. Next,
220 run <c>make menuconfig</c> and navigate to the Device Drivers section. You'll
221 need to add support for loading external firmware.
222 </p>
223
224 <pre caption="Enabling external firmware">
225 Device Drivers ---&gt;
226 Generic Driver Options ---&gt;
227 () External firmware blobs to build into the kernel binary
228 () Firmware blobs root directory
229 </pre>
230
231 <p>
232 Set "External firmware blobs" to <path>ql2200_fw.bin</path> and "Firmware blobs
233 root directory" to <path>/lib/firmware</path>.
234 </p>
235
236 <p>
237 When you're done configuring your kernel, continue with <uri
238 link="#compiling">Compiling and Installing</uri>. However, after having
239 compiled the kernel, check its size:
240 </p>
241
242 <pre caption="Check kernel size">
243 # <i>ls -lh vmlinux</i>
244 -rw-r--r-- 1 root root 2.4M Oct 25 14:38 vmlinux
245 </pre>
246
247 <p>
248 If the (uncompressed) size is bigger than 7.5 MB, reconfigure your kernel until
249 it doesn't exceed these limits. One way of accomplishing this is by having most
250 kernel drivers compiled as modules. Ignoring this can lead to a non-booting
251 kernel.
252 </p>
253
254 <p>
255 Also, if your kernel is just a tad too big, you can try stripping it using the
256 <c>strip</c> command:
257 </p>
258
259 <pre caption="Stripping the kernel">
260 # <i>strip -R .comment -R .note vmlinux</i>
261 </pre>
262
263 </body>
264 </subsection>
265 <subsection id="compiling">
266 <title>Compiling and Installing</title>
267 <body>
268
269 <p>
270 Now that your kernel is configured, it is time to compile and install it. Exit
271 the configuration and start the compilation process:
272 </p>
273
274 <pre caption="Compiling the kernel">
275 # <i>make CROSS_COMPILE=sparc64-unknown-linux-gnu- &amp;&amp; make CROSS_COMPILE=sparc64-unknown-linux-gnu- image modules_install</i>
276 </pre>
277
278 <p>
279 When the kernel has finished compiling, copy the kernel image to
280 <path>/boot</path>. Remember to replace <path>&lt;kernel-version&gt;</path>
281 with your actual kernel version.
282 </p>
283
284 <pre caption="Installing the kernel">
285 # <i>cp arch/sparc/boot/image /boot/&lt;kernel-version&gt;</i>
286 </pre>
287
288 <p>
289 Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
290 </p>
291
292 </body>
293 </subsection>
294 </section>
295 <section id="kernel_modules">
296 <title>Kernel Modules</title>
297
298 <subsection>
299 <include href="hb-install-kernelmodules.xml"/>
300 </subsection>
301
302 </section>
303 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20