| … | |
… | |
| 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/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-mips-kernel.xml,v 1.18 2005/11/21 15:37:12 neysx Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-mips-kernel.xml,v 1.19 2006/01/08 14:05:29 neysx Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>1.14</version> |
11 | <version>1.15</version> |
| 12 | <date>2005-11-21</date> |
12 | <date>2006-01-06</date> |
| 13 | |
13 | |
| 14 | <section> |
14 | <section> |
| 15 | <title>Timezone</title> |
15 | <title>Timezone</title> |
| 16 | <body> |
16 | <body> |
| 17 | |
17 | |
| … | |
… | |
| 48 | source for the MIPS architecture) and <c>mips-prepatch-sources</c> (prerelease |
48 | source for the MIPS architecture) and <c>mips-prepatch-sources</c> (prerelease |
| 49 | kernel tree). |
49 | kernel tree). |
| 50 | </p> |
50 | </p> |
| 51 | |
51 | |
| 52 | <p> |
52 | <p> |
| 53 | Choose your kernel source and install it using <c>emerge</c>. |
53 | Choose your kernel source and install it using <c>emerge</c>. Of course |
| 54 | Of course substitute with your choice of sources, this is merely an example. |
54 | substitute with your choice of sources, this is merely an example. The |
| 55 | The <c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other |
55 | <c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other |
| 56 | dependencies at this point: |
56 | dependencies at this point. <c>USE="symlink"</c> is not necessary for a new |
|
|
57 | install, but ensures proper creation of the <path>/usr/src/linux</path> |
|
|
58 | symlink. |
| 57 | </p> |
59 | </p> |
| 58 | |
60 | |
| 59 | <note> |
61 | <note> |
| 60 | Special patches are needed to make a kernel work on Cobalt servers. The |
62 | Special patches are needed to make a kernel work on Cobalt servers. The |
| 61 | <c>cobalt</c> USE flag must be defined in order to grab the necessary patches |
63 | <c>cobalt</c> USE flag must be defined in order to grab the necessary patches |
| 62 | and apply them. |
64 | and apply them. |
| 63 | </note> |
65 | </note> |
| 64 | |
66 | |
| 65 | <pre caption="Installing a kernel source"> |
67 | <pre caption="Installing a kernel source"> |
| 66 | <comment>(For SGI machines)</comment> |
68 | <comment>(For SGI machines)</comment> |
| 67 | # <i>USE="-doc" emerge mips-sources</i> |
69 | # <i>USE="-doc symlink" emerge mips-sources</i> |
| 68 | |
70 | |
| 69 | <comment>(For Cobalt machines)</comment> |
71 | <comment>(For Cobalt machines)</comment> |
| 70 | # <i>mkdir -p /etc/portage</i> |
72 | # <i>mkdir -p /etc/portage</i> |
| 71 | # <i>echo "sys-kernel/mips-sources cobalt" >> /etc/portage/package.use</i> |
73 | # <i>echo "sys-kernel/mips-sources cobalt" >> /etc/portage/package.use</i> |
| 72 | # <i>USE="-doc" emerge mips-sources</i> |
74 | # <i>USE="-doc symlink" emerge mips-sources</i> |
| 73 | </pre> |
75 | </pre> |
| 74 | |
76 | |
| 75 | <p> |
77 | <p> |
| 76 | When you take a look in <path>/usr/src</path> you should see a symlink called |
78 | When you take a look in <path>/usr/src</path> you should see a symlink called |
| 77 | <path>linux</path> pointing to your kernel source: |
79 | <path>linux</path> pointing to your kernel source. In this case, the installed |
|
|
80 | kernel source points to <c>mips-sources-2.4.24</c>. Your version may be |
|
|
81 | different, so keep this in mind. |
| 78 | </p> |
82 | </p> |
| 79 | |
83 | |
| 80 | <pre caption="Viewing the kernel source symlink"> |
84 | <pre caption="Viewing the kernel source symlink"> |
| 81 | # <i>ls -l /usr/src/linux</i> |
85 | # <i>ls -l /usr/src/linux</i> |
| 82 | lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-2.4.24 |
86 | lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-2.4.24 |
| 83 | </pre> |
|
|
| 84 | |
|
|
| 85 | <p> |
|
|
| 86 | If this isn't the case (i.e. the symlink points to a different kernel source) |
|
|
| 87 | change the symlink before you continue: |
|
|
| 88 | </p> |
|
|
| 89 | |
|
|
| 90 | <pre caption="Changing the kernel source symlink"> |
|
|
| 91 | # <i>rm /usr/src/linux</i> |
|
|
| 92 | # <i>cd /usr/src</i> |
|
|
| 93 | # <i>ln -s linux-2.4.24 linux</i> |
|
|
| 94 | </pre> |
87 | </pre> |
| 95 | |
88 | |
| 96 | <p> |
89 | <p> |
| 97 | Now it is time to configure and compile your kernel source. |
90 | Now it is time to configure and compile your kernel source. |
| 98 | </p> |
91 | </p> |
| … | |
… | |
| 194 | When the kernel has finished compiling, copy the kernel image to |
187 | When the kernel has finished compiling, copy the kernel image to |
| 195 | <path>/boot</path>. |
188 | <path>/boot</path>. |
| 196 | </p> |
189 | </p> |
| 197 | |
190 | |
| 198 | <note> |
191 | <note> |
| 199 | On Cobalt servers, the bootloader will expect to see a compressed kernelimage. |
192 | On Cobalt servers, the bootloader will expect to see a compressed kernel image. |
| 200 | Remember to <c>gzip -9</c> the file once it is in <path>/boot</path>. |
193 | Remember to <c>gzip -9</c> the file once it is in <path>/boot</path>. In the |
|
|
194 | following example, replace <path><kernel-version></path> with your kernel |
|
|
195 | version. |
| 201 | </note> |
196 | </note> |
| 202 | |
197 | |
| 203 | <pre caption="Installing the kernel"> |
198 | <pre caption="Installing the kernel"> |
| 204 | # <i>cp vmlinux /boot/kernel-2.4.24</i> |
199 | # <i>cp vmlinux /boot/<kernel-version<</i> |
| 205 | <comment>(Cobalt Servers -- Compressing the kernel image)</comment> |
200 | <comment>(Cobalt Servers -- Compressing the kernel image)</comment> |
| 206 | # <i>gzip -9v /boot/kernel-2.4.24</i> |
201 | # <i>gzip -9v /boot/<kernel-version<</i> |
| 207 | </pre> |
|
|
| 208 | |
|
|
| 209 | <p> |
|
|
| 210 | It is also wise to copy over your kernel configuration file to |
|
|
| 211 | <path>/boot</path>, just in case :) |
|
|
| 212 | </p> |
|
|
| 213 | |
|
|
| 214 | <pre caption="Backing up your kernel configuration"> |
|
|
| 215 | # <i>cp .config /boot/config-2.4.24</i> |
|
|
| 216 | </pre> |
202 | </pre> |
| 217 | |
203 | |
| 218 | <!-- |
204 | <!-- |
| 219 | Moot point, now that we use arcboot on SGI, and CoLo on Cobalts |
205 | Moot point, now that we use arcboot on SGI, and CoLo on Cobalts |
| 220 | <p> |
206 | <p> |