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

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

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

Revision 1.6 Revision 1.21
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-alpha-kernel.xml,v 1.6 2004/08/21 04:43:14 vapier Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.21 2005/03/28 11:30:52 swift Exp $ -->
8 8
9<sections> 9<sections>
10
11<version>2.00</version>
12<date>2005-03-28</date>
13
10<section> 14<section>
11<title>Timezone</title> 15<title>Timezone</title>
12<body> 16<body>
13 17
14<p> 18<p>
38available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 42available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
39Guide</uri>. 43Guide</uri>.
40</p> 44</p>
41 45
42<p> 46<p>
43For alpha-based systems we have <c>vanilla-sources</c> (the default kernel 47For alpha-based systems we have <c>vanilla-sources</c> (the default 2.6 kernel source).
44source as developed by the linux-kernel developers), <c>alpha-sources</c>
45(kernel source optimized for alpha users) and <c>compaq-sources</c> (kernel
46source as used by RedHat for Alpha, maintained by Compaq).
47</p> 48</p>
48 49
49<p> 50<p>
50Choose your kernel source and install it using <c>emerge</c>. 51Choose your kernel source and install it using <c>emerge</c>.
51</p> 52</p>
64<path>linux</path> pointing to your kernel source: 65<path>linux</path> pointing to your kernel source:
65</p> 66</p>
66 67
67<pre caption="Viewing the kernel source symlink"> 68<pre caption="Viewing the kernel source symlink">
68# <i>ls -l /usr/src/linux</i> 69# <i>ls -l /usr/src/linux</i>
69lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.4.24 70lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.11.2
70</pre> 71</pre>
71 72
72<p> 73<p>
73If this isn't the case (i.e. the symlink points to a different kernel source) 74If this isn't the case (i.e. the symlink points to a different kernel source)
74change the symlink before you continue: 75change the symlink before you continue:
75</p> 76</p>
76 77
77<pre caption="Changing the kernel source symlink"> 78<pre caption="Changing the kernel source symlink">
78# <i>rm /usr/src/linux</i> 79# <i>rm /usr/src/linux</i>
79# <i>cd /usr/src</i> 80# <i>cd /usr/src</i>
80# <i>ln -s linux-2.4.24 linux</i> 81# <i>ln -s linux-2.6.11.2 linux</i>
81</pre> 82</pre>
82 83
83<p> 84<p>
84Now it is time to configure and compile your kernel source. You 85Now it is time to configure and compile your kernel source. You
85can use <c>genkernel</c> for this, which will build a generic kernel as used 86can use <c>genkernel</c> for this, which will build a generic kernel as used
86by the LiveCD. We explain the "manual" configuration first though, as it is 87by the Installation CD. We explain the "manual" configuration first though, as it is
87the best way to optimize your environment. 88the best way to optimize your environment.
88</p> 89</p>
89 90
90<p> 91<p>
91If you want to manually configure your kernel, continue now with <uri 92If you want to manually configure your kernel, continue now with <uri
102<subsection> 103<subsection>
103<title>Introduction</title> 104<title>Introduction</title>
104<body> 105<body>
105 106
106<p> 107<p>
107Manually configuring a kernel is often seen as the most difficult course every 108Manually configuring a kernel is often seen as the most difficult procedure a
108Linux users ever has to go through. Nothing is less true -- after configuring a 109Linux user ever has to perform. Nothing is less true -- after configuring a
109couple of kernels you don't even remember that it was difficult ;) 110couple of kernels you don't even remember that it was difficult ;)
110</p> 111</p>
111 112
112<p> 113<p>
113However, one thing <e>is</e> true: you must know your system when you start 114However, one thing <e>is</e> true: you must know your system when you start
114configuring a kernel manually. Most information can be gathered by viewing the 115configuring a kernel manually. Most information can be gathered by viewing the
115contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You 116contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You
116can also run <c>lsmod</c> to see what kernel modules the LiveCD uses (it might 117can also run <c>lsmod</c> to see what kernel modules the Installation CD uses (it might
117provide you with a nice hint on what to enable). 118provide you with a nice hint on what to enable).
118</p> 119</p>
119 120
120<p> 121<p>
121Now go to your kernel source directory and execute <c>make menuconfig</c>. This 122Now go to your kernel source directory and execute <c>make menuconfig</c>. This
151 152
152<p> 153<p>
153Now go to <c>File Systems</c> and select support for the filesystems you use. 154Now go to <c>File Systems</c> and select support for the filesystems you use.
154<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 155<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
155able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc 156able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc
156file system</c>, <c>/dev file system</c> + <c>Automatically mount at boot</c>: 157file system</c>, (<c>/dev file system</c> + <c>Automatically mount at boot</c> only for 2.4 kernel):
157</p> 158</p>
158 159
159<pre caption="Selecting necessary file systems"> 160<pre caption="Selecting necessary file systems">
160<comment>(With a 2.4.x kernel)</comment> 161<comment>(With a 2.4.x kernel)</comment>
161File systems ---&gt; 162File systems ---&gt;
167 168
168<comment>(With a 2.6.x kernel)</comment> 169<comment>(With a 2.6.x kernel)</comment>
169File systems ---&gt; 170File systems ---&gt;
170 Pseudo Filesystems ---&gt; 171 Pseudo Filesystems ---&gt;
171 [*] /proc file system support 172 [*] /proc file system support
172 [*] /dev file system support (OBSOLETE) 173 [ ] /dev file system support (OBSOLETE)
173 [*] Automatically mount at boot
174 [*] Virtual memory file system support (former shm fs) 174 [*] Virtual memory file system support (former shm fs)
175 175
176<comment>(Select one or more of the following options as needed by your system)</comment> 176<comment>(Select one or more of the following options as needed by your system)</comment>
177 &lt;*&gt; Reiserfs support 177 &lt;*&gt; Reiserfs support
178 &lt;*&gt; Ext3 journalling file system support 178 &lt;*&gt; Ext3 journalling file system support
211If you require it, don't forget to include support in the kernel for your 211If you require it, don't forget to include support in the kernel for your
212ethernet card. 212ethernet card.
213</p> 213</p>
214 214
215<p> 215<p>
216The following Alpha-specific options are recommended as well: 216The following options are recommended as well:
217</p> 217</p>
218 218
219<pre caption="Alpha-specific options"> 219<pre caption="Recommended Alpha options">
220General setup ---&gt; 220General setup ---&gt;
221 &lt;*&gt; SRM environment through procfs 221 &lt;*&gt; SRM environment through procfs
222 &lt;*&gt; Configure uac policy via sysctl 222 &lt;*&gt; Configure uac policy via sysctl
223 223
224Plug and Play configuration ---&gt; 224Plug and Play configuration ---&gt;
281<title>Compiling and Installing</title> 281<title>Compiling and Installing</title>
282<body> 282<body>
283 283
284<p> 284<p>
285Now that your kernel is configured, it is time to compile and install it. Exit 285Now that your kernel is configured, it is time to compile and install it. Exit
286the configuration and run <c>make dep &amp;&amp; make vmlinux modules 286the configuration and start the compilation process:
287modules_install</c>:
288</p> 287</p>
289 288
290<pre caption="Compiling the kernel"> 289<pre caption="Compiling the kernel">
291<comment>(For 2.4 kernel)</comment> 290<comment>(For 2.4 kernel)</comment>
292# <i>make dep &amp;&amp; make vmlinux modules modules_install</i> 291# <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
297<comment>(For all kernels)</comment> 296<comment>(For all kernels)</comment>
298# <i>make boot</i> 297# <i>make boot</i>
299</pre> 298</pre>
300 299
301<p> 300<p>
302When the kernel is done compiling, copy over the kernel image to 301When the kernel has finished compiling, copy the kernel image to
303<path>/boot</path>. In the next example we assume you have configured and 302<path>/boot</path>. In the next example we assume you have configured and
304compiled <c>vanilla-sources-2.4.24</c>: 303compiled <c>vanilla-sources-2.6.11.2</c>; recent kernels might create
304<path>vmlinux</path> instead of <path>vmlinux.gz</path>.
305</p> 305</p>
306 306
307<pre caption="Installing the kernel"> 307<pre caption="Installing the kernel">
308# <i>cp arch/alpha/boot/vmlinux.gz /boot/</i> 308# <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
309# <i>cp System.map /boot/System.map-2.4.24</i> 309# <i>cp System.map /boot/System.map-2.6.11.2</i>
310</pre> 310</pre>
311 311
312<p> 312<p>
313It is also wise to copy over your kernel configuration file to 313It is also wise to copy over your kernel configuration file to
314<path>/boot</path>, just in case :) 314<path>/boot</path>, just in case :)
315</p> 315</p>
316 316
317<pre caption="Backing up your kernel configuration"> 317<pre caption="Backing up your kernel configuration">
318# <i>cp .config /boot/config-2.4.24</i> 318# <i>cp .config /boot/config-2.6.11.2</i>
319</pre> 319</pre>
320 320
321<p> 321<p>
322Now continue with <uri link="#kernel_modules">Installing Separate Kernel 322Now continue with <uri link="#kernel_modules">Installing Separate Kernel
323Modules</uri>. 323Modules</uri>.
337 337
338<p> 338<p>
339Now that your kernel source tree is installed, it's now time to compile your 339Now that your kernel source tree is installed, it's now time to compile your
340kernel by using our <c>genkernel</c> script to automatically build a kernel for 340kernel by using our <c>genkernel</c> script to automatically build a kernel for
341you. <c>genkernel</c> works by configuring a kernel nearly identically to the 341you. <c>genkernel</c> works by configuring a kernel nearly identically to the
342way our LiveCD kernel is configured. This means that when you use 342way our Installation CD kernel is configured. This means that when you use
343<c>genkernel</c> to build your kernel, your system will generally detect all 343<c>genkernel</c> to build your kernel, your system will generally detect all
344your hardware at boot-time, just like our Live CD does. Because genkernel 344your hardware at boot-time, just like our Installation CD does. Because genkernel
345doesn't require any manual kernel configuration, it is an ideal solution for 345doesn't require any manual kernel configuration, it is an ideal solution for
346those users who may not be comfortable compiling their own kernels. 346those users who may not be comfortable compiling their own kernels.
347</p> 347</p>
348 348
349<p> 349<p>
369 369
370<pre caption="Running genkernel"> 370<pre caption="Running genkernel">
371# <i>genkernel all</i> 371# <i>genkernel all</i>
372GenKernel v3.0.1_beta10 372GenKernel v3.0.1_beta10
373* ARCH: Alpha 373* ARCH: Alpha
374* KERNEL VER: 2.4.24 374* KERNEL VER: 2.6.11.2
375* kernel: configuring source 375* kernel: configuring source
376* kernel: running mrproper 376* kernel: running mrproper
377<comment>(Output removed to increase readability)</comment> 377<comment>(Output removed to increase readability)</comment>
378* Kernel compiled successfully! 378* Kernel compiled successfully!
379* Required Kernel Params: 379* Required Kernel Params:
396Once <c>genkernel</c> completes, a kernel, full set of modules and 396Once <c>genkernel</c> completes, a kernel, full set of modules and
397<e>initial root disk</e> (initrd) will be created. We will use the kernel 397<e>initial root disk</e> (initrd) will be created. We will use the kernel
398and initrd when configuring a boot loader later in this document. Write 398and initrd when configuring a boot loader later in this document. Write
399down the names of the kernel and initrd as you will need it when writing 399down the names of the kernel and initrd as you will need it when writing
400the bootloader configuration file. The initrd will be started immediately after 400the bootloader configuration file. The initrd will be started immediately after
401booting to perform hardware autodetection (just like on the Live CD) before 401booting to perform hardware autodetection (just like on the Installation CD) before
402your "real" system starts up. 402your "real" system starts up.
403</p> 403</p>
404 404
405<pre caption="Checking the created kernel image name and initrd"> 405<pre caption="Checking the created kernel image name and initrd">
406# <i>ls /boot/kernel* /boot/initrd*</i> 406# <i>ls /boot/kernel* /boot/initrd*</i>
407</pre> 407</pre>
408 408
409<p> 409<p>
410Now, let's perform one more step to get our system to be more like the Live 410Now, let's perform one more step to get our system to be more like the Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects hardware that
411CD -- let's emerge <c>hotplug</c>. While the initrd autodetects hardware that
412is needed to boot your system, <c>hotplug</c> autodetects everything else. 411is needed to boot your system, <c>coldplug</c> autodetects everything else.
413To emerge and enable <c>hotplug</c>, type the following: 412To emerge and enable <c>coldplug</c>, type the following:
413</p>
414
415<pre caption="Emerging and enabling coldplug">
416# <i>emerge coldplug</i>
417# <i>rc-update add coldplug boot</i>
418</pre>
419
420<p>
421If you want your system to react to hotplugging events, you would need to
422install and setup hotplug as well:
414</p> 423</p>
415 424
416<pre caption="Emerging and enabling hotplug"> 425<pre caption="Emerging and enabling hotplug">
417# <i>emerge hotplug</i> 426# <i>emerge hotplug</i>
418# <i>rc-update add hotplug default</i> 427# <i>rc-update add hotplug default</i>
439 <th>Ebuild</th> 448 <th>Ebuild</th>
440 <th>Purpose</th> 449 <th>Purpose</th>
441 <th>Command</th> 450 <th>Command</th>
442</tr> 451</tr>
443<tr> 452<tr>
444 <ti>xfree-drm</ti> 453 <ti>x11-drm</ti>
445 <ti> 454 <ti>
446 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and 455 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
447 other cards for XFree86. Please check the <c>IUSE_VIDEO_CARDS</c> variable 456 other cards for xorg-x11. Please check the <c>IUSE_VIDEO_CARDS</c> variable
448 in the <path>/usr/portage/x11-base/xfree-drm</path> ebuilds to see what you 457 in the <path>/usr/portage/x11-base/x11-drm</path> ebuilds to see what you
449 need to fill in as <c>yourcard</c>. 458 need to fill in as <c>yourcard</c>.
450 </ti> 459 </ti>
451 <ti><c>VIDEO_CARDS="yourcard" emerge xfree-drm</c></ti> 460 <ti><c>VIDEO_CARDS="yourcard" emerge x11-drm</c></ti>
452</tr> 461</tr>
453</table> 462</table>
454 463
455<p> 464<p>
456Beware though, some of these ebuilds might deal with big dependencies. To verify 465Beware though, some of these ebuilds might deal with big dependencies. To verify
457what packages will be installed by emerging an ebuild, use <c>emerge 466what packages will be installed by emerging an ebuild, use <c>emerge
458--pretend</c>. For instance, for the <c>xfree-drm</c> package: 467--pretend</c>. For instance, for the <c>x11-drm</c> package:
459</p> 468</p>
460 469
461<pre caption="View full installation package listing"> 470<pre caption="View full installation package listing">
462# <i>emerge --pretend xfree-drm</i> 471# <i>emerge --pretend x11-drm</i>
463</pre> 472</pre>
464 473
465</body> 474</body>
466</subsection> 475</subsection>
467<subsection> 476<subsection>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.20