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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download) (as text)
Mon May 9 19:47:22 2011 UTC (4 years, 3 months ago) by nightmorph
Branch: MAIN
Changes since 1.5: +5 -4 lines
File MIME type: application/xml
update  handbooks for lazy unmount, bug 361561, thanks to swift for the patches

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.6 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-arm-bootloader.xml,v 1.5 2008/05/02 08:04:23 nightmorph Exp $ -->
8 vapier 1.1
9     <sections>
10    
11 nightmorph 1.6 <version>10</version>
12     <date>2011-05-09</date>
13 vapier 1.1
14     <section>
15     <title>Making your Choice</title>
16     <subsection>
17     <title>Introduction</title>
18     <body>
19    
20     <p>
21     Now that your kernel is configured and compiled and the necessary system
22     configuration files are filled in correctly, it is time to install a
23     program that will fire up your kernel when you start the system. Such a
24     program is called a <e>bootloader</e>.
25     </p>
26    
27     <p>
28     Several bootloaders exist for Linux/ARM. You must choose one of the supported
29     bootloaders, not all. Depending on the machine, you may have no choice at all!
30     </p>
31    
32     <table>
33     <tr>
34     <th>Machine</th>
35     <th>Supported Bootloaders</th>
36     </tr>
37     <tr>
38     <ti><uri link="http://www.netwinder.org/about.html">NetWinder</uri></ti>
39     <ti><uri link="#nettrom">NeTTrom</uri></ti>
40     </tr>
41     <tr>
42     <ti><uri link="http://en.wikipedia.org/wiki/NSLU2">NSLU2 (aka SLUG)</uri></ti>
43     <ti><uri link="#redboot">RedBoot</uri></ti>
44     </tr>
45     <tr>
46     <ti><uri link="http://www.giantshoulderinc.com/hardware.html">Loft</uri></ti>
47     <ti><uri link="#redboot">RedBoot</uri></ti>
48     </tr>
49     </table>
50    
51     </body>
52     </subsection>
53     </section>
54     <section id="nettrom">
55 vapier 1.2 <title>NeTTrom</title>
56     <subsection>
57     <title>Upgrading NeTTrom</title>
58 vapier 1.1 <body>
59    
60     <p>
61     The NeTTrom bootloader is a specialized firmware developed specifically for the
62     NetWinder machines. No other board uses this and due to its history, the source
63     code is no longer available. However, there are firmware images of the last
64     release still floating around, so the first thing you want to do is update to
65 nightmorph 1.3 the last release of 2.3.3. This section is meant as a quickstart, not as a
66 vapier 1.1 replacement for the full <uri
67     link="http://www.netwinder.org/howto/Firmware-HOWTO-3.html">Firmware Upgrade
68     HOWTO</uri>.
69     </p>
70    
71     <p>
72     In order to flash your firmware, you need the latest release, the flashing
73     utilities, and proper support in your kernel. The NetWinder flash driver is
74     called <c>NetWinder flash support</c> and it is under <c>Character devices</c>
75     in the kernel.
76     </p>
77    
78     <pre caption="Install NeTTrom and NetWinder utilities">
79     # <i>emerge sys-boot/nettrom sys-block/nwutil</i>
80     </pre>
81    
82     <warn>
83     If the flashing of your firmware goes wrong, then you will be unable to recover
84     via software means. Make sure you've taken all precautions against power
85 nightmorph 1.3 failure and you read the <c>flashwrite(8)</c> man page.
86 vapier 1.1 </warn>
87    
88     <p>
89     Now that you have the latest firmware, you've installed the flash utilities,
90 nightmorph 1.3 your kernel has flash write support, and you've read the <c>flashwrite(8)</c>
91     man page, let's flash that sucker!
92 vapier 1.1 </p>
93    
94     <pre caption="Flashing the NetWinder firmware">
95 nightmorph 1.3 <comment>(First back up your existing firmware)</comment>
96 vapier 1.1 # <i>dd if=/dev/nwflash of=/boot/nettrom.old bs=1</i>
97    
98 nightmorph 1.3 <comment>(Then write the new firmware)</comment>
99 vapier 1.1 # <i>flashwrite /boot/nettrom</i>
100    
101 nightmorph 1.3 <comment>(Finally, verify that the write worked (replace BYTESIZE with the actual byte size of nettrom))</comment>
102 vapier 1.1 # <i>dd if=/dev/nwflash of=/boot/nettrom.new bs=1 count=BYTESIZE</i>
103     # <i>cmp /boot/nettrom /boot/nettrom.new</i>
104     </pre>
105    
106     <p>
107     If all goes well, you should be able to reboot and not be left with a brick.
108 nightmorph 1.3 Let's move on to actually booting a kernel.
109 vapier 1.2 </p>
110    
111     </body>
112     </subsection>
113     <subsection>
114     <title>Using NeTTrom</title>
115     <body>
116    
117     <p>
118     NeTTrom can boot a kernel many different ways so we will go over the two most
119     common: embedded in the flash and loading off the ext2 boot partition.
120 vapier 1.1 </p>
121    
122     <p>
123 nightmorph 1.3 Embedding the kernel into flash is pretty easy with the <c>nwlilo</c> utility.
124     Simply specify the path to the kernel you wish to embed as well as the kernel
125     commandline (note that the <c>root=</c> value is important), and you're done!
126 vapier 1.1 </p>
127    
128     <pre caption="Installing the kernel into flash">
129 nightmorph 1.5 # <i>nwlilo /boot/zImage "root=/dev/sda2 video=cyber2000fb"</i>
130 vapier 1.1 </pre>
131    
132     <p>
133 nightmorph 1.3 The other method is copying the vmlinuz ELF to your ext2 boot partition and
134 vapier 1.1 configuring NeTTrom to load that. Once you've copied your kernel over, reboot
135     the machine as the only way to configure NeTTrom is from inside NeTTrom itself.
136     Halt the autoboot process by pressing <c>*</c> twice followed by the return
137     key. In the example below, we will assume your ext2 boot partition is at
138 nightmorph 1.5 <path>/dev/sda1</path> while your root partition is at <path>/dev/sda3</path>.
139 vapier 1.1 </p>
140    
141     <pre caption="Configuring NeTTrom">
142     NeTTrom> <i>load-defaults</i>
143     NeTTrom> <i>setenv kernconfig fs</i>
144 nightmorph 1.5 NeTTrom> <i>setenv kerndev /dev/sda1</i>
145     NeTTrom> <i>setenv rootdev /dev/sda3</i>
146 vapier 1.1 NeTTrom> <i>setenv kernfile /boot/vmlinux</i>
147     NeTTrom> <i>setenv cmdappend [custom kernel cmdline settings]</i>
148     NeTTrom> <i>save-all</i>
149     NeTTrom> <i>boot</i>
150     </pre>
151    
152     <p>
153     It isn't uncommon for NetWinders to have broken DMA hardware, so if your disks
154     are giving you troubles when DMA is enabled, simply add <c>ide=nodma</c> to the
155     <c>cmdappend</c> line above.
156     </p>
157    
158     <p>
159     For a full NeTTrom command guide/reference, please see the <uri
160     link="http://www.netwinder.org/howto/Firmware-HOWTO.html">NetWinder
161     Firmware-HOWTO</uri>.
162     </p>
163    
164     <p>
165     Now continue with <uri link="#reboot">Rebooting the System</uri>.
166     </p>
167    
168     </body>
169 vapier 1.2 </subsection>
170 vapier 1.1 </section>
171     <section id="redboot">
172 vapier 1.2 <title>RedBoot</title>
173     <subsection>
174     <title>Upgrading RedBoot</title>
175 vapier 1.1 <body>
176    
177     <p>
178     The <uri link="http://www.cygwin.com/redboot/">RedBoot</uri> firmware tends to
179     be pretty popular due to its ease of use. We won't go over the process of
180     updating your firmware as there's just too many ways you could get it wrong :).
181     If you really want to update, please visit the <uri
182     link="http://www.cygwin.com/redboot/">RedBoot homepage</uri>.
183     </p>
184    
185     <p>
186     Now continue with <uri link="#reboot">Rebooting the System</uri>.
187     </p>
188    
189     </body>
190 vapier 1.2 </subsection>
191     <!-- TODO: write this
192     <subsection>
193     <title>Using RedBoot</title>
194     <body>
195    
196     </body>
197     </subsection>
198     -->
199 vapier 1.1 </section>
200     <section id="uboot">
201 vapier 1.2 <title>Das U-Boot</title>
202     <subsection>
203     <title>Upgrading Das U-Boot</title>
204 vapier 1.1 <body>
205    
206     <p>
207     <uri link="http://u-boot.sourceforge.net/">Das U-Boot</uri> tends to its power
208     and portability. We won't go over the process of updating your version as
209     there's just too many ways you could get it wrong :). If you really want to
210     update, please visit the <uri link="http://u-boot.sourceforge.net/">U-Boot
211     homepage</uri>.
212     </p>
213    
214     <p>
215     Now continue with <uri link="#reboot">Rebooting the System</uri>.
216     </p>
217    
218     </body>
219 vapier 1.2 </subsection>
220     <!-- TODO: write this
221     <subsection>
222     <title>Using Das U-Boot</title>
223     <body>
224    
225     </body>
226     </subsection>
227     -->
228 vapier 1.1 </section>
229     <section id="reboot">
230     <title>Rebooting the System</title>
231     <subsection>
232     <body>
233    
234     <p>
235     Exit the chrooted environment and unmount all mounted partitions. Then type in
236     that one magical command you have been waiting for: <c>reboot</c>.
237     </p>
238    
239     <pre caption="Exiting the chroot, unmounting all partitions and rebooting">
240     # <i>exit</i>
241     cdimage ~# <i>cd</i>
242 nightmorph 1.6 cdimage ~# <i>umount -l /mnt/gentoo/dev{/shm,/pts,}</i>
243     cdimage ~# <i>umount -l /mnt/gentoo{/boot,/proc,}</i>
244 vapier 1.1 cdimage ~# <i>reboot</i>
245     </pre>
246    
247     <p>
248     Of course, don't forget to remove the bootable CD, otherwise the CD will be
249     booted again instead of your new Gentoo system.
250     </p>
251    
252     <p>
253     Once rebooted in your Gentoo installation, finish up with <uri
254     link="?part=1&amp;chap=11">Finalizing your Gentoo Installation</uri>.
255     </p>
256    
257     </body>
258     </subsection>
259     </section>
260     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20