d493f87b2236eb5c791ded134b4d2125f0043f93
[AGL/documentation.git] / docs / 1_Getting_Started / 3_Build_and_Boot_guide_Profile / 1_Instrument_Cluster_(IC-IVI_with_Container_isolation).md
1 # Build and Boot AGL Instrument Cluster demo image (IC-IVI with Container isolation)
2 ## Required Equipments
3 **1) Tested board:** **[Starter Kit Pro/M3](https://elinux.org/R-Car/Boards/M3SK) + [kingfisher support](https://elinux.org/R-Car/Boards/Kingfisher)**
4
5 **2) MicroUSB**
6
7 **3) MicroSD card**
8 ## 0. Host PC environemnt
9 **Build PC**
10 Ubuntu OS (Tested version 18.04.6 LTS)
11
12 ## 1. Define Your Top-Level Directory
13
14 ```bash
15 export AGL_TOP=$HOME/AGL
16 mkdir -p $AGL_TOP
17 ```
18
19 ## 2. Download the repo Tool and Set Permissions
20
21 ```bash
22 mkdir -p $HOME/bin
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
26 ```
27
28 ## 3. Download the AGL Source Files
29 - **AGL Version:** Magic Marlin
30 ```bash
31 cd $AGL_TOP
32 mkdir marlin
33 export AGL_TOP=$HOME/AGL/marlin
34 cd $AGL_TOP
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
38 repo sync
39 ```
40 - Optional: Specify the manifest file(marlin_13.0.0.xml) using -m option
41
42 ```bash
43 repo init -b marlin -m marlin_13.0.0.xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
44 ```
45 - Optional: Specify the master branch
46 ```bash
47 repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
48 ```
49
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
53 ```bash
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
56 ```
57 - Download and copy Proprietary Drivers files (Run commands at downloaded files directory)
58 ```bash
59 cp R-Car_Gen3_Series_Evaluation_Software_Package_* $XDG_DOWNLOAD_DIR/
60 chmod a+rw $XDG_DOWNLOAD_DIR/*.zip
61 ```
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/))
64 ```bash
65 export MACHINE=m3ulcb-kf
66 ```
67 ## 6. Run the aglsetup.sh Script
68 ```bash
69 cd $AGL_TOP
70 source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b $MACHINE agl-lxc
71 ```
72
73 ## 7. Using BitBake
74 ```bash
75 bitbake lxc-host-image-demo
76 ```
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:
81
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).
83
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.  
86 c) Boot the board.
87
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`**]
92 ```bash
93 sudo minicom -b 115200 -D "DEVICE"
94 ```
95
96 - Power on the board
97 - Quickly hit any key to get into the U-boot command prompt; you should see the following:
98  ```bash
99 Hit any key to stop autoboot:  0                                                                =>
100 ```
101 - Booting image command (for details check [How to boot](https://elinux.org/R-Car/AGL#Instrument_Cluster_with_Container_isolation_demo_image))
102  ```bash
103 ext4load 0x48080000 Image
104 ext4load 0x48000000 /boot/r8a77961-ulcb-kf.dtb 
105 booti 0x48080000 - 0x48000000 
106 ```
107
108 # Run SoC board Screen
109 A) Connect HDMI panel to M3SK(CN4) for **IVI Container**
110 ![IVI](https://elinux.org/images/9/91/Marlin-lxc-Ivi.JPG)
111
112 B) Connect HDMI panel to Kingfisher(CN49)for **Cluster Container**
113 ![IC](https://elinux.org/images/7/76/Marlin-lxc-Cluster.JPG)
114
115 <! -- https://elinux.org/images/thumb/7/76/Marlin-lxc-Cluster.JPG/1200px-Marlin-lxc-Cluster.JPG) -->
116 # Reference webpages 
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/)
124