| 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 |
|
|
<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
| 6 |
|
|
|
| 7 |
sejo |
1.18 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-kernel.xml,v 1.17 2005/01/09 09:06:43 sejo Exp $ --> |
| 8 |
swift |
1.1 |
|
| 9 |
|
|
<sections> |
| 10 |
swift |
1.12 |
|
| 11 |
sejo |
1.18 |
<version>1.15</version> |
| 12 |
sejo |
1.17 |
<date>2005-01-09</date> |
| 13 |
swift |
1.12 |
|
| 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 |
|
|
located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then make a |
| 21 |
|
|
symlink to <path>/etc/localtime</path> using <c>ln</c>: |
| 22 |
|
|
</p> |
| 23 |
|
|
|
| 24 |
|
|
<pre caption="Setting the timezone information"> |
| 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> |
| 28 |
|
|
</pre> |
| 29 |
|
|
|
| 30 |
|
|
</body> |
| 31 |
|
|
</section> |
| 32 |
|
|
<section> |
| 33 |
|
|
<title>Installing the Sources</title> |
| 34 |
|
|
<subsection> |
| 35 |
|
|
<title>Choosing a Kernel</title> |
| 36 |
|
|
<body> |
| 37 |
|
|
|
| 38 |
|
|
<p> |
| 39 |
|
|
The core around which all distributions are built is the Linux kernel. It is the |
| 40 |
|
|
layer between the user programs and your system hardware. Gentoo provides its |
| 41 |
|
|
users several possible kernel sources. A full listing with description is |
| 42 |
|
|
available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel |
| 43 |
|
|
Guide</uri>. |
| 44 |
|
|
</p> |
| 45 |
|
|
|
| 46 |
|
|
<p> |
| 47 |
neysx |
1.8 |
For PPC you can choose between <c>development-sources</c> and |
| 48 |
swift |
1.16 |
<c>gentoo-dev-sources</c> (both 2.6 kernels). Beside those there is a special |
| 49 |
neysx |
1.8 |
kernel-2.6-patchset for the Pegasos: <c>pegasos-dev-sources</c>. So let's |
| 50 |
|
|
continue with <c>emerge</c>'ing the kernel sources: |
| 51 |
swift |
1.1 |
</p> |
| 52 |
|
|
|
| 53 |
|
|
<pre caption="Installing a kernel source"> |
| 54 |
dertobi123 |
1.6 |
# <i>emerge gentoo-dev-sources</i> |
| 55 |
swift |
1.1 |
</pre> |
| 56 |
|
|
|
| 57 |
|
|
<p> |
| 58 |
|
|
When you take a look in <path>/usr/src</path> you should see a symlink called |
| 59 |
|
|
<path>linux</path> pointing to your kernel source: |
| 60 |
|
|
</p> |
| 61 |
|
|
|
| 62 |
|
|
<pre caption="Viewing the kernel source symlink"> |
| 63 |
|
|
# <i>ls -l /usr/src/linux</i> |
| 64 |
swift |
1.13 |
lrwxrwxrwx 1 root root 12 Jul 10 10:55 /usr/src/linux -> linux-2.6.9 |
| 65 |
swift |
1.1 |
</pre> |
| 66 |
|
|
|
| 67 |
|
|
<p> |
| 68 |
|
|
If this isn't the case (i.e. the symlink points to a different kernel source) |
| 69 |
|
|
change the symlink before you continue: |
| 70 |
|
|
</p> |
| 71 |
|
|
|
| 72 |
|
|
<pre caption="Changing the kernel source symlink"> |
| 73 |
swift |
1.3 |
# <i>rm /usr/src/linux</i> |
| 74 |
|
|
# <i>cd /usr/src</i> |
| 75 |
swift |
1.13 |
# <i>ln -s linux-2.6.9 linux</i> |
| 76 |
swift |
1.1 |
</pre> |
| 77 |
|
|
|
| 78 |
|
|
<p> |
| 79 |
|
|
Now it is time to configure and compile your kernel source. All architectures |
| 80 |
|
|
can use <c>genkernel</c> for this, which will build a generic kernel as used |
| 81 |
|
|
by the LiveCD. We explain the "manual" configuration first though, as it is |
| 82 |
|
|
the best way to optimize your environment. |
| 83 |
|
|
</p> |
| 84 |
|
|
|
| 85 |
|
|
<p> |
| 86 |
swift |
1.2 |
Continue now with <uri link="#manual">Manual Configuration</uri>. |
| 87 |
swift |
1.1 |
</p> |
| 88 |
|
|
|
| 89 |
|
|
</body> |
| 90 |
|
|
</subsection> |
| 91 |
|
|
</section> |
| 92 |
|
|
<section id="manual"> |
| 93 |
swift |
1.2 |
<title>Manual Configuration</title> |
| 94 |
swift |
1.1 |
<subsection> |
| 95 |
|
|
<title>Introduction</title> |
| 96 |
|
|
<body> |
| 97 |
|
|
|
| 98 |
|
|
<p> |
| 99 |
neysx |
1.10 |
Manually configuring a kernel is often seen as the most difficult procedure a |
| 100 |
neysx |
1.11 |
Linux user ever has to perform. Nothing is less true -- after configuring a |
| 101 |
swift |
1.1 |
couple of kernels you don't even remember that it was difficult ;) |
| 102 |
|
|
</p> |
| 103 |
|
|
|
| 104 |
|
|
<p> |
| 105 |
|
|
However, one thing <e>is</e> true: you must know your system when you start |
| 106 |
|
|
configuring a kernel manually. Most information can be gathered by viewing the |
| 107 |
|
|
contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You |
| 108 |
|
|
can also run <c>lsmod</c> to see what kernel modules the LiveCD uses (it might |
| 109 |
|
|
provide you with a nice hint on what to enable). |
| 110 |
|
|
</p> |
| 111 |
|
|
|
| 112 |
|
|
<p> |
| 113 |
|
|
Now go to your kernel source directory and execute <c>make menuconfig</c>. This |
| 114 |
|
|
will fire up an ncurses-based configuration menu. |
| 115 |
|
|
</p> |
| 116 |
|
|
|
| 117 |
|
|
<pre caption="Invoking menuconfig"> |
| 118 |
|
|
# <i>cd /usr/src/linux</i> |
| 119 |
|
|
# <i>make menuconfig</i> |
| 120 |
|
|
</pre> |
| 121 |
|
|
|
| 122 |
|
|
<p> |
| 123 |
|
|
You will be greeted with several configuration sections. We'll first list some |
| 124 |
|
|
options you must activate (otherwise Gentoo will not function, or not function |
| 125 |
|
|
properly without additional tweaks). |
| 126 |
|
|
</p> |
| 127 |
|
|
|
| 128 |
|
|
</body> |
| 129 |
|
|
</subsection> |
| 130 |
|
|
<subsection> |
| 131 |
|
|
<title>Activating Required Options</title> |
| 132 |
|
|
<body> |
| 133 |
|
|
|
| 134 |
|
|
<p> |
| 135 |
|
|
First of all, activate the use of development and experimental code/drivers. |
| 136 |
|
|
You need this, otherwise some very important code/drivers won't show up: |
| 137 |
|
|
</p> |
| 138 |
|
|
|
| 139 |
|
|
<pre caption="Selecting experimental code/drivers"> |
| 140 |
|
|
Code maturity level options ---> |
| 141 |
|
|
[*] Prompt for development and/or incomplete code/drivers |
| 142 |
|
|
</pre> |
| 143 |
|
|
|
| 144 |
|
|
<p> |
| 145 |
|
|
Now go to <c>File Systems</c> and select support for the filesystems you use. |
| 146 |
|
|
<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be |
| 147 |
|
|
able to mount your partitions. Also select <c>Virtual memory</c>, <c>/proc |
| 148 |
sejo |
1.15 |
file system</c>: |
| 149 |
swift |
1.1 |
</p> |
| 150 |
|
|
|
| 151 |
|
|
<pre caption="Selecting necessary file systems"> |
| 152 |
dertobi123 |
1.6 |
File systems ---> |
| 153 |
|
|
Pseudo Filesystems ---> |
| 154 |
|
|
[*] /proc file system support |
| 155 |
sejo |
1.15 |
[ ] /dev file system support (OBSOLETE) |
| 156 |
|
|
[ ] Automatically mount at boot |
| 157 |
dertobi123 |
1.6 |
[*] Virtual memory file system support (former shm fs) |
| 158 |
|
|
|
| 159 |
swift |
1.1 |
<comment>(Select one or more of the following options as needed by your system)</comment> |
| 160 |
|
|
<*> Reiserfs support |
| 161 |
|
|
<*> Ext3 journalling file system support |
| 162 |
|
|
<*> Second extended fs support |
| 163 |
|
|
<*> XFS filesystem support |
| 164 |
|
|
</pre> |
| 165 |
|
|
|
| 166 |
|
|
<p> |
| 167 |
|
|
If you are using PPPoE to connect to the Internet or you are using a dial-up |
| 168 |
|
|
modem, you will need the following options in the kernel: |
| 169 |
|
|
</p> |
| 170 |
|
|
|
| 171 |
|
|
<pre caption="Selecting PPPoE necessary drivers"> |
| 172 |
neysx |
1.4 |
Device Drivers ---> |
| 173 |
|
|
Networking support ---> |
| 174 |
|
|
<*> PPP (point-to-point protocol) support |
| 175 |
|
|
<*> PPP support for async serial ports |
| 176 |
|
|
<*> PPP support for sync tty ports |
| 177 |
swift |
1.1 |
</pre> |
| 178 |
|
|
|
| 179 |
|
|
<p> |
| 180 |
|
|
The two compression options won't harm but are not definitely needed, neither |
| 181 |
|
|
does the <c>PPP over Ethernet</c> option, that might only be used by |
| 182 |
|
|
<c>rp-pppoe</c> when configured to do kernel mode PPPoE. |
| 183 |
|
|
</p> |
| 184 |
|
|
|
| 185 |
|
|
<p> |
| 186 |
|
|
If you require it, don't forget to include support in the kernel for your |
| 187 |
|
|
ethernet card. |
| 188 |
|
|
</p> |
| 189 |
|
|
|
| 190 |
|
|
<p> |
| 191 |
|
|
Disable ADB raw keycodes: |
| 192 |
|
|
</p> |
| 193 |
|
|
|
| 194 |
|
|
<pre caption="Disabling ADB raw keycodes"> |
| 195 |
|
|
Macintosh Device Drivers ---> |
| 196 |
|
|
[ ] Support for ADB raw keycodes |
| 197 |
|
|
</pre> |
| 198 |
|
|
|
| 199 |
|
|
<p> |
| 200 |
|
|
Also choose the correct RTC support (<e>disable</e> the <c>Enhanced RTC</c> |
| 201 |
|
|
option): |
| 202 |
|
|
</p> |
| 203 |
|
|
|
| 204 |
|
|
<pre caption="Activating the correct RTC option"> |
| 205 |
|
|
Character devices ---> |
| 206 |
|
|
[ ] Enhanced RTC |
| 207 |
|
|
|
| 208 |
|
|
General setup ---> |
| 209 |
|
|
[*] Support for /dev/rtc |
| 210 |
|
|
</pre> |
| 211 |
|
|
|
| 212 |
|
|
<p> |
| 213 |
|
|
Users of OldWorld machines will want HFS support so they can copy compiled |
| 214 |
|
|
kernels to the MacOS partition. |
| 215 |
|
|
</p> |
| 216 |
|
|
|
| 217 |
|
|
<pre caption="Activating HFS support"> |
| 218 |
|
|
File Systems ---> |
| 219 |
|
|
[*] HFS Support |
| 220 |
|
|
</pre> |
| 221 |
|
|
|
| 222 |
|
|
<p> |
| 223 |
|
|
When you're done configuring your kernel, continue with <uri |
| 224 |
|
|
link="#compiling">Compiling and Installing</uri>. |
| 225 |
|
|
</p> |
| 226 |
|
|
|
| 227 |
|
|
</body> |
| 228 |
|
|
</subsection> |
| 229 |
|
|
<subsection id="compiling"> |
| 230 |
|
|
<title>Compiling and Installing</title> |
| 231 |
|
|
<body> |
| 232 |
|
|
|
| 233 |
|
|
<p> |
| 234 |
|
|
Now that your kernel is configured, it is time to compile and install it. Exit |
| 235 |
dertobi123 |
1.6 |
the configuration and run the commands which will compile the kernel: |
| 236 |
swift |
1.1 |
</p> |
| 237 |
|
|
|
| 238 |
|
|
<pre caption="Compiling the kernel"> |
| 239 |
neysx |
1.8 |
# <i>make all && make modules_install</i> |
| 240 |
swift |
1.1 |
</pre> |
| 241 |
|
|
|
| 242 |
|
|
<p> |
| 243 |
neysx |
1.10 |
When the kernel has finished compiling, copy the kernel image to |
| 244 |
swift |
1.1 |
<path>/boot</path>. |
| 245 |
|
|
</p> |
| 246 |
|
|
|
| 247 |
|
|
<pre caption="Installing the kernel"> |
| 248 |
swift |
1.13 |
<comment>replace 2.6.9 with your kernel-version</comment> |
| 249 |
|
|
(Apple/IBM) # <i>cp vmlinux /boot/kernel-2.6.9</i> |
| 250 |
|
|
(Pegasos) # <i>cp arch/ppc/boot/images/zImage.chrp /boot/kernel-2.6.9</i> |
| 251 |
swift |
1.2 |
</pre> |
| 252 |
|
|
|
| 253 |
|
|
<p> |
| 254 |
|
|
Also don't forget to copy over the system map: |
| 255 |
|
|
</p> |
| 256 |
|
|
|
| 257 |
|
|
<pre caption="Copying the system map"> |
| 258 |
swift |
1.13 |
# <i>cp System.map /boot/System.map-2.6.9</i> |
| 259 |
swift |
1.1 |
</pre> |
| 260 |
|
|
|
| 261 |
|
|
<p> |
| 262 |
|
|
It is also wise to copy over your kernel configuration file to |
| 263 |
|
|
<path>/boot</path>, just in case :) |
| 264 |
|
|
</p> |
| 265 |
|
|
|
| 266 |
|
|
<pre caption="Backing up your kernel configuration"> |
| 267 |
swift |
1.13 |
# <i>cp .config /boot/config-2.6.9</i> |
| 268 |
swift |
1.1 |
</pre> |
| 269 |
|
|
|
| 270 |
|
|
<p> |
| 271 |
|
|
Now continue with <uri link="#kernel_modules">Installing Separate Kernel |
| 272 |
|
|
Modules</uri>. |
| 273 |
|
|
</p> |
| 274 |
|
|
|
| 275 |
|
|
</body> |
| 276 |
|
|
</subsection> |
| 277 |
|
|
</section> |
| 278 |
|
|
<section id="kernel_modules"> |
| 279 |
|
|
<title>Installing Separate Kernel Modules</title> |
| 280 |
|
|
<subsection> |
| 281 |
|
|
<title>Configuring the Modules</title> |
| 282 |
|
|
<body> |
| 283 |
|
|
|
| 284 |
|
|
<p> |
| 285 |
|
|
You should list the modules you want automatically loaded in |
| 286 |
pylon |
1.7 |
<path>/etc/modules.autoload.d/kernel-2.6</path>. |
| 287 |
swift |
1.1 |
You can add extra options to the modules too if you want. |
| 288 |
|
|
</p> |
| 289 |
|
|
|
| 290 |
|
|
<p> |
| 291 |
|
|
To view all available modules, run the following <c>find</c> command. Don't |
| 292 |
|
|
forget to substitute "<kernel version>" with the version of the kernel you |
| 293 |
|
|
just compiled: |
| 294 |
|
|
</p> |
| 295 |
|
|
|
| 296 |
|
|
<pre caption="Viewing all available modules"> |
| 297 |
|
|
# <i>find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko'</i> |
| 298 |
|
|
</pre> |
| 299 |
|
|
|
| 300 |
|
|
<p> |
| 301 |
|
|
For instance, to automatically load the <c>3c59x.o</c> module, edit the |
| 302 |
pylon |
1.7 |
<path>kernel-2.6</path> file and enter the module |
| 303 |
swift |
1.1 |
name in it. |
| 304 |
|
|
</p> |
| 305 |
|
|
|
| 306 |
dertobi123 |
1.6 |
<pre caption="Editing /etc/modules.autoload.d/kernel-2.6"> |
| 307 |
|
|
# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i> |
| 308 |
swift |
1.1 |
</pre> |
| 309 |
|
|
|
| 310 |
pylon |
1.7 |
<pre caption="/etc/modules.autoload.d/kernel-2.6"> |
| 311 |
swift |
1.1 |
3c59x |
| 312 |
|
|
</pre> |
| 313 |
|
|
|
| 314 |
|
|
<p> |
| 315 |
|
|
Now run <c>modules-update</c> to commit your changes to the |
| 316 |
|
|
<path>/etc/modules.conf</path> file: |
| 317 |
|
|
</p> |
| 318 |
|
|
|
| 319 |
|
|
<pre caption="Running modules-update"> |
| 320 |
|
|
# <i>modules-update</i> |
| 321 |
|
|
</pre> |
| 322 |
|
|
|
| 323 |
|
|
<p> |
| 324 |
sejo |
1.15 |
Since 2004.3 we suggest people to use udev in stead of devfs. To ensure your system works with it you need to emerge udev. |
| 325 |
|
|
</p> |
| 326 |
|
|
<pre caption="Emerging udev"> |
| 327 |
|
|
# <i>emerge udev</i> |
| 328 |
|
|
</pre> |
| 329 |
sejo |
1.17 |
|
| 330 |
|
|
<p> |
| 331 |
sejo |
1.18 |
On the 2004.3 <b>stage3</b> there is a problem with PAM, to resolve these issues, making sure you can login after the installation you should follow these steps: |
| 332 |
sejo |
1.17 |
</p> |
| 333 |
|
|
<pre caption="Fix login problems 2004.3"> |
| 334 |
|
|
<comment>First we need to add pam to our USE flags.</comment> |
| 335 |
|
|
# <i>nano /etc/make.conf</i> |
| 336 |
|
|
<comment>Now we need to re-emerge shadow, pam and pam-login.</comment> |
| 337 |
|
|
# <i>emerge shadow pam pam-login</i> |
| 338 |
|
|
</pre> |
| 339 |
sejo |
1.15 |
<p> |
| 340 |
swift |
1.1 |
Continue the installation with <uri link="?part=1&chap=8">Configuring |
| 341 |
|
|
your System</uri>. |
| 342 |
|
|
</p> |
| 343 |
|
|
|
| 344 |
|
|
</body> |
| 345 |
|
|
</subsection> |
| 346 |
|
|
</section> |
| 347 |
|
|
</sections> |