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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.49 - (hide annotations) (download) (as text)
Fri Aug 12 19:05:02 2011 UTC (3 years ago) by swift
Branch: MAIN
Changes since 1.48: +2 -2 lines
File MIME type: application/xml
Fix bug #375757 - Use initramfs abbreviation, not initrd

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 neysx 1.27 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 swift 1.1
7 swift 1.49 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-hppa-kernel.xml,v 1.48 2011/08/03 08:22:56 jkt Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.9
11 jkt 1.48 <version>11</version>
12     <date>2011-08-03</date>
13 swift 1.9
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 neysx 1.39 located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy
21     it to <path>/etc/localtime</path>. Please avoid the
22 neysx 1.27 <path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
23 neysx 1.39 indicate the expected zones. For instance, <path>GMT-8</path> is in fact
24     GMT+8.
25 swift 1.1 </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 neysx 1.39 # <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
31 swift 1.1 </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 nightmorph 1.47 For <keyval id="arch"/>-based systems we have <c>gentoo-sources</c>
51     (kernel source patched for extra features).
52     </p>
53    
54     <p>
55     Choose your kernel source and install it using <c>emerge</c>.
56 swift 1.1 </p>
57    
58 swift 1.25 <pre caption="Installing a kernel source">
59 nightmorph 1.46 # <i>emerge gentoo-sources</i>
60 swift 1.1 </pre>
61    
62     <p>
63     When you take a look in <path>/usr/src</path> you should see a symlink called
64 neysx 1.30 <path>linux</path> pointing to your kernel source. In this case, the installed
65 nightmorph 1.47 kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
66     Your version may be different, so keep this in mind.
67 swift 1.1 </p>
68    
69     <pre caption="Viewing the kernel source symlink">
70     # <i>ls -l /usr/src/linux</i>
71 nightmorph 1.38 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
72 swift 1.1 </pre>
73    
74     <p>
75     Now it is time to configure and compile your kernel source. All architectures
76     can use <c>genkernel</c> for this, which will build a generic kernel as used
77 swift 1.25 by the Installation CD. We explain the "manual" configuration first though, as
78     it is the best way to optimize your environment.
79 swift 1.1 </p>
80    
81     <p>
82     If you want to manually configure your kernel, continue now with <uri
83     link="#manual">Default: Manual Configuration</uri>. If you want to use
84     <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
85     genkernel</uri> instead.
86     </p>
87    
88     </body>
89     </subsection>
90     </section>
91     <section id="manual">
92     <title>Default: Manual Configuration</title>
93     <subsection>
94     <title>Introduction</title>
95     <body>
96    
97     <p>
98 neysx 1.7 Manually configuring a kernel is often seen as the most difficult procedure a
99 neysx 1.8 Linux user ever has to perform. Nothing is less true -- after configuring a
100 swift 1.1 couple of kernels you don't even remember that it was difficult ;)
101     </p>
102    
103     <p>
104     However, one thing <e>is</e> true: you must know your system when you start
105 swift 1.20 configuring a kernel manually. Most information can be gathered by emerging
106 swift 1.21 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
107 swift 1.20 be able to use <c>lspci</c> within the chrooted environment. You may safely
108     ignore any <e>pcilib</e> warnings (like pcilib: cannot open
109     /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
110 swift 1.21 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
111 swift 1.20 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
112     uses (it might provide you with a nice hint on what to enable).
113 swift 1.1 </p>
114    
115     <p>
116     Now go to your kernel source directory and execute <c>make menuconfig</c>. This
117     will fire up an ncurses-based configuration menu.
118     </p>
119    
120     <pre caption="Invoking menuconfig">
121     # <i>cd /usr/src/linux</i>
122     # <i>make menuconfig</i>
123     </pre>
124    
125     <p>
126     You will be greeted with several configuration sections. We'll first list some
127     options you must activate (otherwise Gentoo will not function, or not function
128     properly without additional tweaks).
129     </p>
130    
131     </body>
132     </subsection>
133     <subsection>
134     <title>Activating Required Options</title>
135     <body>
136    
137     <p>
138 nightmorph 1.46 First go to <c>File Systems</c> and select support for the filesystems you use.
139 swift 1.1 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
140 neysx 1.30 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
141     file system</c>:
142 swift 1.1 </p>
143    
144     <pre caption="Selecting necessary file systems">
145 neysx 1.4 File systems ---&gt;
146     Pseudo Filesystems ---&gt;
147     [*] /proc file system support
148     [*] Virtual memory file system support (former shm fs)
149 swift 1.1
150     <comment>(Select one or more of the following options as needed by your system)</comment>
151     &lt;*&gt; Reiserfs support
152     &lt;*&gt; Ext3 journalling file system support
153     &lt;*&gt; JFS filesystem support
154     &lt;*&gt; Second extended fs support
155     &lt;*&gt; XFS filesystem support
156     </pre>
157    
158     <p>
159     If you are using PPPoE to connect to the Internet or you are using a dial-up
160     modem, you will need the following options in the kernel:
161     </p>
162    
163     <pre caption="Selecting PPPoE necessary drivers">
164 neysx 1.4 Device Drivers ---&gt;
165     Networking support ---&gt;
166     &lt;*&gt; PPP (point-to-point protocol) support
167     &lt;*&gt; PPP support for async serial ports
168     &lt;*&gt; PPP support for sync tty ports
169 swift 1.1 </pre>
170    
171     <p>
172     The two compression options won't harm but are not definitely needed, neither
173 nightmorph 1.38 does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
174     when configured to do kernel mode PPPoE.
175 swift 1.1 </p>
176    
177     <p>
178     If you require it, don't forget to include support in the kernel for your
179     ethernet card.
180     </p>
181    
182     <p>
183     If you have a HIL mouse or keyboard, do not forget to compile in support for
184     them.
185     </p>
186    
187 swift 1.25 <pre caption="Activating HIL support">
188     Input core support ---&gt;
189     [*] Keyboard support
190     [*] Mouse support
191     [*] Event interface support
192 swift 1.1 </pre>
193    
194 swift 1.25 <p>
195     If you have no mouse on your HIL port, only use the basic support:
196     </p>
197    
198     <pre caption="Basic HIL support">
199     HIL support ---&gt;
200     [*] HIL Keyboard (basic) support
201     </pre>
202    
203     <p>
204     If you however want <e>full</e> HIL support, select the following options:
205     </p>
206    
207     <pre caption="Full HIL support">
208     HIL support ---&gt;
209     [*] HP System Device Controller i8042 Support
210     [*] HIL MLC Support
211     [*] HIL Keyboard (full) support
212     [*] HIL Mouse &amp; Pointer support
213     </pre>
214 swift 1.1
215     <p>
216     Also include display driver support:
217     </p>
218    
219     <pre caption="Display Driver support">
220     Graphics support ---&gt;
221     [*] Support for frame buffer devices
222     [*] HP STI frame buffer device support
223     Console display driver support ---&gt;
224     [*] STI text console
225     </pre>
226    
227     <p>
228 nightmorph 1.47 When you've finished configuring the kernel, continue with <uri
229 swift 1.1 link="#compiling">Compiling and Installing</uri>.
230     </p>
231    
232     </body>
233     </subsection>
234     <subsection id="compiling">
235     <title>Compiling and Installing</title>
236     <body>
237    
238 nightmorph 1.36 <impo>
239     If you want to compile a 64-bit kernel, you'll need to first emerge
240     <c>kgcc64</c>. However, running a 64-bit kernel is discouraged. You should only
241     run a 64-bit kernel if you have more than 4GB of RAM or if your server requires
242     it, i.e. on the A500.
243     </impo>
244    
245 swift 1.1 <p>
246     Now that your kernel is configured, it is time to compile and install it. Exit
247 swift 1.18 the configuration and start the compilation process:
248 swift 1.1 </p>
249    
250     <pre caption="Compiling the kernel">
251     # <i>make &amp;&amp; make modules_install</i>
252     </pre>
253    
254     <p>
255 neysx 1.7 When the kernel has finished compiling, copy the kernel image to
256 neysx 1.30 <path>/boot</path>. Use whatever name you feel is appropriate for your kernel
257     choice and remember it as you will need it later on when you configure your
258 nightmorph 1.47 bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the
259 neysx 1.30 name and version of your kernel.
260 swift 1.1 </p>
261    
262     <pre caption="Installing the kernel">
263 nightmorph 1.47 # <i>cp vmlinux /boot/<keyval id="kernel-name"/></i>
264 swift 1.1 </pre>
265    
266     <p>
267 nightmorph 1.46 Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
268 swift 1.1 </p>
269    
270     </body>
271     </subsection>
272     </section>
273     <section id="genkernel">
274     <title>Alternative: Using genkernel</title>
275     <body>
276    
277     <p>
278     If you are reading this section, you have chosen to use our <c>genkernel</c>
279     script to configure your kernel for you.
280     </p>
281    
282     <p>
283 nightmorph 1.38 Now that your kernel source tree is installed, it's now time to compile your
284     kernel by using our <c>genkernel</c> script to automatically build a kernel for
285     you. <c>genkernel</c> works by configuring a kernel nearly identically to the
286     way our Installation CD kernel is configured. This means that when you use
287     <c>genkernel</c> to build your kernel, your system will generally detect all
288     your hardware at boot-time, just like our Installation CD does. Because
289     genkernel doesn't require any manual kernel configuration, it is an ideal
290     solution for those users who may not be comfortable compiling their own
291     kernels.
292 swift 1.1 </p>
293    
294     <p>
295     Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
296     </p>
297    
298     <pre caption="Emerging genkernel">
299     # <i>emerge genkernel</i>
300     </pre>
301    
302     <p>
303     Now, compile your kernel sources by running <c>genkernel all</c>.
304     Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
305     hardware, this compilation will take quite a while to finish!
306     </p>
307    
308     <p>
309     Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
310     need to manually configure your kernel using <c>genkernel --menuconfig all</c>
311     and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
312     module).
313     </p>
314    
315     <pre caption="Running genkernel">
316     # <i>genkernel all</i>
317     </pre>
318    
319     <p>
320     Once <c>genkernel</c> completes, a kernel, full set of modules and
321 swift 1.49 <e>initial ram disk</e> (initramfs) will be created. We will use the kernel
322 swift 1.1 and initrd when configuring a boot loader later in this document. Write
323     down the names of the kernel and initrd as you will need it when writing
324     the bootloader configuration file. The initrd will be started immediately after
325 swift 1.25 booting to perform hardware autodetection (just like on the Installation CD)
326     before your "real" system starts up.
327 swift 1.1 </p>
328    
329     <pre caption="Checking the created kernel image name and initrd">
330 swift 1.26 # <i>ls /boot/kernel* /boot/initramfs*</i>
331 swift 1.1 </pre>
332    
333     </body>
334     </section>
335     <section id="kernel_modules">
336 nightmorph 1.46 <title>Kernel Modules</title>
337    
338 swift 1.1 <subsection>
339 nightmorph 1.46 <include href="hb-install-kernelmodules.xml"/>
340     </subsection>
341 swift 1.1
342     </section>
343     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20