summaryrefslogtreecommitdiff
path: root/en/boot-installer/arm.xml
blob: fbc5fc27a59ce6a3e2ec251a35176310d1fec108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!-- retain these comments for translator revision tracking -->
<!-- $Id$ -->

  <sect2 arch="arm" id="boot-image-formats">
    <title>Boot image formats</title>
    <para>
      On ARM-based systems in most cases one of two formats for boot images
      is used: a) standard Linux zImage-format kernels
      (<quote>vmlinuz</quote>) in conjunction with standard Linux initial
      ramdisks (<quote>initrd.gz</quote>) or b) uImage-format kernels
      (<quote>uImage</quote>) in conjunction with corresponding initial
      ramdisks (<quote>uInitrd</quote>).
    </para>
    <para>
      uImage/uInitrd are image formats designed for the u-boot firmware that
      is used on many ARM-based systems. Older u-boot versions can only
      boot files in uImage/uInitrd format, so these are often used on
      older armel systems. Newer u-boot versions can - besides booting
      uImages/uInitrds - also boot standard Linux kernels and ramdisk images,
      but the command syntax to do that is slightly different from that
      for booting uImages.
    </para>
    <para>
      For systems using a multiplatform kernel, besides kernel and initial
      ramdisk a so-called device-tree file (or device-tree blob,
      <quote>dtb</quote>) is needed. It is specific to each supported system
      and contains a description of the particular hardware.
    </para>
  </sect2>

  <sect2 arch="arm" id="boot-tftp"><title>Booting by TFTP</title>

&boot-installer-intro-net.xml;

    <sect3 arch="arm" id="boot-tftp-uboot">
      <title>TFTP-booting in u-boot</title>
      <para>
        Network booting on systems using the u-boot firmware consists of
        three steps: a) configuring the network, b) loading the images
        (kernel/initial ramdisk/dtb) into memory and c) actually executing
        the previosly loaded code.
      </para>
      <para>
        First you have to configure the network, either automatically via
        DHCP by running
<informalexample><screen>
setenv autoload no
dhcp
</screen></informalexample>
        or manually by setting several environment variables
<informalexample><screen>
setenv ipaddr &lt;ip address of the client&gt;
setenv netmask &lt;netmask&gt;
setenv serverip &lt;ip address of the tftp server&gt;
setenv dnsip &lt;ip address of the nameserver&gt;
setenv gatewayip &lt;ip address of the default gateway&gt;
</screen></informalexample>
        If you prefer, you can make these settings permanent by running
<informalexample><screen>
saveenv
</screen></informalexample>
      </para>
      <para>
        Afterwards you need to load the images (kernel/initial
        ramdisk/dtb) into memory. This is done with the tftpboot command,
        which has to be provided with the address at which the image
        shall be stored in memory. Unfortunately the memory map can vary
        from system to system, so there is no general rule which addresses
        can be used for this.                           
      </para>
      <para>
        On some systems, u-boot predefines a set of environment variables
        with suitable load addresses: kernel_addr_r, ramdisk_addr_r and
        fdt_addr_r. You can check whether they are defined by running
<informalexample><screen>
printenv kernel_addr_r ramdisk_addr_r fdt_addr_r
</screen></informalexample>
        If they are not defined, you have to check your system's
        documentation for appropriate values and set them manually.  For
        systems based on Allwinner SunXi SOCs (e.g.  the Allwinner A10,
        architecture name <quote>sun4i</quote> or the Allwinner A20,
        architecture name <quote>sun7i</quote>), you can e.g.  use the
        follwing values:
<informalexample><screen>
setenv kernel_addr_r 0x46000000
setenv fdt_addr_r 0x47000000
setenv ramdisk_addr_r 0x48000000
</screen></informalexample>
      </para>
      <para>
        When the load addresses are defined, you can load the images
        into memory from the previously defined tftp server with
<informalexample><screen>
tftpboot ${kernel_addr_r} &lt;filename of the kernel image&gt;
tftpboot ${fdt_addr_r} &lt;filename of the dtb&gt;
tftpboot ${ramdisk_addr_r} &lt;filename of the initial ramdisk image&gt;
</screen></informalexample>
      </para>
      <para>
        The third part is setting the kernel commandline and actually
        executing the loaded code.  U-boot passes the content of the
        <quote>bootargs</quote> environment variable as commandline to the
        kernel, so any parameters for the kernel and the installer - such as
        the console device (see <xref linkend="boot-console"/>) or
        preseeding options (see <xref linkend="installer-args"/> and <xref
        linkend="appendix-preseed"/>) - can be set with a command like
<informalexample><screen>
setenv bootargs console=ttyS0,115200 rootwait panic=10
</screen></informalexample>
        The exact command to execute the previously loaded code depends on
        the image format used.  With uImage/uInitrd, the command is
<informalexample><screen>
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
</screen></informalexample>
       and with native Linux images it is
<informalexample><screen>
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
</screen></informalexample>
      </para>
      <para>
        Note: When booting standard linux images, it is important to load
        the initial ramdisk image after the kernel and the dtb as u-boot
        sets the filesize variable to the size of the last file loaded and
        the bootz command requires the size of the ramdisk image to work
        correctly.  In case of booting a platform-specific kernel, i.e.  a
        kernel without device-tree, simply omit the ${fdt_addr_r} parameter. 
        </para>
    </sect3>
  </sect2> 

<!-- # None of the arm systems supported in Jessie is able to boot from
     # CD/DVD -> commenting out the "Booting from CD-ROM section" for arm
     
  <sect2 arch="arm"><title>Booting from CD-ROM</title>

&boot-installer-intro-cd.xml;

  </sect2>
-->

<!--

  <sect2 arch="arm" id="boot-firmware"><title>Booting from Firmware</title>

&boot-installer-intro-firmware.xml;

   <sect3 arch="arm" id="boot-firmware-ss4000e">
   <title>Booting the SS4000-E</title>
<para>

Due to limitations in the SS4000-E firmware, it unfortunately is not
possible to boot the installer without the use of a serial port at
this time. To boot the installer, you will need a serial nullmodem
cable; a computer with a serial port<footnote id="arm-s4ke-port">

<para>
A USB serial converter will also work.
</para>

</footnote>; and a ribbon cable with a male DB9 connector at one end,
and a 10-pin .1" IDC header at the other<footnote id="arm-s4k-rib">

<para>
This cable is often found in older desktop machines with builtin 9-pin
serial ports.
</para>

</footnote>.

</para><para>

To boot the SS4000-E, use your serial nullmodem cable and the ribbon
cable to connect to the serial port of the SS4000-E, and reboot the
machine. You need to use a serial terminal application to communicate
with the machine; a good option on a &debian; GNU/Linux is to use the
<command>cu</command> program, in the package of the same name. Assuming
the serial port on your computer is to be found on
<filename>/dev/ttyS0</filename>, use the following command line:

</para>

<informalexample><screen>
cu -lttyS0 -s115200
</screen></informalexample>

<para>

If using Windows, you may want to consider using the program
<classname>hyperterminal</classname>. Use a baud rate of 115200,
8 bits word length, no stop bits, and one parity bit.

</para><para>

When the machine boots, you will see the following line of output:

</para>

<informalexample><screen>
No network interfaces found

EM-7210 ver.T04 2005-12-12 (For ver.AA)
== Executing boot script in 1.000 seconds - enter ^C to abort
</screen></informalexample>

<para>

At this point, hit Control-C to interrupt the boot
loader<footnote id="arm-s4ke-sec">

<para>
Note that you have only one second to do so; if you miss this window,
just powercycle the machine and try again.
</para>

</footnote>. This will give you the RedBoot prompt. Enter the
following commands:

<informalexample><screen>
load -v -r -b 0x01800000 -m ymodem ramdisk.gz
load -v -r -b 0x01008000 -m ymodem zImage
exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M@0xa0000000" -r 0x01800000
</screen></informalexample>

</para><para>

After every <command>load</command> command, the system will expect a
file to be transmitted using the YMODEM protocol. When using cu, make
sure you have the package <classname>lrzsz</classname> installed, then
hit enter, followed by the <quote>~&lt;</quote> escape sequence to start
an external program, and run <command>sb initrd.gz</command> or
<command>sb vmlinuz</command>.

</para><para>

Alternatively, it is possible to load the kernel and ramdisk using
HTTP rather than YMODEM. This is faster, but requires a working HTTP
server on the network. To do so, first switch the bootloader to RAM mode:

<informalexample><screen>
fis load rammode
g
</screen></informalexample>

</para><para>

This will seemingly restart the machine; but in reality, it loads
redboot to RAM and restarts it from there. Not doing this step will cause
the system to hang in the necessary ip_address step that comes next.

</para><para>

You will need to hit Ctrl-C again to interrupt the boot. Then:

<informalexample><screen>
ip_address -l <replaceable>192.168.2.249</replaceable> -h <replaceable>192.168.2.4</replaceable>
load -v -r -b 0x01800000 -m http /initrd.gz
load -v -r -b 0x01008000 -m http /zImage
exec -c "console=ttyS0,115200 rw root=/dev/ram mem=256M@0xa0000000" -r 0x01800000
</screen></informalexample>

Where <replaceable>192.168.2.249</replaceable> is the IP address of the
installed system and <replaceable>192.168.2.4</replaceable> the IP address
of the HTTP server containing the kernel and ramdisk files.

</para><para>

The installer will now start as usual.

</para>
   </sect3>
  </sect2>

-->