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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
|
---
title: Using Ready Made Images
---
AGL provides a number of pre-built ready-made images of various versions.
## x86 (Emulation and Hardware)
### 1. QEMU (Emulation)
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/agl-ivi-demo-qt-crosssdk-qemux86-64.ext4.xz).
2. Download the [compressed kernel image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/bzImage).
3. Install [QEMU](https://www.qemu.org/download/) :
```sh
$ apt-get install qemu
```
4. Install [vinagre](https://wiki.gnome.org/Apps/Vinagre) :
```sh
$ sudo apt install vinagre
```
5. Create boot directory and copy compressed images (prebuilt & kernel) into them :
```sh
$ mkdir ~/agl-demo/
$ cp ~/Downloads/agl-ivi-demo-qt-crosssdk-qemux86-64.ext4.xz ~/agl-demo/
$ cp ~/Downloads/bzImage ~/agl-demo/
$ cd ~/agl-demo
$ sync
```
6. Extract prebuilt compressed image :
```sh
$ xz -v -d agl-ivi-demo-qt-crosssdk-qemux86-64.ext4.xz
```
7. Launch QEMU with vinagre (for scaling), remove `- snapshot \` if you want to save changes to the image files :
```sh
$ ( sleep 5 && vinagre --vnc-scale localhost ) > /tmp/vinagre.log 2>&1 &
$ qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev user,id=net0,hostfwd=tcp::2222-:22 \
-drive file=agl-ivi-demo-qt-crosssdk-qemux86-64.ext4,if=virtio,format=raw -show-cursor -usb -usbdevice tablet -device virtio-rng-pci \
-snapshot -vga virtio \
-vnc :0 -soundhw hda -machine q35 -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm \
-m 2048 -serial mon:vc -serial mon:stdio -serial null -kernel bzImage \
-append 'root=/dev/vda rw console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 verbose fstab=no'
```
- Login into AGL :
```sh
Automotive Grade Linux 11.0.0+snapshot qemux86-64 ttyS1
qemux86-64 login: root
```
- Shutdown QEMU : `$ poweroff`, otherwise QEMU will run in the background.
- To use vnc-viewer instead of vinagre :
```sh
$ ( sleep 5 && vncviewer ) &
qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev user,id=net0,hostfwd=tcp::2222-:22 \
-drive file=agl-ivi-demo-qt-crosssdk-qemux86-64.ext4,if=virtio,format=raw -show-cursor -usb -usbdevice tablet -device virtio-rng-pci \
-snapshot -vga virtio \
-vnc :0 -soundhw hda -machine q35 -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm \
-m 2048 -serial mon:vc -serial mon:stdio -serial null -kernel bzImage \
-append 'root=/dev/vda rw console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 verbose fstab=no'
```
### 2. Virtual Box (Emulation)
**NOTE :** Please note [https://www.virtualbox.org/ticket/19873](https://www.virtualbox.org/ticket/19873) as this affects the VMs resolution.
The AGL demo images do require 1920x1080. The instructions below have been adapted.
1. Download the [compressed vbox disk image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/agl-ivi-demo-qt-crosssdk-qemux86-64.wic.vmdk.xz).
2. Install and set up [Virtual Box](https://www.virtualbox.org/wiki/Linux_Downloads).
3. Extract the vmdk file : `$ xz -v -d agl-ivi-demo-qt-crosssdk-qemux86-64.wic.vmdk.xz`
4. Configure virtual box for AGL :
- Click on `New` or `Add`.
- Enter Name as `agl-demo`.
- Type as `Linux`.
- Version as `Other Linux (64-bit)`, click on `Next`.
![vbox-step-1](images/vbox-1.png)
- Select Memory size. Recommended is `2048 MB`, click on `Next`.
![vbox-step-2](images/vbox-2.png)
- Click on `Use an existing virtual hard disk file`, and select the extracted `agl-ivi-demo-qt-crosssdk-qemux86-64.wic.vmdk` file, click on `Create`.
![vbox-step-3](images/vbox-3.png)
- Go to `Settings`, and into `System`. Select `Chipset : IHC9`. Check on `Enable EFI (special OSes only)` and click on `OK`.
![vbox-step-4](images/vbox-4.png)
- Go to `Storage`, and change the attribute to `Type : AHCI` and click on `OK`.
![vbox-step-5](images/vbox-5.png)
- Next go to `Display` and change the attribute to 'VMSVGA' for the graphics driver. Change the graphics memory to be at least 64MB.
- **Important:**: Open a new terminal window and execute this command:
```sh
VBoxManage setextradata agl-demo VBoxInternal2/EfiGraphicsResolution 1920x1080
```
- Return to the UI and click on `Start`.
- For troubleshooting, you can refer [here](https://lists.automotivelinux.org/g/agl-dev-community/message/8474).
### 3. x86 physical system
**NOTE :** UEFI enabled system is required.
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/agl-ivi-demo-qt-crosssdk-qemux86-64.wic.xz).
2. Extract the image into USB drive :
```sh
$ lsblk
$ sudo umount <usb_device_name>
$ xzcat agl-ivi-demo-qt-crosssdk-qemux86-64.wic.xz | sudo dd of=<usb_device_name> bs=4M
$ sync
```
3. Boot from USB drive on the x86 system.
## ARM 32 bit (Emulation and Hardware)
### 1. QEMU (Emulation)
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm/deploy/images/qemuarm/agl-ivi-demo-qt-crosssdk-qemuarm.ext4.xz).
2. Download the [compressed kernel image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm/deploy/images/qemuarm/zImage).
3. Install [QEMU](https://www.qemu.org/download/) :
```sh
$ apt-get install qemu
```
4. Install [vinagre](https://wiki.gnome.org/Apps/Vinagre) :
```sh
$ sudo apt install vinagre
```
5. Create boot directory and copy compressed images (prebuilt & kernel) into them :
```sh
$ mkdir ~/agl-demo/
$ cp ~/Downloads/agl-ivi-demo-qt-crosssdk-qemuarm.ext4.xz ~/agl-demo/
$ cp ~/Downloads/zImage ~/agl-demo/
$ cd ~/agl-demo
$ sync
```
6. Extract prebuilt compressed image :
```sh
$ xz -v -d agl-ivi-demo-qt-crosssdk-qemuarm.ext4.xz
```
7. Launch QEMU with vinagre (for scaling), remove `- snapshot` if you want to save changes to the image files :
```sh
$ ( sleep 5 && vinagre --vnc-scale localhost ) > /tmp/vinagre.log 2>&1 &
qemu-system-arm -cpu cortex-a15 -machine virt-2.11 -nographic \
-net nic,model=virtio,macaddr=52:54:00:12:34:58 \
-net user -m 2048 -monitor none -soundhw hda -device usb-ehci \
-device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on -vnc :0 \
-device qemu-xhci -device usb-tablet -device usb-kbd \
-kernel zImage -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false" \
-drive format=raw,file=agl-ivi-demo-qt-crosssdk-qemuarm.ext4 \
-snapshot
```
- Login into AGL :
```sh
Automotive Grade Linux 11.0.0+snapshot qemux86-64 ttyS1
qemux86-64 login: root
```
- Shutdown QEMU : `$ poweroff`, otherwise QEMU will run in the background.
- To use vnc-viewer instead of vinagre :
```sh
$ ( sleep 5 && vncviewer ) &
qemu-system-arm -cpu cortex-a15 -machine virt-2.11 -nographic \
-net nic,model=virtio,macaddr=52:54:00:12:34:58 \
-net user -m 2048 -monitor none -soundhw hda -device usb-ehci \
-device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on -vnc :0 \
-device qemu-xhci -device usb-tablet -device usb-kbd \
-kernel zImage -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false" \
-drive format=raw,file=agl-ivi-demo-qt-crosssdk-qemuarm.ext4 \
-snapshot
```
### 2. BeagleBone Enhanced (BBE)
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/bbe/deploy/images/bbe/agl-telematics-demo-bbe.wic.xz).
2. Extract the image into the SD card of BeagleBone Enhanced :
```sh
$ lsblk
$ sudo umount <sdcard_device_name>
$ xzcat agl-telematics-demo-bbe.wic.xz | sudo dd of=<sdcard_device_name> bs=4M
$ sync
```
**IMPORTANT NOTE:** Before re-writing any device on your Build Host, you need to
be sure you are actually writing to the removable MicroSD card and not some other
device.
Each computer is different and removable devices can change from time to time.
Consequently, you should repeat the previous operation with the MicroSD card to
confirm the device name every time you write to the card.
To summarize this example so far, we have the following:
The first SATA drive is `/dev/sda` and `/dev/sdc` corresponds to the MicroSD card, and is also marked as a removable device.You can see this in the output of the `lsblk` command where "1" appears in the "RM" column for that device.
## AARCH64 - ARM 64bit
### 1. QEMU (Emulation)
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm64/deploy/images/qemuarm64/agl-ivi-demo-qt-crosssdk-qemuarm64.ext4.xz).
2. Download the [compressed kernel image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm64/deploy/images/qemuarm64/Image).
3. Install [QEMU](https://www.qemu.org/download/) :
```sh
$ apt-get install qemu
```
4. Install [vinagre](https://wiki.gnome.org/Apps/Vinagre) :
```sh
$ sudo apt install vinagre
```
5. Create boot directory and copy compressed images (prebuilt & kernel) into them :
```sh
$ mkdir ~/agl-demo/
$ cp ~/Downloads/agl-ivi-demo-qt-crosssdk-qemuarm64.ext4.xz ~/agl-demo/
$ cp ~/Downloads/zImage ~/agl-demo/
$ cd ~/agl-demo
$ sync
```
6. Extract prebuilt compressed image :
```sh
$ xz -v -d agl-ivi-demo-qt-crosssdk-qemuarm64.ext4.xz
```
7. Launch QEMU with vinagre (for scaling), remove `- snapshot \` if you want to save changes to the image files :
```sh
$ ( sleep 5 && vinagre --vnc-scale localhost ) > /tmp/vinagre.log 2>&1 &
qemu-system-aarch64 -cpu cortex-a57 -machine virt -nographic \
-net nic,model=virtio,macaddr=52:54:00:12:34:58 \
-net user -m 2048 -monitor none -smp 2 -soundhw hda -device usb-ehci \
-device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on \
-device qemu-xhci -device usb-tablet -device usb-kbd -vnc :0 \
-kernel Image -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false " \
-drive format=raw,file=agl-ivi-demo-qt-crosssdk-qemuarm64.ext4 \
-snapshot
```
- Login into AGL :
```sh
Automotive Grade Linux 11.0.0+snapshot qemux86-64 ttyS1
qemux86-64 login: root
```
- Shutdown QEMU : `$ poweroff`, otherwise QEMU will run in the background.
- To use vnc-viewer instead of vinagre :
```sh
$ ( sleep 5 && vncviewer ) &
qemu-system-aarch64 -cpu cortex-a57 -machine virt -nographic \
-net nic,model=virtio,macaddr=52:54:00:12:34:58 \
-net user -m 2048 -monitor none -smp 2 -soundhw hda -device usb-ehci \
-device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on \
-device qemu-xhci -device usb-tablet -device usb-kbd -vnc :0 \
-kernel Image -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false " \
-drive format=raw,file=agl-ivi-demo-qt-crosssdk-qemuarm64.ext4 \
-snapshot
```
### 2. Raspberry Pi 4
1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/raspberrypi4/deploy/images/raspberrypi4-64/agl-ivi-demo-qt-crosssdk-raspberrypi4-64.wic.xz).
2. Extract the image into the SD card of Raspberry Pi 4 :
```sh
$ lsblk
$ sudo umount <sdcard_device_name>
$ xzcat agl-ivi-demo-qt-crosssdk-raspberrypi4-64.wic.xz | sudo dd of=<sdcard_device_name> bs=4M
$ sync
```
**IMPORTANT NOTE:** Before re-writing any device on your Build Host, you need to
be sure you are actually writing to the removable MicroSD card and not some other
device.
Each computer is different and removable devices can change from time to time.
Consequently, you should repeat the previous operation with the MicroSD card to
confirm the device name every time you write to the card.
To summarize this example so far, we have the following:
The first SATA drive is `/dev/sda` and `/dev/sdc` corresponds to the MicroSD card, and is also marked as a removable device.You can see this in the output of the `lsblk` command where "1" appears in the "RM" column for that device.
3. SSH into Raspberry Pi :
- Connect Raspberry Pi to network : `Homescreen > Settings`, IP address mentioned here.
- `ssh root@<Raspberry-Pi-ip-address>`
4. Serial Debugging :
When things go wrong, you can take steps to debug your Raspberry Pi.
For debugging, you need a 3.3 Volt USB Serial cable to fascilitate
communication between your Raspberry Pi board and your build host.
You can reference the following diagram for information on the following steps:
![](images/RaspberryPi2-ModelB-debug-serial-cable.png)
1. Connect the TTL cable to the Universal Asynchronous Receiver-Transmitter
(UART) connection on your Raspberry Pi board.
Do not connect the USB side of the cable to your build host at this time.
**CAUTION:** No warranty is provided using the following procedure.
Pay particular attention to the collors of your cable as they could
vary depending on the vendor.
2. Connect the cable's BLUE wire to pin 6 (i.e. Ground) of the UART.
3. Connect the able's GREEN RX line to pin 8 (i.e. the TXD line) of
the UART.
4. Connect the cable's RED TX line to pin 10 (i.e. the RXD line) of
the UART.
5. Plug the USB connector of the cable into your build host's USB port.
6. Use your favorite tool for serial communication between your build host
and your Raspberry Pi.
For example, if your build host is a native Linux machine (e.g. Ubuntu)
you could use `screen` as follows from a terminal on the build host:
```sh
$ sudo screen /dev/ttyUSB0 115200
```
### 3. R-Car H3SK (H3ULCB board)
**NOTE :** The prebuilt image does support **non-accelerated** graphics mode (software rendering). For **accelerated** graphics support, a local build with the neccesary graphics driver is required.
1. Update the [firmware](https://elinux.org/R-Car/Boards/H3SK#Flashing_firmware) using files from [here](https://download.automotivelinux.org/AGL/snapshots/master/latest/h3ulcb-nogfx/deploy/images/h3ulcb/).
2. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/h3ulcb-nogfx/deploy/images/h3ulcb/agl-ivi-demo-qt-crosssdk-h3ulcb.wic.xz).
3. Extract the image into the boot device :
```sh
$ lsblk
$ sudo umount <boot_device_name>
$ xzcat agl-ivi-demo-qt-crosssdk-h3ulcb.wic.xz | sudo dd of=<boot_device_name> bs=4M
$ sync
```
3. [Serial](https://elinux.org/R-Car/Boards/H3SK) into the board for debugging.
For example, if your build host is a native Linux machine (e.g. Ubuntu)
you could use `screen` as follows from a terminal on the build host:
```sh
$ sudo screen /dev/ttyUSB0 115200
```
|