summaryrefslogtreecommitdiff
path: root/openembedded/juno-lsk/INSTALL.textile
blob: bef8631c418d25bb4873a4853905f60715a0eb30 (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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
h2. License

The use of Juno software is subject to the terms of the Juno "End User License Agreement":https://releases.linaro.org/14.06/openembedded/juno-lsk/#tabs-5.

h2. Installation

Linaro OpenEmbedded releases are made up of the following components.

| *.img.gz | pre-built images for minimal and LAMP root filesystems |
| hwpack_*.tar.gz | hardware pack |
| linaro-image-*.rootfs.tar.gz | a choice of Root file system (RootFS) images |
| Image | kernel used by UEFI |
| juno_bl1.bin | ARM Trused Firmware BL1 binary |
| juno_fip.bin | ARM Trused Firmware Firmware Image Package (FIP) binary |
| juno.dtb | Device Tree Binary |
| board_recovery_image_0.7.5.zip | Juno board firmware recovery image |

Other files such as *.manifest, *.txt and *.html provide information such as package contents or MD5SUMs about the files they share a common filename with.

Linaro OpenEmbedded images are made up of two components. The "Hardware Pack":https://wiki.linaro.org/HardwarePacks, which contains the kernel, boot loader and/or Device Tree blob and a Root file system (RootFS) of your choice to generate an image.

Linaro provides two methods for installing Linaro binary builds:

# Using a pre-built image, which you can download
# Assembling your own image using provided components

h2. Pre-Installation Steps

Before any installation begins, it is important that you ensure your board has the latest "firmware":#firmware installed. Please see "Juno Board Recovery Image and MCC firmware update":#firmware below for the latest updates and installation instructions.  The 14.06 release has been formally QA tested with Firmware version 0.7.1 and sanity tested with Firmware version 0.7.5, but we always recommend that users install the latest version available.

h2. Using pre-built image

h3. Prerequisites

* Ubuntu 12.04 64 bit or newer on your desktop PC ("www.ubuntu.com":http://www.ubuntu.com)
* 4GB USB drive or larger
* Latest firmware installed onto the board. Please see "Juno Board Recovery Image and MCC firmware update":#firmware section below
* This release pre-built image, which you can download from the above list of artifacts

h3. Installation Steps

* Unzip the downloaded pre-built image
* Insert USB drive into your PC and note the assigned @'/dev/sdX'@

bc. dmesg
DRIVE=/dev/sdX # USB drive found from dmesg above

* Unmount all partitions on the drive
** If you do not unmount all of the USB drive's partitions, you run the risk that the image will not be created successfully.
* Write the image to the drive

bc. gunzip *minimal*.img.gz
sudo dd if=*minimal*.img of=$DRIVE

Replace @*minimal*.img.gz@ with the full filename of the prebuilt image you are attempting to write to the disk.

After you have created the disk image and before you remove the USB drive from your system, you should make sure you wait for all writes to the USB drive to complete.

The following commands may help with this:

bc. $ sync
$ sudo eject $DRIVE

You should also ensure that you have written the image to the USB drive correctly.  To do this, after running the eject command, physically remove the USB drive from the system and re-connect the USB drive again.  You must unmount all partitions on the USB drive at this point.  Note, due to disconnecting and reconnecting the drive, the device path /dev/sdX may have changed.  You should check the @dmesg@ output again to ensure that you know the correct path of your USB drive.

Once you are ready, run the following commands:

bc. $ sudo cmp /dev/sdX *minimal*.img
$ sync
$ sudo eject /dev/sdX

Replace @*minimal*.img.gz@ with the full filename of the prebuilt image you are attempting to write to the disk.

When you are confident that the image was created successfully, skip down to the section "Booting the image".

*Note:* Windows users may use the "Image Writer for Windows":https://launchpad.net/win32-image-writer/+download

<hr>

h2. Building a custom image using pre-built components

Sometimes, you may wish to build your own custom image for your board. Perhaps you wish to use a more recent snapshot of the "hardware pack":https://wiki.linaro.org/HardwarePacks or take the latest Android build. Whatever the reason, you will want to use the "Linaro Image Tools":https://wiki.linaro.org/Linaro-Image-Tools to create a custom image.

Using components to generate the image will yield the same functionality found in the pre-built image of the same release.

h3. Prerequisites

* Ubuntu 12.04 64 bit or newer on your desktop PC, which you can download from "www.ubuntu.com":http://www.ubuntu.com
* Download Artifacts from above
* Get "Linaro image tools":https://wiki.linaro.org/Linaro-Image-Tools. There are multiple ways you can get the latest Linaro Image Tools:

** Method 1: Install them from the Linaro Image Tools "PPA":https://launchpad.net/~linaro-maintainers/+archive/tools

bc. sudo add-apt-repository ppa:linaro-maintainers/tools
sudo apt-get update
sudo apt-get install linaro-image-tools

** Method 2: Building from source

bc. wget http://releases.linaro.org/14.06/components/platform/linaro-image-tools/linaro-image-tools-2014.06.tar.gz

* Insert the USB drive and note the assigned @'/dev/sdX'@

bc. dmesg | less

Look for a line that looks like the following at the end of the log

@[288582.790722] sdc: sdc1 sdc2 sdc3 sdc4 <sdc5 sdc6 >@

*WARNING:* In the next step, make sure you use @/dev/"whatever you see above"@. *You can erase your hard drive* with the wrong parameter.

* Create media

bc. sudo linaro-media-create --mmc /dev/sdX --dev juno --hwpack <hwpack filename> --binary <rootfs filename>

After you have created the disk image and before you remove the USB drive from your system, you should make sure you wait for all writes to the USB drive to complete.

The following commands may help with this:

bc. $ sync
$ sudo eject /dev/sdX

Where /dev/sdX is the device node for the USB drive as discovered in the instructions above.


h2. Booting the image

After the media create tool has finished executing, remove the USB drive from your PC and insert it into the board.

Before you can boot the image you will need to install the latest firmware on the board. The "instructions below":#firmware provide information on how to do this.

Once you have the latest firmware installed, you will need to configure UEFI to boot the kernel from the "boot" partition of the USB stick.  See the steps directly below for instructions on how to configure UEFI.


h2. UEFI Configuration

The example below shows how a test system was configured.  Please note:  some of the menu option numbers may be different on your board.  In particular, the menu option used to choose the boot partition may change number over a reboot.  In the example below, the partition named "boot" was option 4.  Please be careful that you choose the correct option that corresponds to the menu options you see on your board.

Also take care that the USB partitions are showing in the menu before selecting a menu option.  There is a known bug in UEFI where the partitions on USB drives does not show the first time the menu is displayed.  To overcome this, as shown in the example below, the user should enter the menu option @"[1] Add Boot Device Entry"@, by pressing @1@ followed by the enter key.  Then, when the list display and the USB partitions are missing, please press the @ESC@ key once.  This will exit out of the current menu prompt and leave you back at the Boot Menu again.  At this point, please press 1 again to re-enter the menu option @"[1] Add Boot Device Entry"@ and continue by selecting the partition named "boot" on the USB drive.

UEFI outputs to UART0 on the board.  UART0 uses 115200 baud with 8 bits and no stop bit.  Please see the  "UARTs" section on the "Getting Started tab":https://releases.linaro.org/14.06/openembedded/juno-lsk/#tabs-4 for more details on the UART configuration of the board.


h3. Example UEFI Configuration

When booting your system, after a short time, you be presented by a boot countdown from 10, thus:

bc. The default boot selection will start in  10 seconds

When you see this prompt, please press the enter key to interrupt the countdown.  You will then be presented with a menu, thus:

bc. [1] Linux from NOR Flash
[2] Shell
[3] Boot Manager
Start:

Depending on the configuration of your board, the menu option called "Boot Manager" may not be option 3.  In this example, we can see that the Boot Menu is indeed option "3", so we choose it by pressing the "3" key and pressing enter.  You will then be presented with a boot menu, thus:

bc. [1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu
Choice:

The first thing we need to do is to delete all of the existing Boot Device Entries.  Deleting a Boot Device Entry is achieved by pressing the 3 key and pressing enter:

bc. [1] Linux from NOR Flash
Delete entry:

In our example, using the default config from the first time you boot the board, there is only 1 Boot Device Entry: "Linux from NOR Flash".  You must delete this entry by pressing the 1 key and pressing enter.  After this, you will be returned to the Boot Menu where you should continue by deleting *all* Boot Device Entries that are configured.

Once you have done this, you should continue by creating a new Boot Device Entry by selecting option 1 from from the Boot Menu.  After selecting the menu option by pressing the 1 key folllowed by enter, you will see a list of available Boot Devices, thus:

bc. [1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu
Choice: 1
[1] Firmware Volume (0 MB)
[2] Firmware Volume (0 MB)
[3] NOR Flash (63 MB)
[4] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
[5] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
[6] PXE on MAC Address: 00:02:F7:00:57:DD
[7] TFTP on MAC Address: 00:02:F7:00:57:DD
Select the Boot Device:  

As you will see in the example above, there is no partition named "boot" available to the user.  At this point, the user must press the @ESC@ key to exit the "Select the Boot Device" option and return to the Boot Menu.  From the Boot Menu, please select option 1 again.  The example below shows how this looked on our test system, your results may differ:

bc. [1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu
Choice: 1
[1] Firmware Volume (4068 MB)
[2] Firmware Volume (4068 MB)
[3] NOR Flash (63 MB)
[4] boot (67 MB)
[5] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
[6] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
[7] PXE on MAC Address: 00:02:F7:00:57:DD
[8] TFTP on MAC Address: 00:02:F7:00:57:DD
Select the Boot Device:

As you will see, the menu option @"boot"@ has now appeared, allowing us to select the partition named "boot" on the USB drive.  In the example above, the partition named "boot" is option 4.  Your system may show a different option for the partition named boot on your USB drive.  Please examine the menu and choose the appropriate option.

Once you have choosen the Boot Device, you will be prompted for the configuration of that Boot Device.

The first quesion will ask for the file path of the kernel, thus:

bc. File path of the EFI Application or the kernel:

When configuring a system to boot OpenEmbedded, you enter the file path of the kernel as "Image" without the quotes and followed by the enter key, for this is the filename of the kernel in the boot partition on the USB drive.

Next you will be prompted if the kernel has Flattened Device Tree support:

bc. Has FDT support? [y/n]

The answer is yes, so please press the "y" key followed by enter.  Next you will be asked if you wish to configure an "initrd" for your system:

bc. Add an initrd: [y/n]

The answer is no, so please press the "n" key followed by enter.

After this you will be asked to supply the arguments required to boot the kernel:

bc. Arguments to pass to the binary:

Please note, copy and paste does not work well over the serial terminal.  The user is advised to type the commandline arguments by hand, character at a time, followed by the enter key.  The commandline used is shown below:

bc. console=ttyAMA0,115200 rootwait root=/dev/sda2

Finally, after entering the commandline, the final question is simply asking for a title that will appear in the Boot Menu:

bc. Description for this new Entry:

You may enter a simple string of alphanumberic characters use to represent the name of this Boot Device.  On our example system, we chose to type the string "Linux on USB", without the quotes, followed by pressing the enter key.

After entering the description string, you will then be returned to the boot menu:

bc. [1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu

It may take a long time, perhaps over a minute for UEFI to save the Boot Device Entry.

After you have configured the Boot Device Entry, next you must configure the Flattened Device Tree (FDT) path.  You do this by selecting the option "Update FDT path" by pressing the 4 key and pressing enter.  As with the Add Boot Device Entry option, next you will be presented with a list of Boot Devices that can host the FDT file.  On our test system, the list looked like this:

bc. [1] Firmware Volume (4068 MB)
[2] Firmware Volume (4068 MB)
[3] NOR Flash (63 MB)
[4] boot (67 MB)
[5] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
[6] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
[7] PXE on MAC Address: 00:02:F7:00:57:DD
[8] TFTP on MAC Address: 00:02:F7:00:57:DD

Choose the option that corresponds to the partition named "boot" on your system.  In the example above, this is option 4.  Enter the option number and press the enter key.  You will then be prompted for the file path for the FDT file:

bc. File path of the FDT blob:

At this prompt, type the filename "juno\juno.dtb" and press the enter key.  Please note, the string contains a Windows style backslash, not a Unix style forward slash.  The system may take some time to save the configuration.  After which, you will be returned to the Boot Menu:

bc. [1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Update FDT path
[5] Return to main menu

At this point, we have completed our configuration and we can return to the main menu by selecting option 5 "Return to main menu".  To select option 5, press the 5 key and press enter.

Once you are back at the main menu, you will see that the selection of Boot Devices has now changed.  On our test system, the selection looked like this:

bc. [1] Linux on USB
[2] Shell
[3] Boot Manager
Start:

Where option 1, "Linux on USB" was the Boot Device Entry that we created by following the instructions above.

You should now choose this option to boot from your USB drive.  When booting, you will see output similar to this:

bc. [1] Linux on USB
[2] Shell
[3] Boot Manager
Start: 1
   PEI    217 ms
   DXE     48 ms
   BDS 368934797873 ms
   BDS   3650 ms
Total Time = 368934801789 ms
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.10.40.0-1-linaro-lt-vexpress64 (buildslave@x86-64-07) (gcc version 4.8.3 20140401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04) ) #1ubuntu1~ci+140623185422 SMP Mon Jun 23 18:55:05 UTC 2014
[    0.000000] CPU: AArch64 Processor [410fd030] revision 0
[    0.000000] Machine: Juno

One important part of the output is the Linux version, shown above as 3.10.40.0-1-linaro-lt-vexpress64.  It is critical that you ensure you are booting Linux version 3.10.40.0-1-linaro-lt-vexpress64.  If you are not, it may be that you have mis-cofigured your system and you should revise your configuration by repeating the steps above.

note: it is normal for the BDS to show a excessively long time to load the images.  This is a known intermittent bug.  It did not take such a long time to load.


h2. DS-5 Configuration Files for Juno

As an optional step, you may wish to install DS-5 configuration files that will allow you to debug Juno. The procedure is as follows:

1.      Extract the "DS-5 config files":https://wiki.linaro.org/ARM/Juno?action=AttachFile&do=get&target=DS-5_config.zip anywhere on your host PC.

2.      Start DS-5 and select &quot;Preferences&quot; from the &quot;Window&quot; menu.

3.      In the window that opens, expand the &quot;DS-5&quot; heading and select &quot;Configuration Database&quot;

4.      In the dialogue that opens, fill in:

&nbsp;&nbsp;a.    Name, which can be any string you like e.g. &quot;Juno&quot;.

&nbsp;&nbsp;b.    Location, which must be the directory that you extracted the DS-5 config files to. Note this is not the &quot;boards&quot; directory, but the parent directory that now contains &quot;boards&quot;.

5.      Click Ok to close the dialogue

6.      Back in the &quot;Configuration Database&quot; screen, click on &quot;Rebuild database&quot; then click Ok.

 

h2(#firmware). Firmware update

This section describes how to update the firmware on the Juno board.

The configuration of the Juno Development Platform board is determined by a set of files stored on a flash memory device on the board.  The flash memory can be accessed via a USB-B socket on the rear panel of the board.  When connected to a host computer, the flash memory will appear as a USB mass storage device with a FAT16 filesystem.  The files in this filesystem are edited to control the configuration of the board.

The configuration of the Juno Development Platform board can be returned to factory default by extracting the Juno board recovery image onto the flash memory device, replacing any files already in the flash memory.

To install firmware images that you have built yourself, the procedure is the same except that you will overwrite the contents of the /SOFTWARE/ directory with your own images.

To update the MCC firmware only, the procedure is the same except that the MCC firmware update bundle will contain only a subset of the files contained in the full recovery image.

<br>

To carry out a system recovery, update the MCC firmware, or install your own custom firmware images, follow these steps:

1.      Connect a serial terminal to the top 9-pin UART0 connector on the rear panel (115200 baud, 8, n, 1).

2.      Connect a USB cable between the USB-B connector on the rear panel and a USB port of your host computer.

3.      Connect the 12 volt power supply to the board.

The serial terminal will show the command prompt Cmd>

4.      At the Cmd> prompt on the serial terminal, issue the command usb_on

bc. Cmd> usb_on

The configuration flash memory should now be visible on the host computer as a mass storage device.

5.      Save to the host PC any of the existing files in the configuration flash memory that you wish to retain for future use.

6.      If you wish to update one or more of the firmware components then skip to step 7. Otherwise, for a full system recovery, format the configuration flash memory (FAT16).

7.      Extract the board recovery image ("board_recovery_image_0.7.5.zip":http://releases.linaro.org/14.06/openembedded/juno-lsk/board_recovery_image_0.7.5.zip) to the root directory of the configuration flash memory, preserving the directory structure.

8.      If you are performing a system recovery or installing an update from ARM then skip to step 9. Otherwise if you wish to install firmware images that you have "built yourself":http://releases.linaro.org/14.06/openembedded/juno-lsk/#tabs-3 then delete the bl1.bin and fip.bin from the /SOFTWARE/ directory in the configuration flash memory, and copy your own bl1.bin and fip.bin images into that directory to replace them.

9.      Safely eject the mass storage device, giving it time to write the files to the internal storage.

10.      Press the red ON/OFF button on the rear panel of the board and wait for reprogramming to complete.

The board will load the default configuration and boot up.