summaryrefslogtreecommitdiff
path: root/android/images/vexpress-lsk/HOWTO_install.txt
blob: a5c7fe0f52e114265819190e6611ab0ee3e8eff8 (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
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 Versatile Express board has the latest firmware and boot loader installed. Please check the "Firmware Update" tab on this page for the latest updates and installation instructions.

h2. Using pre-built image

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
* 4GB SD card or larger
* Latest firmware installed onto the Versatile Express. Please see "Firmware Update" tab
* This release pre-built image (vexpress.img.bz2), which you can downloaded from the above list of artifacts or just click "here":http://releases.linaro.org/latest/android/vexpress-lsk/vexpress.img.bz2

h3. Installation Steps

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

bc. dmesg
SDCARD=/dev/sdX # sdcard found from dmesg above
bzcat vexpress.img.bz2 | sudo dd bs=64k of=$SDCARD

When the image is created, 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 a Versatile Express. 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 or use the following command in your terminal

bc. wget http://releases.linaro.org/latest/android/vexpress-lsk/boot.tar.bz2
wget http://releases.linaro.org/latest/android/vexpress-lsk/system.tar.bz2
wget http://releases.linaro.org/latest/android/vexpress-lsk/userdata.tar.bz2

* Download "Linaro image tools":https://wiki.linaro.org/Linaro-Image-Tools which can be obtained in two ways:

** 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/latest/components/platform/linaro-image-tools/linaro-image-tools-${YYYY}.${MM}.tar.gz

* Insert SD card and note the assigned @'/dev/sdX'@ or @'/dev/mmcblk0'@

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 >@

Or, if your machine uses @'/dev/mmcblkX'@, you may see a line line this:

@[10770.938042]  mmcblk0: p1 p2 p3 p4 < p5 p6 >@

*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. linaro-android-media-create --mmc /dev/sdX --dev vexpress --boot boot.tar.bz2 --system system.tar.bz2 --userdata userdata.tar.bz2

h2. Booting the image

After the media create tool has finished executing, remove the SD card from your PC and insert it into the Versatile Express board.

Before you can boot the image you will need to install the UEFI boot loader into NOR flash and update the Versatile MMC card configuration files. The instructions on the Firmware Update tab provide information on how to do this and how to configure UEFI to specify the SD card as a boot device.

h2. Advanced Setup for Benchmarking

Advanced users of Versatile Express may wish to perform benchmarking tests on the board.

Booting with the root filesystem on a USB mass storage device is more efficient both in terms of electrical power and processing speed.  Unfortunately, UEFI does not support booting the kernel from USB.  In order to achieve this, we recommend that you install the kernel onto SD card and the root filesystem to USB mass storage.

The instructions below will create two identical images: one on SD card and one on USB mass storage.  The user is able to choose which device the kernel uses for the root filesystem by adding a command line parameter.  By default, the android kernel will expect the root filesystem to be read from the SD card.  Adding the parameter "androidboot.hardware=arm-versatileexpress-usb" to the command line will over-ride this behaviour and instruct the kernel to read the root filesystem from USB.

Before following these instructions, ensure that you have both an SD card and a USB mass storage device of at least 4GB inserted into your Linux machine.

h3. Using a pre-built image

Follow the instructions above for creating an image on an SD card.  Then repeat the instructions using the device path for your USB device.  For example:

bc. dmesg
SDCARD=/dev/sdX # sdcard found from dmesg above
USBMS=/dev/sdY # USB device found from dmesg above
bzcat vexpress.img.bz2 | sudo dd bs=64k of=$SDCARD
bzcat vexpress.img.bz2 | sudo dd bs=64k of=$USBMS

h3. Using linaro-android-media-create

First the user should run linaro-android-media-create as described above.  Then run it again with a USB mass storage device.  This will create two release images: one on the SD card and the other on the USB device.

For example:

bc. dmesg
SDCARD=/dev/sdX # sdcard found from dmesg above
USBMS=/dev/sdY # USB device found from dmesg above
linaro-android-media-create --mmc $SDCARD --dev vexpress --boot boot.tar.bz2 --system system.tar.bz2 --userdata userdata.tar.bz2
linaro-android-media-create --mmc $USBMS  --dev vexpress --boot boot.tar.bz2 --system system.tar.bz2 --userdata userdata.tar.bz2

h3. Booting your system with the advanced setup

Insert the SD card into the card slot on the Versatile Express board and insert the USB device into one of the USB device slots on the board.  The USB slots are located below the ethernet port on the rear panel.

Boot the board using the standard UEFI firmware setup as described in the Firmware Update tab.

When UEFI starts, you will need to interrupt the boot countdown and edit the configuration to add the following text to the end of the kernel commandline:

bc. androidboot.hardware=arm-versatileexpress-usb

Instructions for updating the UEFI configuration can be found on the "UEFI wiki":https://wiki.linaro.org/ARM/UEFI#Updating_your_UEFI_Configuration