summaryrefslogtreecommitdiff
path: root/android/images/vexpress-lsk/HOWTO_getsourceandbuild.txt
blob: 3f5a6ff28b3b402c8bf03003d450df3731048d5b (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
h1. Accessing Source Code

h2. Linaro Android JB Source Code

Run the "linaro_android_build_cmds.sh":http://releases.linaro.org/latest/android/vexpress-lsk/linaro_android_build_cmds.sh, it will download the entire source code for both Android JB and the kernel and attempt to build it.

The pinned and source manifests can be found here:

* "Pinned Manifest":http://releases.linaro.org/latest/android/vexpress-lsk/pinned-manifest.xml ("?":https://wiki.linaro.org/Platform/Android/ReproduceABuildExactly)
* "Source Manifest":http://releases.linaro.org/latest/android/vexpress-lsk/source-manifest.xml

h2. Kernel Source Code

Obtain the exact *kernel source code* for this cycle by using the "linaro_kernel_build_cmds.sh":http://releases.linaro.org/latest/android/vexpress-lsk/linaro_kernel_build_cmds.sh script to download the source and build it. You can get the kernel configuration from "here":http://releases.linaro.org/latest/android/vexpress-lsk/kernel_config (listed above)

h2. Compiling Linaro Android RootFS+Kernel

The following simple steps download, install and compile a complete Linaro Android distribution

* Download and install Ubuntu 12.04 64 bit or newer ("download":http://www.ubuntu.com)
* Install the following packages:

bc. sudo apt-get update
sudo apt-get install zip curl flex bison build-essential git-core gnupg gperf zlib1g-dev libx11-dev x11proto-core-dev \
gcc-multilib g++-multilib libc6-dev-i386 ia32-libs lib32z-dev gcc-4.5 g++-4.5 cpp-4.5 gcc-4.5-multilib g++-4.5-multilib \
uboot-mkimage uuid-dev openjdk-7-jdk ant lib32ncurses5-dev xsltproc
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javadoc

* Download the Android building script for this release from "here":http://releases.linaro.org/latest/android/vexpress-lsk/linaro_android_build_cmds.sh or from the list of artifacts listed above.

* Run the script

bc. chmod a+x linaro_android_build_cmds.sh
./linaro_android_build_cmds.sh -m pinned-manifest.xml

h3. Installing Android JB on your board

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

* Insert the SD card into your Versatile Express board and reboot it

p. If UEFI is already configured to boot a Linaro Android image, it will boot from the SD card. If not, follow the instructions in the section: "Configure UEFI":https://wiki.linaro.org/ARM/UEFI#Configuring_UEFI_to_boot_Android_on_Juno found on the Linaro wiki.

h2. Compiling and installing your Kernel

h3. Prerequisites

* Download and install Ubuntu 12.04 64 bit or newer ("download":http://www.ubuntu.com)
* Install the following packages by typing:

bc. sudo apt-get install gcc-arm-linux-gnueabi curl git libncurses5-dev

* Create a working subdirectory
* Download the auto build script for this release from the list of artifacts above (the kernel configuration will be automatically downloaded).
* Run the build script

bc. chmod a+x linaro_kernel_build_cmds.sh
./linaro_kernel_build_cmds.sh

*Note:* When you run menuconfig, make sure you go to @System Type -> Versatile Express@ platform type and make sure that both options are enabled.

bc. [*] Versatile Express Cortex-A9x4 tile
[*] Device Tree support for Versatile Express platforms

This will mean that the same kernel will run on A5, A9, TC2 and various fast models.

h1. Installing your kernel

This section is common for both Android and OpenEmbedded

* Create the Device Tree blob if you don’t have one in your Linaro image (note, the A9 Core Tile boots using an ATAGS kernel):

bc. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs

* Insert the SD card containing the Linaro disk image
* Copy the kernel onto the memory card

bc. cp arch/arm/boot/uImage /media/boot/

* Copy the device tree blob
** For A9 CoreTile: no device tree blob is needed
** For A5 CoreTile: @cp arch/arm/boot/vexpress-v2p-ca5s.dtb /media/boot/v2p-ca5s.dtb@
** For A15 CoreTile (TC1): @cp arch/arm/boot/vexpress-v2p-ca15-tc1.dtb /media/boot/v2p-ca15-tc1.dtb@
** For A15_A7 CoreTile: (TC2): @cp arch/arm/boot/vexpress-v2p-ca15_a7.dtb /media/boot/v2p-ca15-tc2.dtb@

* Eject the memory card  @eject /media/boot@

* Insert the memory card into the Versatile Express board and power it on