| 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/draft/hb-install-arm-kernel.xml,v 1.10 2008/03/31 21:48:58 nightmorph Exp $ --> |
| 8 |
|
| 9 |
<sections> |
| 10 |
|
| 11 |
<version>9.0</version> |
| 12 |
<date>2008-04-01</date> |
| 13 |
|
| 14 |
<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 copy |
| 21 |
it to <path>/etc/localtime</path>. Please avoid the |
| 22 |
<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
| 23 |
indicate the expected zones. For instance, <path>GMT-8</path> is in fact |
| 24 |
GMT+8. |
| 25 |
</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 |
# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i> |
| 31 |
</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 |
For ARM systems, we will use <c>gentoo-sources</c> (contains additional patches |
| 51 |
for extra features). |
| 52 |
</p> |
| 53 |
|
| 54 |
<p> |
| 55 |
Now install it using <c>emerge</c>. |
| 56 |
</p> |
| 57 |
|
| 58 |
<pre caption="Installing a kernel source"> |
| 59 |
# <i>emerge gentoo-sources</i> |
| 60 |
</pre> |
| 61 |
|
| 62 |
<p> |
| 63 |
When you take a look in <path>/usr/src</path> you should see a symlink called |
| 64 |
<path>linux</path> pointing to your kernel source. In this case, the installed |
| 65 |
kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>. |
| 66 |
Your version may be different, so keep this in mind. |
| 67 |
</p> |
| 68 |
|
| 69 |
<pre caption="Viewing the kernel source symlink"> |
| 70 |
# <i>ls -l /usr/src/linux</i> |
| 71 |
lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-<keyval id="kernel-version"/> |
| 72 |
</pre> |
| 73 |
|
| 74 |
</body> |
| 75 |
</subsection> |
| 76 |
</section> |
| 77 |
<section id="manual"> |
| 78 |
<title>Default: Manual Configuration</title> |
| 79 |
<subsection> |
| 80 |
<title>Introduction</title> |
| 81 |
<body> |
| 82 |
|
| 83 |
<p> |
| 84 |
Manually configuring a kernel is often seen as the most difficult procedure a |
| 85 |
Linux user ever has to perform. Nothing is less true -- after configuring a |
| 86 |
couple of kernels you don't even remember that it was difficult ;) |
| 87 |
</p> |
| 88 |
|
| 89 |
<p> |
| 90 |
However, one thing <e>is</e> true: you must know your system when you start |
| 91 |
configuring a kernel manually. Most information can be gathered by emerging |
| 92 |
pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now |
| 93 |
be able to use <c>lspci</c> within the chrooted environment. You may safely |
| 94 |
ignore any <e>pcilib</e> warnings (like pcilib: cannot open |
| 95 |
/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run |
| 96 |
<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same. |
| 97 |
You can also run <c>lsmod</c> to see what kernel modules the Installation CD |
| 98 |
uses (it might provide you with a nice hint on what to enable). |
| 99 |
</p> |
| 100 |
|
| 101 |
<p> |
| 102 |
Now go to your kernel source directory and execute <c>make menuconfig</c>. This |
| 103 |
will fire up an ncurses-based configuration menu. |
| 104 |
</p> |
| 105 |
|
| 106 |
<pre caption="Invoking menuconfig"> |
| 107 |
# <i>cd /usr/src/linux</i> |
| 108 |
# <i>make menuconfig</i> |
| 109 |
</pre> |
| 110 |
|
| 111 |
<p> |
| 112 |
You will be greeted with several configuration sections. We'll first list some |
| 113 |
options you must activate (otherwise Gentoo will not function, or not function |
| 114 |
properly without additional tweaks). |
| 115 |
</p> |
| 116 |
|
| 117 |
</body> |
| 118 |
</subsection> |
| 119 |
<subsection> |
| 120 |
<title>Activating Required Options</title> |
| 121 |
<body> |
| 122 |
|
| 123 |
<p> |
| 124 |
Due to the highly specific nature of the embedded, we'll cover known |
| 125 |
configurations for boards here. If your machine is not listed, then you should |
| 126 |
visit the respective community website to figure out how to properly configure |
| 127 |
your kernel. |
| 128 |
</p> |
| 129 |
|
| 130 |
<p> |
| 131 |
Please select your machine from the list below to jump to the configuration |
| 132 |
section. |
| 133 |
</p> |
| 134 |
|
| 135 |
<ul> |
| 136 |
<li><uri link="#netwinder">NetWinder</uri></li> |
| 137 |
</ul> |
| 138 |
|
| 139 |
</body> |
| 140 |
</subsection> |
| 141 |
</section> |
| 142 |
<section id="netwinder"> |
| 143 |
<title>NetWinder configuration options</title> |
| 144 |
<body> |
| 145 |
|
| 146 |
<p> |
| 147 |
Remember that EXT2 support is required for the boot partition as that is the |
| 148 |
only filesystem that the bootloader can read reliably. Otherwise, the only |
| 149 |
filesystem that has been tested is EXT3 but your welcome to try your luck with |
| 150 |
the others ;). |
| 151 |
</p> |
| 152 |
|
| 153 |
<pre caption="NetWinder configuration options"> |
| 154 |
<comment>First generate a default config</comment> |
| 155 |
# <i>make netwinder_defconfig</i> |
| 156 |
|
| 157 |
<comment>Required options</comment> |
| 158 |
System Type ---> |
| 159 |
ARM system type (FootBridge) ---> |
| 160 |
(X) FootBridge |
| 161 |
Footbridge Implementations ---> |
| 162 |
[*] NetWinder |
| 163 |
|
| 164 |
Floating point emulation ---> |
| 165 |
[*] NWFPE math emulation |
| 166 |
|
| 167 |
File systems ---> |
| 168 |
[*] Second extended fs support |
| 169 |
Pseudo Filesystems ---> |
| 170 |
[*] /proc file system support |
| 171 |
[*] Virtual memory file system support (former shm fs) |
| 172 |
|
| 173 |
Device Drivers ---> |
| 174 |
ATA/ATAPI/MFM/RLL support ---> |
| 175 |
[*] ATA/ATAPI/MFM/RLL support |
| 176 |
[*] Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support |
| 177 |
[*] Include IDE/ATA-2 DISK support |
| 178 |
--- IDE chipset support/bugfixes |
| 179 |
[*] PCI IDE chipset support |
| 180 |
[*] Winbond SL82c105 support |
| 181 |
[*] Generic PCI bus-master DMA support |
| 182 |
|
| 183 |
Network device support ---> |
| 184 |
[*] Network device support |
| 185 |
Ethernet (10 or 100Mbit) ---> |
| 186 |
[*] Ethernet (10 or 100Mbit) |
| 187 |
Tulip family network device support ---> |
| 188 |
[*] "Tulip" family network device support |
| 189 |
[*] DECchip Tulip (dc2114x) PCI support |
| 190 |
[*] Use PCI shared mem for NIC registers |
| 191 |
[*] Use NAPI RX polling |
| 192 |
[*] EISA, VLB, PCI and on board controllers |
| 193 |
[*] PCI NE2000 and clones support |
| 194 |
|
| 195 |
Character devices ---> |
| 196 |
Serial drivers ---> |
| 197 |
[*] 8250/16550 and compatible serial support |
| 198 |
[*] Console on 8250/16550 and compatible serial port |
| 199 |
--- Non-8250 serial port support |
| 200 |
[*] DC21285 serial port support |
| 201 |
[*] Console on DC21285 serial port |
| 202 |
Watchdog Cards ---> |
| 203 |
[*] Watchdog Timer Support |
| 204 |
[*] NetWinder WB83C977 watchdog |
| 205 |
[*] NetWinder thermometer support |
| 206 |
[*] NetWinder Button |
| 207 |
[*] Reboot Using Button |
| 208 |
|
| 209 |
<comment>Recommended options</comment> |
| 210 |
Kernel Features ---> |
| 211 |
[*] Preemptible Kernel |
| 212 |
[*] Timer and CPU usage LEDs |
| 213 |
[*] CPU usage LED |
| 214 |
|
| 215 |
File systems ---> |
| 216 |
[*] Ext3 journalling file system support |
| 217 |
|
| 218 |
Device Drivers ---> |
| 219 |
Input device support ---> |
| 220 |
[*] Keyboards ---> |
| 221 |
[*] AT keyboard |
| 222 |
[*] Mouse ---> |
| 223 |
[*] PS/2 mouse |
| 224 |
|
| 225 |
Graphics support ---> |
| 226 |
[*] Support for frame buffer devices |
| 227 |
[*] Enable firmware EDID |
| 228 |
[*] CyberPro 2000/2010/5000 support |
| 229 |
Logo configuration ---> |
| 230 |
[*] Bootup logo |
| 231 |
[*] Standard 224-color Linux logo |
| 232 |
|
| 233 |
Sound ---> |
| 234 |
[*] Sound card support |
| 235 |
Open Sound System ---> |
| 236 |
[*] Open Sound System |
| 237 |
[*] OSS sound modules |
| 238 |
[*] Yamaha FM synthesizer (YM3812/OPL-3) support |
| 239 |
[*] Netwinder WaveArtist |
| 240 |
|
| 241 |
<comment>You should only enable this to upgrade your flash</comment> |
| 242 |
Device Drivers ---> |
| 243 |
Character devices ---> |
| 244 |
[*] NetWinder flash support |
| 245 |
</pre> |
| 246 |
|
| 247 |
<p> |
| 248 |
When you've finished configuring the kernel, continue with <uri |
| 249 |
link="#compiling">Compiling and Installing</uri>. |
| 250 |
</p> |
| 251 |
|
| 252 |
</body> |
| 253 |
</section> |
| 254 |
<section id="compiling"> |
| 255 |
<title>Compiling and Installing</title> |
| 256 |
<body> |
| 257 |
|
| 258 |
<p> |
| 259 |
Now that your kernel is configured, it is time to compile and install it. Exit |
| 260 |
the configuration and start the compilation process: |
| 261 |
</p> |
| 262 |
|
| 263 |
<pre caption="Compiling the kernel"> |
| 264 |
# <i>make && make modules_install</i> |
| 265 |
</pre> |
| 266 |
|
| 267 |
|
| 268 |
<p> |
| 269 |
When the kernel has finished compiling, copy the kernel image to |
| 270 |
<path>/boot</path>. Use whatever name you feel is appropriate for your kernel |
| 271 |
choice and remember it as you will need it later on when you configure your |
| 272 |
bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the |
| 273 |
name and version of your kernel. |
| 274 |
</p> |
| 275 |
|
| 276 |
<pre caption="Installing the kernel"> |
| 277 |
# <i>cp vmlinux.gz /boot/<keyval id="kernel-name"/></i> |
| 278 |
</pre> |
| 279 |
|
| 280 |
<p> |
| 281 |
Now continue with <uri link="#kernel_modules">Kernel Modules</uri>. |
| 282 |
</p> |
| 283 |
|
| 284 |
</body> |
| 285 |
</section> |
| 286 |
<section id="kernel_modules"> |
| 287 |
<title>Kernel Modules</title> |
| 288 |
|
| 289 |
<subsection> |
| 290 |
<include href="hb-install-kernelmodules.xml"/> |
| 291 |
</subsection> |
| 292 |
|
| 293 |
</section> |
| 294 |
</sections> |