1 # Build and Boot AGL Instrument Cluster demo image (IC-IVI with Container isolation)
3 **1) Tested board:** **[Starter Kit Pro/M3](https://elinux.org/R-Car/Boards/M3SK) + [kingfisher support](https://elinux.org/R-Car/Boards/Kingfisher)**
8 ## 0. Host PC environemnt
10 Ubuntu OS (Tested version 18.04.6 LTS)
12 ## 1. Define Your Top-Level Directory
15 export AGL_TOP=$HOME/AGL
19 ## 2. Download the repo Tool and Set Permissions
23 export PATH=$HOME/bin:$PATH
24 curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/bin/repo
25 chmod a+x $HOME/bin/repo
28 ## 3. Download the AGL Source Files
29 - **AGL Version:** Magic Marlin
33 export AGL_TOP=$HOME/AGL/marlin
35 git config --global user.email "you@example.com"
36 git config --global user.name "Your Name"
37 repo init -b marlin -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
40 - Optional: Specify the manifest file(marlin_13.0.0.xml) using -m option
43 repo init -b marlin -m marlin_13.0.0.xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
45 - Optional: Specify the master branch
47 repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
50 ## 4. Downloading Proprietary Drivers
51 Downloading Proprietary Drivers from [Renesas-automotive-products](https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs/r-car-h3-m3-documents-software)
52 - To check the files to download
54 grep -rn ZIP_.= $AGL_TOP/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
55 export XDG_DOWNLOAD_DIR=$HOME/Downloads
57 - Download and copy Proprietary Drivers files (Run commands at downloaded files directory)
59 cp R-Car_Gen3_Series_Evaluation_Software_Package_* $XDG_DOWNLOAD_DIR/
60 chmod a+rw $XDG_DOWNLOAD_DIR/*.zip
62 ## 5. Define Your Board
63 - Supporting Starter Kit Pro/M3 + kingfisher Board (For other supported boards, check [Define Your Board](https://docs.automotivelinux.org/en/master/#0_Getting_Started/2_Building_AGL_Image/5_3_RCar_Gen_3/))
65 export MACHINE=m3ulcb-kf
67 ## 6. Run the aglsetup.sh Script
70 source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b $MACHINE agl-lxc
75 bitbake lxc-host-image-demo
77 - The build process puts the resulting image in the Build Directory
78 ($AGL_TOP/m3ulcb-kf/tmp/deploy/images/m3ulcb)
79 ## 8.Boot the Board (Deploying the AGL Demo Image)
80 - To boot your image on the Renesas board, you need to do three things:
82 a) Update all [firmware](https://docs.automotivelinux.org/en/marlin/#0_Getting_Started/2_Building_AGL_Image/5_3_RCar_Gen_3/#4-troubleshooting) on R-Car M3 Starter Kit board (Flashing firmware).
84 b) Prepare the MicroSD card and Flash image to the MicroSD card using [Etcher](https://www.balena.io/etcher/)
85 (**image file name:** lxc-host-image-demo-m3ulcb-kf.wic.xz), then insert MicroSD card in the R-Car M3SK.
88 1) Use a MicroUSB cable to connect the PC to R-Car Starter Kit Pro (M3ULCB) board CN12 "CPLD/DEBUG"
89 - Serial settings are 115200 8N1.
90 - Run any standard terminal emulator program (e.g. minicom).
91 [Replace **"Device"** with USB tty device name, for example **`/dev/ttyUSB0`**]
93 sudo minicom -b 115200 -D "DEVICE"
97 - Quickly hit any key to get into the U-boot command prompt; you should see the following:
99 Hit any key to stop autoboot: 0 =>
101 - Booting image command (for details check [How to boot](https://elinux.org/R-Car/AGL#Instrument_Cluster_with_Container_isolation_demo_image))
103 ext4load 0x48080000 Image
104 ext4load 0x48000000 /boot/r8a77961-ulcb-kf.dtb
105 booti 0x48080000 - 0x48000000
108 # Run SoC board Screen
109 A) Connect HDMI panel to M3SK(CN4) for **IVI Container**
110 
112 B) Connect HDMI panel to Kingfisher(CN49)for **Cluster Container**
113 
115 <! -- https://elinux.org/images/thumb/7/76/Marlin-lxc-Cluster.JPG/1200px-Marlin-lxc-Cluster.JPG) -->
117 1. [eLinux](https://elinux.org/R-Car/AGL)
118 1. [Kingfisher Board](https://elinux.org/R-Car/Boards/Kingfisher)
119 1. [R-Car M3SK](https://elinux.org/R-Car/Boards/M3SK#Flashing_firmware)
120 1. [agl reference machines](https://docs.automotivelinux.org/en/master/#1_hardware_support/overview/)
121 1. [AGL Tech Day Presenation](https://static.sched.com/hosted_files/agltechday2022/3b/agl-techday-202204.pdf)
122 1. [Build AGL Image](https://docs.automotivelinux.org/en/master/#0_Getting_Started/2_Building_AGL_Image/0_Build_Process/)
123 1. [Building for Supported Renesas Boards](https://docs.automotivelinux.org/en/master/#0_Getting_Started/2_Building_AGL_Image/5_3_RCar_Gen_3/)