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

Contents of /xml/htdocs/doc/en/handbook/hb-install-arm-kernel.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download) (as text)
Mon Aug 13 03:31:27 2007 UTC (6 years, 8 months ago) by nightmorph
Branch: MAIN
Changes since 1.10: +7 -5 lines
File MIME type: application/xml
looks like modprobe -l will only work for the running kernel, not for the kernel just compiled. fixed in all handbooks, bug 188250

1 vapier 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/2.5 -->
6    
7 nightmorph 1.11 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-arm-kernel.xml,v 1.10 2007/08/03 10:48:04 nightmorph Exp $ -->
8 vapier 1.1
9     <sections>
10    
11 nightmorph 1.11 <version>8.4</version>
12     <date>2007-08-12</date>
13 vapier 1.1
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 neysx 1.5 located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy
21     it to <path>/etc/localtime</path>. Please avoid the
22 vapier 1.1 <path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
23 neysx 1.5 indicate the expected zones. For instance, <path>GMT-8</path> is in fact
24     GMT+8.
25 vapier 1.1 </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 neysx 1.5 # <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
31 vapier 1.1 </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 nightmorph 1.3 For ARM systems, we will use <c>gentoo-sources</c> (contains additional patches
51     for performance and stability).
52 vapier 1.1 </p>
53    
54     <p>
55 nightmorph 1.3 Now install it using <c>emerge</c>.
56 vapier 1.1 </p>
57    
58     <pre caption="Installing a kernel source">
59 nightmorph 1.3 # <i>emerge gentoo-sources</i>
60 vapier 1.1 </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 -&gt; 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     Regardless of your machine, you should make sure to activate the use of
132     development and experimental code/drivers. You need this, otherwise some very
133     important code/drivers won't show up:
134     </p>
135    
136     <pre caption="Selecting experimental code/drivers, General setup">
137     Code maturity level options ---&gt;
138     [*] Prompt for development and/or incomplete code/drivers
139     </pre>
140    
141     <p>
142     Please select your machine from the list below to jump to the configuration
143     section.
144     </p>
145    
146     <ul>
147     <li><uri link="#netwinder">NetWinder</uri></li>
148     </ul>
149    
150     </body>
151     </subsection>
152     </section>
153     <section id="netwinder">
154     <title>NetWinder configuration options</title>
155     <body>
156    
157     <p>
158     Remember that EXT2 support is required for the boot partition as that is the
159     only filesystem that the bootloader can read reliably. Otherwise, the only
160     filesystem that has been tested is EXT3 but your welcome to try your luck with
161     the others ;).
162     </p>
163    
164 vapier 1.2 <pre caption="NetWinder configuration options">
165     <comment>First generate a default config</comment>
166     # <i>make netwinder_defconfig</i>
167 vapier 1.1
168     <comment>Required options</comment>
169     System Type ---&gt;
170 vapier 1.2 ARM system type (FootBridge) ---&gt;
171     (X) FootBridge
172 vapier 1.1 Footbridge Implementations ---&gt;
173     [*] NetWinder
174    
175     Floating point emulation ---&gt;
176     [*] NWFPE math emulation
177    
178     File systems ---&gt;
179     [*] Second extended fs support
180     Pseudo Filesystems ---&gt;
181     [*] /proc file system support
182     [*] Virtual memory file system support (former shm fs)
183    
184     Device Drivers ---&gt;
185     ATA/ATAPI/MFM/RLL support ---&gt;
186     [*] ATA/ATAPI/MFM/RLL support
187     [*] Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
188     [*] Include IDE/ATA-2 DISK support
189     --- IDE chipset support/bugfixes
190     [*] PCI IDE chipset support
191     [*] Winbond SL82c105 support
192     [*] Generic PCI bus-master DMA support
193    
194     Network device support ---&gt;
195     [*] Network device support
196     Ethernet (10 or 100Mbit) ---&gt;
197     [*] Ethernet (10 or 100Mbit)
198     Tulip family network device support ---&gt;
199     [*] "Tulip" family network device support
200     [*] DECchip Tulip (dc2114x) PCI support
201     [*] Use PCI shared mem for NIC registers
202     [*] Use NAPI RX polling
203     [*] EISA, VLB, PCI and on board controllers
204     [*] PCI NE2000 and clones support
205    
206     Character devices ---&gt;
207     Serial drivers ---&gt;
208     [*] 8250/16550 and compatible serial support
209     [*] Console on 8250/16550 and compatible serial port
210     --- Non-8250 serial port support
211     [*] DC21285 serial port support
212     [*] Console on DC21285 serial port
213     Watchdog Cards ---&gt;
214     [*] Watchdog Timer Support
215     [*] NetWinder WB83C977 watchdog
216     [*] NetWinder thermometer support
217     [*] NetWinder Button
218     [*] Reboot Using Button
219    
220     <comment>Recommended options</comment>
221     Kernel Features ---&gt;
222     [*] Preemptible Kernel
223     [*] Timer and CPU usage LEDs
224     [*] CPU usage LED
225    
226     File systems ---&gt;
227     [*] Ext3 journalling file system support
228    
229     Device Drivers ---&gt;
230     Input device support ---&gt;
231     [*] Keyboards ---&gt;
232     [*] AT keyboard
233     [*] Mouse ---&gt;
234     [*] PS/2 mouse
235    
236     Graphics support ---&gt;
237     [*] Support for frame buffer devices
238     [*] Enable firmware EDID
239     [*] CyberPro 2000/2010/5000 support
240     Logo configuration ---&gt;
241     [*] Bootup logo
242     [*] Standard 224-color Linux logo
243    
244     Sound ---&gt;
245     [*] Sound card support
246     Open Sound System ---&gt;
247     [*] Open Sound System
248     [*] OSS sound modules
249     [*] Yamaha FM synthesizer (YM3812/OPL-3) support
250     [*] Netwinder WaveArtist
251    
252     <comment>You should only enable this to upgrade your flash</comment>
253     Device Drivers ---&gt;
254     Character devices ---&gt;
255     [*] NetWinder flash support
256     </pre>
257    
258     <p>
259     When you've finished configuring the kernel, continue with <uri
260     link="#compiling">Compiling and Installing</uri>.
261     </p>
262    
263     </body>
264     </section>
265     <section id="compiling">
266     <title>Compiling and Installing</title>
267     <body>
268    
269     <p>
270     Now that your kernel is configured, it is time to compile and install it. Exit
271     the configuration and start the compilation process:
272     </p>
273    
274     <pre caption="Compiling the kernel">
275     # <i>make &amp;&amp; make modules_install</i>
276     </pre>
277    
278 nightmorph 1.4
279 vapier 1.1 <p>
280     When the kernel has finished compiling, copy the kernel image to
281     <path>/boot</path>. Use whatever name you feel is appropriate for your kernel
282     choice and remember it as you will need it later on when you configure your
283     bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the
284     name and version of your kernel.
285     </p>
286    
287     <pre caption="Installing the kernel">
288     # <i>cp vmlinux.gz /boot/<keyval id="kernel-name"/></i>
289     </pre>
290    
291     <p>
292     Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
293     </p>
294    
295     </body>
296     </section>
297     <section id="kernel_modules">
298     <title>Kernel Modules</title>
299     <subsection>
300     <title>Configuring the Modules</title>
301     <body>
302    
303     <p>
304     You should list the modules you want automatically loaded in
305     <path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
306     the modules too if you want.
307     </p>
308    
309     <p>
310 nightmorph 1.11 To view all available modules, run the following <c>find</c> command. Don't
311     forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
312     just compiled:
313 vapier 1.1 </p>
314    
315     <pre caption="Viewing all available modules">
316 nightmorph 1.11 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
317 vapier 1.1 </pre>
318    
319     <p>
320 nightmorph 1.10 For instance, to automatically load the <c>3c59x.ko</c> module, edit the
321 vapier 1.1 <path>kernel-2.6</path> file and enter the module name in it.
322     </p>
323    
324     <pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
325     # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
326     </pre>
327    
328     <pre caption="/etc/modules.autoload.d/kernel-2.6">
329     3c59x
330     </pre>
331    
332     <p>
333     Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
334     your System</uri>.
335     </p>
336    
337     </body>
338     </subsection>
339     </section>
340     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20