summaryrefslogtreecommitdiff
path: root/building-and-testing
blob: eb323155dcb1a488e7a6ffb8a42d8b9e3d33a730 (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
h3. Baserock GENIVI Baseline for ARMv7-versatile

*Note: Support for Baserock ARM systems was not provided for F-1.0.*

h4. Download a prebuilt ARMv7 Versatile image

*Note: This step is to be executed on an x86 host machine that has QEMU with ARM emulation support, and 'tap' installed*

If all you want to do is boot the system, you'll need to download

* [the genivi baseline system rootfs|http://download.baserock.org/baserock/baserock-8-genivi-baseline-armv7-versatile.img.gz] and
* [the kernel zImage|http://download.baserock.org/baserock/baserock-8-genivi-baseline-armv7-versatile.zImage]


h4. Setting up am ARMv7-versatile development system

*Note: This step is to be executed on an x86 host machine that has QEMU with ARM emulation support, and 'tap' installed*

_In order to create a Baserock development VM, you'll need about 35GB of free space on your host. It makes sense to start in a new, empty directory._

h5. 1. Download and extract the development image

Download the kernel and rootfs for the GENIVI devel system

* [genivi devel system rootfs|http://download.baserock.org/baserock/baserock-8-genivi-devel-armv7-versatile.img.gz]
* [kernel zImage|http://download.baserock.org/baserock/baserock-8-genivi-devel-armv7-versatile.zImage]

e.g.:

{code}
wget http://download.baserock.org/baserock/baserock-8-genivi-devel-armv7-versatile.img.gz
wget http://download.baserock.org/baserock/baserock-8-genivi-devel-armv7-versatile.zImage
{code}

h5. 2. Extract the rootfs

{code}
gunzip -c baserock-8-genivi-devel-armv7-versatile.img.gz > baserock-8-genivi-devel-armv7-versatile.img
{code}

h5. 3. Clone the script to boot the .img files

{code}
git clone git://trove.baserock.org/baserock/baserock/genivi-initial-setup
{code}


h5. 4. Use the script to boot your image

This script will check out the Foton 1.1 version of the script and boot the
baserock-8-genivi-devel-armv7-versatile system.

{code}
cd genivi-initial-setup
git checkout F-1.1
./run-built-arm-image.sh ../baserock-8-genivi-devel-armv7-versatile.zImage ../baserock-8-genivi-devel-armv7-versatile.img
{code}

After this, you should see a QEMU window open and boot the ARM Baserock development image.

h4. Building the ARMv7-versatile baseline

*Note: For this step you need to work within the development VM. Boot it and log in (username: root, no password) and perform this step in the VM*

h5. 1. Check out a system branch

{code}
git config --global user.name '<YOUR-NAME>'
git config --global user.email '<YOUR-EMAIL>'
morph init /src/workspace
cd /src/workspace
morph checkout baserock:baserock/morphs baserock/release/baserock-8
cd baserock/release/baserock-8/baserock\:baserock/morphs
{code}

h5. 2. Build the system

{code}
morph build genivi-baseline-system-armv7-versatile
{code}

h4. Testing the ARMv7-versatile baseline

To use the built system, it must first be turned into a useful format by _deploying_ it.

h5. 1. Deploy the rootfs

{code}
morph deploy --no-git-update rawdisk genivi-baseline-system-armv7-versatile genivi-baseline-system.img DISK_SIZE=4G
{code}

_Note: We add --no-git-update because we know there won't be any new changes, so we can save the time it would take to check for changes_

h5. 2. Copy the rootfs to your host machine

After it has been deployed, you can copy it out of your virtual machine. The simplest way would be with scp:

{code}
scp genivi-devel-system.img <USER>@<HOST-SYSTEM>:<PATH-TO-ROOTFS.img>
{code}

h5. 3. Copy the kernel to your host machine

The built kernel can be found by performing:

{code}
ls -t /src/cache/artifacts/*kernel | head -1
{code}

Copy that file out however is most convenient, e.g. with scp:

{code}
scp `ls -t /src/cache/artifacts/*kernel | head -1` <USER>@<HOST-SYSTEM>:<PATH-TO-KERNEL.zImage>
{code}

h5. 4. Boot your built system

*Note: This step is to be executed on an x86 host machine that has QEMU with ARM emulation support, and 'tap' installed*

Boot the new system in the exact same way as the old one:

{code}
genivi-initial-setup/run-built-arm-image.sh <PATH-TO-KERNEL.zImage> <PATH-TO-ROOTFS.img>
{code}