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.37 2010/07/21 01:55:53 nightmorph Exp $ --> |
8 |
|
9 |
<sections> |
10 |
|
11 |
<abstract> |
12 |
The Linux kernel is the core of every distribution. This chapter |
13 |
explains how to configure your kernel. |
14 |
</abstract> |
15 |
|
16 |
<version>11</version> |
17 |
<date>2012-02-22</date> |
18 |
|
19 |
<section> |
20 |
<title>Timezone</title> |
21 |
<body> |
22 |
|
23 |
<p> |
24 |
You first need to select your timezone so that your system knows where it is |
25 |
located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy |
26 |
it to <path>/etc/localtime</path>. Please avoid the |
27 |
<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
28 |
indicate the expected zones. For instance, <path>GMT-8</path> is in fact |
29 |
GMT+8. |
30 |
</p> |
31 |
|
32 |
<pre caption="Setting the timezone information"> |
33 |
# <i>ls /usr/share/zoneinfo</i> |
34 |
<comment>(Suppose you want to use Europe/Brussels)</comment> |
35 |
# <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i> |
36 |
<comment>(Next set the timezone)</comment> |
37 |
# <i>echo "Europe/Brussels" > /etc/timezone</i> |
38 |
</pre> |
39 |
|
40 |
</body> |
41 |
</section> |
42 |
<section> |
43 |
<title>Installing the Sources</title> |
44 |
<subsection> |
45 |
<title>Choosing a Kernel</title> |
46 |
<body> |
47 |
|
48 |
<p> |
49 |
The core around which all distributions are built is the Linux kernel. It is the |
50 |
layer between the user programs and your system hardware. Gentoo provides its |
51 |
users several possible kernel sources. A full listing with description is |
52 |
available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel |
53 |
Guide</uri>. |
54 |
</p> |
55 |
|
56 |
<p> |
57 |
For <keyval id="arch"/>-based systems we have <c>gentoo-sources</c> |
58 |
(kernel source patched for extra features). |
59 |
</p> |
60 |
|
61 |
<p> |
62 |
Choose your kernel source and install it using <c>emerge</c>. |
63 |
</p> |
64 |
|
65 |
<pre caption="Installing a kernel source"> |
66 |
# <i>emerge gentoo-sources</i> |
67 |
</pre> |
68 |
|
69 |
<p> |
70 |
When you take a look in <path>/usr/src</path> you should see a symlink called |
71 |
<path>linux</path> pointing to your kernel source. In this case, the installed |
72 |
kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>. |
73 |
Your version may be different, so keep this in mind. |
74 |
</p> |
75 |
|
76 |
<pre caption="Viewing the kernel source symlink"> |
77 |
# <i>ls -l /usr/src/linux</i> |
78 |
lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-<keyval id="kernel-version"/> |
79 |
</pre> |
80 |
|
81 |
<p> |
82 |
Now it is time to configure and compile your kernel source. There is the ability |
83 |
to use <c>genkernel</c> which would create a generic kernel like the ones used |
84 |
on the installation CDs, but it is not fully functional for PPC64 at the |
85 |
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 |
<pre caption="Invoking menuconfig"> |
120 |
# <i>cd /usr/src/linux</i> |
121 |
<comment>Important: In case you are in 32-bit userland, you must edit the top |
122 |
level Makefile in /usr/src/linux and change the CROSS_COMPILE option to |
123 |
CROSS_COMPILE ?= powerpc64-unknown-linux-gnu-. You must do this before you run |
124 |
make menuconfig or it may result in kernel compilation problems.</comment> |
125 |
# <i>make menuconfig</i> |
126 |
</pre> |
127 |
|
128 |
<p> |
129 |
You will be greeted with several configuration sections. We'll first list some |
130 |
options you must activate (otherwise Gentoo will not function, or not function |
131 |
properly without additional tweaks). |
132 |
</p> |
133 |
|
134 |
</body> |
135 |
</subsection> |
136 |
<subsection> |
137 |
<title>Activating Required Options</title> |
138 |
<body> |
139 |
|
140 |
<p> |
141 |
First go to <c>File Systems</c> and select support for the filesystems you use. |
142 |
<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be |
143 |
able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc file |
144 |
system</c>, and <c>/dev/pts file system for Unix98 PTYs</c>: |
145 |
</p> |
146 |
|
147 |
<pre caption="Selecting necessary file systems"> |
148 |
File systems ---> |
149 |
[*] Virtual memory file system support (former shm fs) |
150 |
[*] /proc file system support |
151 |
[*] /dev/pts file system for Unix98 PTYs |
152 |
|
153 |
<comment>(Select one or more of the following options as needed by your system)</comment> |
154 |
<*> Reiserfs support |
155 |
<*> Ext3 journalling file system support |
156 |
<*> JFS filesystem support |
157 |
<*> Second extended fs support |
158 |
<*> XFS filesystem support |
159 |
</pre> |
160 |
|
161 |
<note> |
162 |
You will find some of the mentioned options under <c>Pseudo |
163 |
filesystems</c> which is a subpart of <c>File systems</c>. |
164 |
</note> |
165 |
|
166 |
<p> |
167 |
If you are using PPPoE to connect to the Internet or you are using a |
168 |
dial-up modem, you will need the following options in the kernel (you |
169 |
will find the mentioned options under <c>Networking support</c> which is |
170 |
a subpart of <c>Device Drivers</c>): |
171 |
</p> |
172 |
|
173 |
<pre caption="Selecting PPPoE necessary drivers"> |
174 |
Network device support ---> |
175 |
<*> PPP (point-to-point protocol) support |
176 |
<*> PPP support for async serial ports |
177 |
<*> PPP support for sync tty ports |
178 |
</pre> |
179 |
|
180 |
<p> |
181 |
The two compression options won't harm but are not definitely needed, neither |
182 |
does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c> |
183 |
when configured to do kernel mode PPPoE. |
184 |
</p> |
185 |
|
186 |
<p> |
187 |
If you require it, don't forget to include support in the kernel for your |
188 |
ethernet card. |
189 |
</p> |
190 |
|
191 |
<p> |
192 |
When you're done configuring your kernel, continue with <uri |
193 |
link="#compiling">Compiling and Installing</uri>. |
194 |
</p> |
195 |
|
196 |
</body> |
197 |
</subsection> |
198 |
<subsection id="compiling"> |
199 |
<title>Compiling and Installing</title> |
200 |
<body> |
201 |
|
202 |
<p> |
203 |
Now that your kernel is configured, it is time to compile and install it. Exit |
204 |
the configuration and start the compilation process: |
205 |
</p> |
206 |
|
207 |
<pre caption="Compiling the kernel"> |
208 |
(Apple/IBM) # <i>make && make modules_install</i> |
209 |
</pre> |
210 |
|
211 |
<p> |
212 |
When the kernel has finished compiling, copy the kernel image to |
213 |
<path>/boot</path>. |
214 |
</p> |
215 |
|
216 |
<pre caption="Installing the kernel"> |
217 |
(Apple/IBM) # <i>cp vmlinux /boot/<keyval id="kernel-name"/></i> |
218 |
</pre> |
219 |
|
220 |
<p> |
221 |
Now continue with <uri link="#kernel_modules">Kernel Modules</uri>. |
222 |
</p> |
223 |
|
224 |
</body> |
225 |
</subsection> |
226 |
</section> |
227 |
<section id="kernel_modules"> |
228 |
<title>Kernel Modules</title> |
229 |
|
230 |
<subsection> |
231 |
<include href="hb-install-kernelmodules.xml"/> |
232 |
</subsection> |
233 |
|
234 |
</section> |
235 |
</sections> |