2 title: Using Ready Made Images
5 AGL provides a number of pre-built ready-made images of various versions.
7 ## x86 (Emulation and Hardware)
9 ### 1. QEMU (Emulation)
11 1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/agl-demo-platform-crosssdk-qemux86-64.ext4.xz).
13 2. Download the [compressed kernel image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/bzImage).
15 3. Install [QEMU](https://www.qemu.org/download/) :
18 $ apt-get install qemu
21 4. Install [vinagre](https://wiki.gnome.org/Apps/Vinagre) :
24 $ sudo apt install vinagre
27 5. Create boot directory and copy compressed images (prebuilt & kernel) into them :
31 $ cp ~/Downloads/agl-demo-platform-crosssdk-qemux86-64.ext4.xz ~/agl-demo/
32 $ cp ~/Downloads/bzImage ~/agl-demo/
37 6. Extract prebuilt compressed image :
40 $ xz -v -d agl-demo-platform-crosssdk-qemux86-64.ext4.xz
43 7. Launch QEMU with vinagre (for scaling), remove `- snapshot \` if you want to save changes to the image files :
46 $ ( sleep 5 && vinagre --vnc-scale localhost ) > /tmp/vinagre.log 2>&1 &
47 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 \
48 -drive file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw -show-cursor -usb -usbdevice tablet -device virtio-rng-pci \
49 -snapshot -vga virtio \
50 -vnc :0 -soundhw hda -machine q35 -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm \
51 -m 2048 -serial mon:vc -serial mon:stdio -serial null -kernel bzImage \
52 -append 'root=/dev/vda rw console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 verbose fstab=no'
58 Automotive Grade Linux 11.0.0+snapshot qemux86-64 ttyS1
60 qemux86-64 login: root
64 - Shutdown QEMU : `$ poweroff`, otherwise QEMU will run in the background.
65 - To use vnc-viewer instead of vinagre :
67 $ ( sleep 5 && vncviewer ) &
68 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 \
69 -drive file=agl-demo-platform-crosssdk-qemux86-64.ext4,if=virtio,format=raw -show-cursor -usb -usbdevice tablet -device virtio-rng-pci \
70 -snapshot -vga virtio \
71 -vnc :0 -soundhw hda -machine q35 -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt -enable-kvm \
72 -m 2048 -serial mon:vc -serial mon:stdio -serial null -kernel bzImage \
73 -append 'root=/dev/vda rw console=tty0 mem=2048M ip=dhcp oprofile.timer=1 console=ttyS0,115200n8 verbose fstab=no'
76 ### 2. Virtual Box (Emulation)
78 1. Download the [compressed vbox disk image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/agl-demo-platform-crosssdk-qemux86-64.wic.vmdk.xz).
80 2. Install and set up [Virtual Box](https://www.virtualbox.org/wiki/Linux_Downloads).
82 3. Extract the vmdk file : `$ xz -v -d agl-demo-platform-crosssdk-qemux86-64.wic.vmdk.xz`
84 4. Configure virtual box for AGL :
85 - Click on `New` or `Add`.
86 - Enter Name as `agl-demo`.
88 - Version as `Other Linux (64-bit)`, click on `Next`.
89 
90 - Select Memory size. Recommended is `2048 MB`, click on `Next`.
91 
92 - Click on `Use an existing virtual hard disk file`, and select the extracted `agl-demo-platform-crosssdk-qemux86-64.wic.vmdk` file, click on `Create`.
93 
94 - Go to `Settings`, and into `System`. Select `Chipset : IHC9`. Check on `Enable EFI (special OSes only)` and click on `OK`.
95 
96 - Go to `Storage`, and change the attribute to `Type : AHCI` and click on `OK`.
97 
98 - Next go to `Display` and change the attribute to 'VMSVGA' for the graphics driver. Change the graphics memory to be at least 64MB.
100 - For troubleshooting, you can refer [here](https://lists.automotivelinux.org/g/agl-dev-community/message/8474).
102 ### 3. x86 physical system
104 **NOTE :** UEFI enabled system is required.
106 1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/images/qemux86-64/agl-demo-platform-crosssdk-qemux86-64.wic.xz).
108 2. Extract the image into USB drive :
112 $ sudo umount <usb_device_name>
113 $ xzcat agl-demo-platform-crosssdk-qemux86-64.wic.xz | sudo dd of=<usb_device_name> bs=4M
118 3. Boot from USB drive on the x86 system.
120 ## ARM 32 bit (Emulation and Hardware)
122 ### 1. QEMU (Emulation)
124 1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm/deploy/images/qemuarm/agl-demo-platform-crosssdk-qemuarm.ext4.xz).
126 2. Download the [compressed kernel image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm/deploy/images/qemuarm/zImage).
128 3. Install [QEMU](https://www.qemu.org/download/) :
131 $ apt-get install qemu
134 4. Install [vinagre](https://wiki.gnome.org/Apps/Vinagre) :
137 $ sudo apt install vinagre
140 5. Create boot directory and copy compressed images (prebuilt & kernel) into them :
144 $ cp ~/Downloads/agl-demo-platform-crosssdk-qemuarm.ext4.xz ~/agl-demo/
145 $ cp ~/Downloads/zImage ~/agl-demo/
150 6. Extract prebuilt compressed image :
153 $ xz -v -d agl-demo-platform-crosssdk-qemuarm.ext4.xz
156 7. Launch QEMU with vinagre (for scaling), remove `- snapshot` if you want to save changes to the image files :
159 $ ( sleep 5 && vinagre --vnc-scale localhost ) > /tmp/vinagre.log 2>&1 &
160 qemu-system-arm -cpu cortex-a15 -machine virt-2.11 -nographic \
161 -net nic,model=virtio,macaddr=52:54:00:12:34:58 \
162 -net user -m 2048 -monitor none -soundhw hda -device usb-ehci \
163 -device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on -vnc :0 \
164 -device qemu-xhci -device usb-tablet -device usb-kbd \
165 -kernel zImage -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false" \
166 -drive format=raw,file=agl-demo-platform-crosssdk-qemuarm.ext4 \
173 Automotive Grade Linux 11.0.0+snapshot qemux86-64 ttyS1
175 qemux86-64 login: root
179 - Shutdown QEMU : `$ poweroff`, otherwise QEMU will run in the background.
180 - To use vnc-viewer instead of vinagre :
182 $ ( sleep 5 && vncviewer ) &
183 qemu-system-arm -cpu cortex-a15 -machine virt-2.11 -nographic \
184 -net nic,model=virtio,macaddr=52:54:00:12:34:58 \
185 -net user -m 2048 -monitor none -soundhw hda -device usb-ehci \
186 -device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on -vnc :0 \
187 -device qemu-xhci -device usb-tablet -device usb-kbd \
188 -kernel zImage -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false" \
189 -drive format=raw,file=agl-demo-platform-crosssdk-qemuarm.ext4 \
193 ### 2. BeagleBone Enhanced (BBE)
195 1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/bbe/deploy/images/bbe/agl-demo-platform-crosssdk-bbe.wic.xz).
197 2. Extract the image into the SD card of BeagleBone Enhanced :
201 $ sudo umount <sdcard_device_name>
202 $ xzcat agl-demo-platform-crosssdk-bbe.wic.xz | sudo dd of=<sdcard_device_name> bs=4M
206 **IMPORTANT NOTE:** Before re-writing any device on your Build Host, you need to
207 be sure you are actually writing to the removable MicroSD card and not some other
209 Each computer is different and removable devices can change from time to time.
210 Consequently, you should repeat the previous operation with the MicroSD card to
211 confirm the device name every time you write to the card.
213 To summarize this example so far, we have the following:
214 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.
216 ## AARCH64 - ARM 64bit
218 ### 1. QEMU (Emulation)
220 1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm64/deploy/images/qemuarm64/agl-demo-platform-crosssdk-qemuarm64.ext4.xz).
222 2. Download the [compressed kernel image](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm64/deploy/images/qemuarm64/Image).
224 3. Install [QEMU](https://www.qemu.org/download/) :
227 $ apt-get install qemu
230 4. Install [vinagre](https://wiki.gnome.org/Apps/Vinagre) :
233 $ sudo apt install vinagre
236 5. Create boot directory and copy compressed images (prebuilt & kernel) into them :
240 $ cp ~/Downloads/agl-demo-platform-crosssdk-qemuarm64.ext4.xz ~/agl-demo/
241 $ cp ~/Downloads/zImage ~/agl-demo/
246 6. Extract prebuilt compressed image :
249 $ xz -v -d agl-demo-platform-crosssdk-qemuarm64.ext4.xz
252 7. Launch QEMU with vinagre (for scaling), remove `- snapshot \` if you want to save changes to the image files :
255 $ ( sleep 5 && vinagre --vnc-scale localhost ) > /tmp/vinagre.log 2>&1 &
256 qemu-system-aarch64 -cpu cortex-a57 -machine virt -nographic \
257 -net nic,model=virtio,macaddr=52:54:00:12:34:58 \
258 -net user -m 2048 -monitor none -smp 2 -soundhw hda -device usb-ehci \
259 -device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on \
260 -device qemu-xhci -device usb-tablet -device usb-kbd -vnc :0 \
261 -kernel Image -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false " \
262 -drive format=raw,file=agl-demo-platform-crosssdk-qemuarm64.ext4 \
269 Automotive Grade Linux 11.0.0+snapshot qemux86-64 ttyS1
271 qemux86-64 login: root
275 - Shutdown QEMU : `$ poweroff`, otherwise QEMU will run in the background.
276 - To use vnc-viewer instead of vinagre :
278 $ ( sleep 5 && vncviewer ) &
279 qemu-system-aarch64 -cpu cortex-a57 -machine virt -nographic \
280 -net nic,model=virtio,macaddr=52:54:00:12:34:58 \
281 -net user -m 2048 -monitor none -smp 2 -soundhw hda -device usb-ehci \
282 -device virtio-rng-pci -device VGA,vgamem_mb=64,edid=on \
283 -device qemu-xhci -device usb-tablet -device usb-kbd -vnc :0 \
284 -kernel Image -append "console=ttyAMA0,115200 root=/dev/vda verbose systemd.log_color=false " \
285 -drive format=raw,file=agl-demo-platform-crosssdk-qemuarm64.ext4 \
289 ### 2. Raspberry Pi 4
291 1. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/raspberrypi4/deploy/images/raspberrypi4-64/agl-demo-platform-crosssdk-raspberrypi4-64.wic.xz).
293 2. Extract the image into the SD card of Raspberry Pi 4 :
297 $ sudo umount <sdcard_device_name>
298 $ xzcat agl-demo-platform-crosssdk-raspberrypi4-64.wic.xz | sudo dd of=<sdcard_device_name> bs=4M
302 **IMPORTANT NOTE:** Before re-writing any device on your Build Host, you need to
303 be sure you are actually writing to the removable MicroSD card and not some other
305 Each computer is different and removable devices can change from time to time.
306 Consequently, you should repeat the previous operation with the MicroSD card to
307 confirm the device name every time you write to the card.
309 To summarize this example so far, we have the following:
310 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.
312 3. SSH into Raspberry Pi :
313 - Connect Raspberry Pi to network : `Homescreen > Settings`, IP address mentioned here.
314 - `ssh root@<Raspberry-Pi-ip-address>`
317 4. Serial Debugging :
319 When things go wrong, you can take steps to debug your Raspberry Pi.
320 For debugging, you need a 3.3 Volt USB Serial cable to fascilitate
321 communication between your Raspberry Pi board and your build host.
323 You can reference the following diagram for information on the following steps:
325 
327 1. Connect the TTL cable to the Universal Asynchronous Receiver-Transmitter
328 (UART) connection on your Raspberry Pi board.
329 Do not connect the USB side of the cable to your build host at this time.
331 **CAUTION:** No warranty is provided using the following procedure.
332 Pay particular attention to the collors of your cable as they could
333 vary depending on the vendor.
335 2. Connect the cable's BLUE wire to pin 6 (i.e. Ground) of the UART.
337 3. Connect the able's GREEN RX line to pin 8 (i.e. the TXD line) of
340 4. Connect the cable's RED TX line to pin 10 (i.e. the RXD line) of
343 5. Plug the USB connector of the cable into your build host's USB port.
345 6. Use your favorite tool for serial communication between your build host
346 and your Raspberry Pi.
347 For example, if your build host is a native Linux machine (e.g. Ubuntu)
348 you could use `screen` as follows from a terminal on the build host:
351 $ sudo screen /dev/ttyUSB0 115200
354 ### 3. R-Car H3SK (H3ULCB board)
356 **NOTE :** The prebuilt image doesn't support graphics (as of yet) and will run headless. For graphical support, a local build with the neccesary graphics driver is required.
359 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/).
361 2. Download the [compressed prebuilt image](https://download.automotivelinux.org/AGL/snapshots/master/latest/h3ulcb-nogfx/deploy/images/h3ulcb/agl-image-ivi-crosssdk-h3ulcb.wic.xz).
363 3. Extract the image into the boot device :
367 $ sudo umount <boot_device_name>
368 $ xzcat agl-image-ivi-crosssdk-h3ulcb.wic.xz | sudo dd of=<boot_device_name> bs=4M
372 3. [Serial](https://elinux.org/R-Car/Boards/H3SK) into the board for debugging.
373 For example, if your build host is a native Linux machine (e.g. Ubuntu)
374 you could use `screen` as follows from a terminal on the build host:
377 $ sudo screen /dev/ttyUSB0 115200