Simplified doc-site generation
[AGL/documentation.git] / docs / 0_Getting_Started / 2_Developing_an_AGL_Image / 8_Build_for_R_Car_Starter_Kit_gen3_board.md
1 ---
2 edit_link: ''
3 title: Build for R Car Starter Kit gen3 board
4 origin_url: >-
5   https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/docs/getting-started/machines/renesas.md
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/getting_started/master/image-development-workflow-getting-started-book.yml -->
9
10 # Building for Supported Renesas Boards
11
12 AGL supports building for several automotive
13 [Renesas](https://www.renesas.com/us/en/solutions/automotive.html) board kits.
14 Renesas is the number one supplier of vehicle control microcontrollers and
15 System on a Chip (SoC) products for the automotive industry.
16
17 This section provides the build and deploy steps you need to create an
18 image for the following Renesas platforms:
19
20 * [Renesas R-Car Starter Kit Pro Board](https://www.elinux.org/R-Car/Boards/M3SK)
21 * [Renesas R-Car Starter Kit Premier Board](https://www.elinux.org/R-Car/Boards/H3SK)
22 * [Renesas Salvator-X Board](https://www.elinux.org/R-Car/Boards/Salvator-X)
23 * [Renesas Kingfisher Infotainment Board](https://elinux.org/R-Car/Boards/Kingfisher)
24
25 **NOTE:** You can find similar information for the Pro and Premier board kits on the
26 [R-Car/Boards/Yocto-Gen3](https://elinux.org/R-Car/Boards/Yocto-Gen3) page.
27 The information on this page describes setup and build procedures for both these
28 Renesas development kits.
29
30 You can find more information on building images from these resources:
31
32 * [AGL-Devkit-Build-your-1st-AGL-Application.pdf](https://iot.bzh/download/public/2016/sdk/AGL-Devkit-Build-your-1st-AGL-Application.pdf)
33  Generic guide on how to build various application types (HTML5, native, Qt, QML, …) for AGL.
34  This is really about building an application and not the AGL image.
35 * [AGL-Devkit-HowTo_bake_a_service.pdf](https://iot.bzh/download/public/2016/bsp/AGL_Phase2-Devkit-HowTo_bake_a_service.pdf)
36  Generic guide on how to add a new service in the BSP.
37  Goes back to 2015 and uses Yocto 2.x.
38  Includes stuff on building an image but looks like the focus is really the service.
39
40 ## 1. Downloading Proprietary Drivers
41
42 Before setting up the build environment, you need to download proprietary drivers from the
43 [R-Car H3/M3 Software library and Technical document](https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html)
44 site.
45 This download site supports the Pro and Premier board starter kits.
46
47 **NOTE:** Not sure what you do if you are using the Salvator-X or Kingfisher Infotainment boards.
48
49 Follow these steps to download the drivers you need:
50
51 1. **Determine the Files You Need:**
52
53      Run the ``setup_mm_packages.sh`` script as follows to
54      display the list of ZIP files containing the drivers you need.
55      Following is an example:
56
57      ```bash
58      grep -rn ZIP_.= $AGL_TOP/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
59      ```
60
61      The script's output identifies the files you need to download from the page.
62
63 2. **Get Your Board Support Package (BSP) Version:**
64
65    Be sure to have the correct BSP version of the R-Car Starter Kit
66    based on the version of the AGL software you are using.
67    Use the following table to map the Renesas version to your AGL software:
68
69      | AGL Version| Renesas version |
70      |:-:|:-:|
71      | AGL master  | 3.21.0 |
72      | AGL icefish 9.0.0 9.0.1 9.0.2 | 3.21.0 |
73      | AGL halibut 8.0.2 8.0.3 8.0.4 8.0.5 8.0.6 | 3.21.0 |
74      | AGL halibut 8.0.1 | 3.19.0 |
75      | AGL halibut 8.0.0 | 3.15.0 |
76      | AGL guppy 7.0.4 | 3.21.0 |
77      | AGL guppy 7.0.3 | 3.19.0 |
78      | AGL guppy 7.0.0 7.0.1 7.0.2 | 3.9.0 |
79      | AGL flounder 6.0.3, 6.0.4 6.0.5 | 3.9.0 |
80      | AGL flounder 6.0.0, 6.0.1, 6.0.2 | 3.7.0 |
81      | AGL eel 5.0.x, 5.1.0| 2.23.1 |
82      | AGL dab 4.0.x |2.19.0 |
83
84    **NOTE:**
85    Find the appropriate download links on the
86    [R-Car H3/M3 Software library and Technical document](https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html)
87    site.
88    The file pairs are grouped according to the Yocto Project version you are
89    using with the AGL software.
90
91 3. **Download the Files:**
92
93    Start the download process by clicking the download link.
94    If you do not have an account with Renesas, you will be asked to register a free account.
95    You must register and follow the "Click Through" licensing process
96    in order to download these proprietary files.
97
98    If needed, follow the instructions to create the free account by providing the required
99    account information.
100    Once the account is registered and you are logged in, you can download the files.
101
102    **NOTE:**
103    You might have to re-access the
104    [original page](https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html)
105    that contains the download links you need after creating the account and logging in.
106
107 4. **Create an Environment Variable to Point to Your Download Area:**
108
109    Create and export an environment variable named `XDG_DOWNLOAD_DIR` that points to
110    your download directory.
111    Here is an example:
112
113    ```bash
114    export XDG_DOWNLOAD_DIR=$HOME/Downloads
115    ```
116
117 5. **Be Sure the Files Have Rights:**
118
119    Be sure you have the necessary rights for the files you downloaded.
120    You can use the following command:
121
122    ```bash
123    chmod a+r $XDG_DOWNLOAD_DIR/*.zip
124    ```
125
126 6. **Check to be Sure the Files are Downloaded and Have the Correct Rights:**
127
128    Do a quick listing of the files to ensure they are in the download directory and
129    they have the correct access rights.
130    Here is an example:
131
132    ```bash
133    $ ls -l $XDG_DOWNLOAD_DIR/*.zip
134    -rw-r--r-- 1 iot bzh 5431245 sept. 16 21:07 R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190802.zip
135    -rw-r--r-- 1 iot bzh 3442158 sept. 16 21:07 R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20190802.zip
136    ```
137
138 ## 2. Getting More Software
139
140 1. **Get the `bmaptool`:**
141
142    Download this tool from the
143    [bmap-tools](https://build.opensuse.org/package/show/isv:LinuxAutomotive:AGL_Master/bmap-tools)
144    repository.
145    The site has pre-built packages (DEB or RPM) for the supported host
146    operating systems.
147
148 ## 3. Getting Your Hardware Together
149
150    Gather together this list of hardware items, which is not exhaustive.
151    Having these items ahead of time saves you from having to try and
152    collect hardware during development:
153
154 Supported Starter
155
156 * Kit Gen3 board with its 5V power supply.
157 * Micro USB-A cable for serial console.
158     This cable is optional if you are using Ethernet and an SSH connection.
159 * USB 2.0 Hub.  The hub is optional but makes it easy to connect multiple USB devices.
160 * Ethernet cable.  The cable is optional if you are using a serial console.
161 * HDMI type D (Micro connector) cable and an associated display.
162 * 4 Gbyte minimum MicroSD Card.  It is recommended that you use a class 10 type.
163 * USB touch screen device such as the GeChic 1502i/1503i.  A touch screen device is optional.
164
165    **NOTE:** The Salvator-X Board has NDA restrictions.
166    Consequently, less documentation is available for this board both here and across the
167    Internet.
168
169 ## 4. Making Sure Your Build Environment is Correct
170
171    The
172    "[Initializing Your Build Environment](../image-workflow-initialize-build-environment.html#Initializing-your-build-environment)"
173    section presented generic information for setting up your build environment
174    using the `aglsetup.sh` script.
175    If you are building an image for a supported Renesas board,
176    you need to take steps to make sure your build host is set up correctly.
177
178 1. **Define Your Board:**
179
180    Depending on your Renesas board, define and export a `MACHINE` variable as follows:
181
182    | Board| `MACHINE` Setting |
183    |:-:|:-:|
184    | Starter Kit Pro/M3  | `MACHINE`=m3ulcb |
185    | Starter Kit Premier/H3  | `MACHINE`=h3ulcb |
186    | Salvator-X  | `MACHINE`=h3-salvator-x |
187
188    For example, the following command defines and exports the `MACHINE` variable
189    for the Starter Kit Pro/M3 Board:
190
191    ```bash
192    export MACHINE=m3ulcb
193    ```
194
195 2. **Run the `aglsetup.sh` Script:**
196
197    Use the following commands to run the AGL Setup script:
198
199    ```bash
200    cd $AGL_TOP
201    source meta-agl/scripts/aglsetup.sh -m $MACHINE -b build agl-devel agl-demo agl-netboot agl-appfw-smack agl-localdev
202    ```
203
204    **NOTE:**
205    Running the `aglsetup.sh` script automatically places you in the
206    working directory (i.e. `$AGL_TOP/build`).
207    You can change this default behavior by adding the "-f" option to the
208    script's command line.
209
210    In the previous command, the "-m" option sets your machine to the previously
211    defined `MACHINE` variable.
212    The "-b" option defines your Build Directory, which is the
213    default `$AGL_TOP/build`.
214    Finally, the AGL features are provided to support building the AGL Demo image
215    for the Renesas board.
216
217    You can learn more about the AGL Features in the
218    "[Initializing Your Build Environment](../image-workflow-initialize-build-environment.html)"
219    section.
220
221 3. **Examine the Script's Log:**
222
223    Running the `aglsetup.sh` script creates the `setup.log` file, which is in
224    the `build/conf` folder.
225    You can examine this log to see the results of the script.
226    For example, suppose the graphics drivers were missing or could not be extracted
227    when you ran the script.
228
229 <details>
230   <summary> In case of missing graphics drivers, you could notice an error message
231    similar to the following:</summary>
232   <pre>
233     <code>
234 [snip]
235 --- fragment /home/working/workspace_agl_master/meta-agl/templates/machine/h3ulcb/50_setup.sh
236 /home/working/workspace_agl_master /home/working/workspace_agl_master/build_gen3
237 The graphics and multimedia acceleration packages for
238 the R-Car Gen3 board can be downloaded from:
239 https://www.renesas.com/en-us/solutions/automotive/rcar-demoboard-2.html
240
241 These 2 files from there should be store in your'/home/devel/Downloads' directory.
242   R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190802.zip
243   R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20190802.zip
244 /home/working/workspace_agl_master/build_gen3
245 --- fragment /home/working/workspace_agl_master/meta-agl/templates/base/99_setup_EULAconf.sh
246 --- end of setup script
247 OK
248 Generating setup file: /home/working/workspace_agl_master/build_gen3/agl-init-build-env ... OK
249 ------------ aglsetup.sh: Done
250 [snip]
251     </code>
252   </pre>
253 </details>
254
255    If you encounter this issue, or any other unwanted behavior, you can fix the error
256    mentioned, remove the `$AGL_TOP/build` directory, and then re-launch the
257    `aglsetup.sh` again.
258
259 <details>
260   <summary>Here is another example that indicates the driver files could not be extracted from the downloads directory:</summary>
261   <pre>
262     <code>
263 [snip]
264
265 ~/workspace_agl/build/conf $ cat setup.log
266 --- beginning of setup script
267 --- fragment /home/iotbzh/workspace_agl/meta-agl/templates/base/01_setup_EULAfunc.sh
268 --- fragment /home/iotbzh/workspace_agl/meta-agl/templates/machine/m3ulcb/50_setup.sh
269 ~/workspace_agl ~/workspace_agl/build
270 ERROR: FILES "+/home/iotbzh/Downloads/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190802.zip+" NOT EXTRACTING CORRECTLY
271 ERROR: FILES "+/home/iotbzh/Downloads/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20190802.zip+" NOT EXTRACTING CORRECTLY
272 The graphics and multimedia acceleration packages for
273 the R-Car Gen3 board BSP can be downloaded from:
274 <https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html>
275
276 These 2 files from there should be stored in your
277 '/home/iotbzh/Downloads' directory.
278   R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190802.zip
279   R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20190802.zip
280 ERROR: Script /home/iotbzh/workspace_agl/build/conf/setup.sh failed
281 [snip]
282     </code>
283   </pre>
284 </details>
285
286 ## 5. Checking Your Configuration
287
288 Aside from environment variables and parameters you establish through
289 running the `aglsetup.sh` script, you can ensure your build's configuration
290 is just how you want it by examining the `local.conf` configuration file.
291
292 You can find this configuration file in the Build Directory (e.g.
293 "$TOP_DIR/build/conf/local.conf").
294
295 In general, the defaults along with the configuration fragments the
296 `aglsetup.sh` script applies in the `local.conf` file are good enough.
297 However, you can customize aspects by editing the `local.conf` file.
298 See the
299 "[Customizing Your Build](../image-workflow-cust-build.html)"
300 section for common configurations you might want to consider.
301
302 **NOTE:** For detailed explanations of the configurations you can make
303 in the ``local.conf`` file, consult the
304 [Yocto Project Documentation](https://www.yoctoproject.org/docs/).
305
306 A quick way to see if you have the `$MACHINE` variable set correctly
307 is to use the following command:
308
309 ```bash
310 grep -w -e "^MACHINE =" $AGL_TOP/build/conf/local.conf
311 ```
312
313 Depending on the Renesas board you are using, you should see output
314 as follows:
315
316 ```bash
317   MACHINE = "h3ulcb"
318 ```
319
320 or
321
322 ```bash
323   MACHINE = "m3ulcb"
324 ```
325
326 or
327
328 ```bash
329   MACHINE = "h3-salvator-x"
330 ```
331
332 If you ran the `aglsetup.sh` script as described in the
333 "[Making Sure Your Build Environment is Correct](./renesas.html#4-making-sure-your-build-environment-is-correct)"
334 section earlier, the "agl-devel", "agl-demo", "agl-netboot", "agl-appfw-smack", and
335 "agl-localdev" AGL features will be in effect.
336 These features provide the following:
337
338 * A debugger (gdb)
339 * Some tweaks, including a disabled root password
340 * A SFTP server
341 * The TCF Agent for easier application deployment and remote debugging
342 * Some extra system tools such as USB and bluetooth
343 * Support for the AGL demo platform
344 * Network boot support through TFTP and NBD protocols
345 * [IoT.bzh](https://iot.bzh/en/) Application Framework plus
346   [SMACK](https://en.wikipedia.org/wiki/Smack_(software)) and
347   [Cynara](https://wiki.tizen.org/Security:Cynara)
348 * Support for local development including `localdev.inc` when present
349
350 ## 6. Using BitBake
351
352 This section shows the `bitbake` command used to build the AGL image.
353 Before running BitBake to start your build, it is good to be reminded that AGL
354 does provide pre-built images for developers that work with supported hardware.
355 You can find these pre-built images on the
356 [AGL Download web site](https://download.automotivelinux.org/AGL/release).
357
358 For supported Renesas boards, the filenames have the following form:
359
360 ```bash
361 <release-name>/<release-number>/m3ulcb-nogfx/deploy/images/m3ulcb/Image-m3ulcb.bin
362 ```
363
364 Start the build using the `bitbake` command.
365
366 **NOTE:** An initial build can take many hours depending on your
367 CPU and and Internet connection speeds.
368 The build also takes approximately 100G-bytes of free disk space.
369
370 For this example, the target is "agl-demo-platform":
371
372 ```bash
373   bitbake agl-demo-platform
374 ```
375
376 The build process puts the resulting image in the Build Directory:
377
378 ```bash
379 <build_directory>/tmp/deploy/images/$MACHINE
380 ```
381
382 ## 7. Booting the Image Using a MicroSD Card
383
384 To boot your image on the Renesas board, you need to do three things:
385
386 1. Update all firmware on the board.
387 2. Prepare the MicroSD card to you can boot from it.
388 3. Boot the board.
389
390 **NOTE:** For subsequent builds, you only have to re-write the MicroSD
391 card with a new image.
392
393 ### Updating the Board's Firmware
394
395 Follow these steps to update the firmware:
396
397 1. **Update the Sample Loader and MiniMonitor:**
398
399    You only need to make these updates one time per device.
400
401    Follow the procedure found on the
402    eLinux.org wiki to update to at least version 3.02,
403    which is mandatory to run the AGL image ([R-car loader update](https://elinux.org/R-Car/Boards/Kingfisher#How_to_update_of_Sample_Loader_and_MiniMonitor)).
404
405 2. **Update the Firmware Stack:**
406
407    You only need to update the firmware stack if you are
408    using the Eel or later (5.0) version of AGL software.
409
410    M3 and H3 Renesas board are AArch64 platforms.
411    As such, they have a firmware stack that is divided across: **ARM Trusted Firmware**, **OP-Tee** and **U-Boot**.
412
413    If you are using the Eel (5.0) version or later of the AGL software, you must update
414    the firmware using the **[h3ulcb][R-car h3ulcb firmware update](http://elinux.org/R-Car/Boards/H3SK#Flashing_firmware)**
415    or **[m3ulcb][R-car m3ulcb firmware update](https://elinux.org/R-Car/Boards/M3SK#Flashing_firmware)** links from the
416    [Embedded Linux Wiki](https://www.elinux.org/Main_Page) (i.e. `elinux.org`).
417
418    The table in the wiki lists the files you need to flash the firmware.
419    You can find these files in the following directory:
420
421    ```bash
422    $AGL_TOP/build/tmp/deploy/images/$MACHINE
423    ```
424
425    **NOTE:** The Salvator-X firmware update process is not documented on eLinux.
426
427 ### Preparing the MicroSD Card
428
429 <details>
430   <summary>
431     Plug the MicroSD card into your Build Host.
432     After plugging in the device, use the `dmesg` command as follows to
433     discover the device name:
434   </summary>
435   <pre>
436     <code>
437 $ dmesg | tail -4
438 [ 1971.462160] sd 6:0:0:0: [sdc] Mode Sense: 03 00 00 00
439 [ 1971.462277] sd 6:0:0:0: [sdc] No Caching mode page found
440 [ 1971.462278] sd 6:0:0:0: [sdc] Assuming drive cache: write through
441 [ 1971.463870]  sdc: sdc1 sdc2
442     </code>
443   </pre>
444 </details>
445
446 In the previous example, the MicroSD card is attached to the device `/dev/sdc`.
447
448 <details>
449   <summary>
450     You can also use the `lsblk` command to show all your devices.
451     Here is an example that shows the MicroSD card as `/dev/sdc`:
452   </summary>
453   <pre>
454     <code>
455 $ lsblk
456   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
457   sda      8:0    0 167,7G  0 disk
458   ├─sda1   8:1    0   512M  0 part /boot/efi
459   ├─sda2   8:2    0 159,3G  0 part /
460   └─sda3   8:3    0   7,9G  0 part [SWAP]
461   sdb      8:16   0 931,5G  0 disk
462   └─sdb1   8:17   0 931,5G  0 part /media/storage
463   sdc      8:32   1  14,9G  0 disk
464   ├─sdc1   8:33   1    40M  0 part
465   └─sdc2   8:34   1   788M  0 part
466     </code>
467   </pre>
468 </details>
469
470 **IMPORTANT NOTE:** Before re-writing any device on your Build Host, you need to
471 be sure you are actually writing to the removable MicroSD card and not some other
472 device.
473 Each computer is different and removable devices can change from time to time.
474 Consequently, you should repeat the previous operation with the MicroSD card to
475 confirm the device name every time you write to the card.
476
477 To summarize this example so far, we have the following:
478
479 * The first SATA drive is `/dev/sda`.
480
481 * `/dev/sdc` corresponds to the MicroSD card, and is also marked as a removable device.
482   You can see this in the output of the `lsblk` command where "1" appears in the "RM" column
483   for that device.
484
485 Now that you have identified the device you are going to be writing the image on,
486 you can use the `bmaptool` to copy the image to the MicroSD card.
487
488 Your desktop system might offer a choice to mount the MicroSD automatically
489 in some directory.
490 For this example, assume that the MicroSD card mount directory is stored in the
491 `$SDCARD` variable.
492
493 Following are example commands that write the image to the MicroSD card:
494
495 ```bash
496 cd $AGL_TOP/build/tmp/deploy/images/$MACHINE
497 bmaptool copy ./agl-demo-platform-$MACHINE.wic.xz $SDCARD
498 ```
499
500 Alternatively, you can leave the image in an uncompressed state and write it
501 to the MicroSD card:
502
503 ```bash
504   sudo umount /dev/sdc
505   xzcat ./agl-demo-platform-$MACHINE.wic.xz | sudo dd of=$SDCARD bs=4M
506   sync
507 ```
508
509 ### Booting the Board
510
511 Follow these steps to boot the board:
512
513 1. Use the board's power switch to turn off the board.
514
515 2. Insert the MicroSD card into the board.
516
517 3. Verify that you have plugged in the following:
518
519    * An external monitor into the board's HDMI port
520
521    * An input device (e.g. keyboard, mouse, touchscreen, and so forth) into the board's USB ports.
522
523 4. Use the board's power switch to turn on the board.
524
525 After a few seconds, you will see the AGL splash screen on the display and you
526 will be able to log in at the console's terminal or using the graphic screen.
527
528 ## 8. Setting Up the Serial Console
529
530 Setting up the Serial Console involves the following:
531
532 * Installing a serial client on your build host
533 * Connecting your build host to your Renesas board's serial port
534 * Powering on the board to get a shell at the console
535 * Configuring U-Boot parameters
536 * Logging into the console
537 * Determining the board's IP address
538
539 ### Installing a Serial Client on Your Build Host
540
541 You need to install a serial client on your build host.
542 Some examples are
543 [GNU Screen](https://en.wikipedia.org/wiki/GNU_Screen),
544 [picocom](https://linux.die.net/man/8/picocom),
545 and
546 [Minicom](https://en.wikipedia.org/wiki/Minicom).
547
548 Of these three, "picocom" has less dependencies and is therefore
549 considered the "lightest" solution.
550
551 ### Connecting Your Build Host to Your Renesas Board's Serial Port
552
553 You need to physically connect your build host to the Renesas board using
554 a USB cable from the host to the serial CP2102 USP port (i.e. Micro USB-A port)
555 on the Renesas board.
556
557 <details>
558   <summary>
559     Once you connect the board, determine the device created for the serial link.
560     Use the ``dmesg`` command on your build host.
561     Here is an example:
562   </summary>
563   <pre>
564     <code>
565 dmesg | tail 9
566 [2097783.287091] usb 2-1.5.3: new full-speed USB device number 24 using ehci-pci
567 [2097783.385857] usb 2-1.5.3: New USB device found, idVendor=0403, idProduct=6001
568 [2097783.385862] usb 2-1.5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
569 [2097783.385864] usb 2-1.5.3: Product: FT232R USB UART
570 [2097783.385866] usb 2-1.5.3: Manufacturer: FTDI
571 [2097783.385867] usb 2-1.5.3: SerialNumber: AK04WWCE
572 [2097783.388288] ftdi_sio 2-1.5.3:1.0: FTDI USB Serial Device converter detected
573 [2097783.388330] usb 2-1.5.3: Detected FT232RL
574 [2097783.388658] usb 2-1.5.3: FTDI USB Serial Device converter now attached to ttyUSB0
575     </code>
576   </pre>
577 </details>
578
579 The device created is usually "/dev/ttyUSB0".
580 However, the number might vary depending on other USB serial ports connected to the host.
581
582 To use the link, you need to launch the client.
583 Here are three commands, which vary based on the serial client, that show
584 how to launch the client:
585
586 ```bash
587 picocom -b 115200 /dev/ttyUSB0
588 ```
589
590 or
591
592 ```bash
593 minicom -b 115200 -D /dev/ttyUSB0
594 ```
595
596 or
597
598 ```bash
599 screen /dev/ttyUSB0 115200
600 ```
601
602 ### Powering on the Board to Get a Shell at the Console
603
604 Both the Pro and Premier kits (e.g.
605 [m3ulcb](https://elinux.org/R-Car/Boards/M3SK) and
606 [h3ulcb](https://elinux.org/R-Car/Boards/H3SK#Hardware)) have nine
607 switches (SW1 through SW9).
608 To power on the board, "short-press" SW8, which is the power switch.
609
610 Following, is console output for the power on process for each kit:
611
612 <details>
613   <summary>
614     h3ulcb:
615   </summary>
616   <pre>
617     <code>
618
619 NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.7
620 NOTICE:  BL2: PRR is R-Car H3 ES1.1
621 NOTICE:  BL2: LCM state is CM
622 NOTICE:  BL2: DDR1600(rev.0.15)
623 NOTICE:  BL2: DRAM Split is 4ch
624 NOTICE:  BL2: QoS is Gfx Oriented(rev.0.30)
625 NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x52
626 NOTICE:  BL2: Lossy Decomp areas
627 NOTICE:       Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
628 NOTICE:       Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
629 NOTICE:       Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
630 NOTICE:  BL2: v1.1(release):41099f4
631 NOTICE:  BL2: Built : 19:20:52, Jun  9 2016
632 NOTICE:  BL2: Normal boot
633 NOTICE:  BL2: dst=0xe63150c8 src=0x8180000 len=36(0x24)
634 NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=3072(0xc00)
635 NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
636 NOTICE:  BL2: dst=0x44100000 src=0x8200000 len=524288(0x80000)
637 NOTICE:  BL2: dst=0x49000000 src=0x8640000 len=1048576(0x100000)
638
639
640 U-Boot 2015.04 (Jun 09 2016 - 19:21:52)
641
642 CPU: Renesas Electronics R8A7795 rev 1.1
643 Board: H3ULCB
644 I2C:   ready
645 DRAM:  3.9 GiB
646 MMC:   sh-sdhi: 0, sh-sdhi: 1
647 In:    serial
648 Out:   serial
649 Err:   serial
650 Net:   Board Net Initialization Failed
651 No ethernet found.
652 Hit any key to stop autoboot:  0
653 =>
654     </code>
655   </pre>
656 </details>
657
658 <details>
659   <summary>
660     m3ulcb:
661   </summary>
662   <pre>
663     <code>
664 NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.14
665 NOTICE:  BL2: PRR is R-Car M3 Ver1.0
666 NOTICE:  BL2: Board is Starter Kit Rev1.0
667 NOTICE:  BL2: Boot device is HyperFlash(80MHz)
668 NOTICE:  BL2: LCM state is CM
669 NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x52
670 NOTICE:  BL2: DDR1600(rev.0.22)NOTICE:  [COLD_BOOT]NOTICE:  ..0
671 NOTICE:  BL2: DRAM Split is 2ch
672 NOTICE:  BL2: QoS is default setting(rev.0.17)
673 NOTICE:  BL2: Lossy Decomp areas
674 NOTICE:       Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
675 NOTICE:       Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
676 NOTICE:       Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
677 NOTICE:  BL2: v1.3(release):4eef9a2
678 NOTICE:  BL2: Built : 00:25:19, Aug 25 2017
679 NOTICE:  BL2: Normal boot
680 NOTICE:  BL2: dst=0xe631e188 src=0x8180000 len=512(0x200)
681 NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
682 NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
683 NOTICE:  BL2: dst=0x44100000 src=0x8200000 len=524288(0x80000)
684 NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
685
686
687 U-Boot 2015.04-dirty (Aug 25 2017 - 10:55:49)
688
689 CPU: Renesas Electronics R8A7796 rev 1.0
690 Board: M3ULCB
691 I2C:   ready
692 DRAM:  1.9 GiB
693 MMC:   sh-sdhi: 0, sh-sdhi: 1
694 In:    serial
695 Out:   serial
696 Err:   serial
697 Net:   ravb
698 Hit any key to stop autoboot:  0
699 =>
700     </code>
701   </pre>
702 </details>
703
704 ## 9. Setting-up U-boot
705
706 ### Configuring U-Boot Parameters
707
708 Follow these steps to configure the board to use the MicroSD card as the
709 boot device and also to set the screen resolution:
710
711 <ol>
712   <li>As the board is powering up, press any key to stop the autoboot process.
713    You need to press a key quickly as you have just a few seconds in which to
714    press a key.
715   </li>
716
717   <li>Once the autoboot process is interrupted, use the board's serial console to
718    enter <b>printenv</b> to check if you have correct parameters for booting your board:
719 <details>
720   <summary>
721     Here is an example using the <b>h3ulcb</b> board:
722   </summary>
723   <pre>
724     <code>
725
726 => printenv
727 baudrate=115200
728 bootargs=console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4
729 bootcmd=run load_ker; run load_dtb; booti 0x48080000 - 0x48000000
730 bootdelay=3
731 fdt_high=0xffffffffffffffff
732 initrd_high=0xffffffffffffffff
733 load_dtb=ext4load mmc 0:1 0x48000000 /boot/r8a7795-h3ulcb.dtb
734 load_ker=ext4load mmc 0:1 0x48080000 /boot/Image
735 stderr=serial
736 stdin=serial
737 stdout=serial
738 ver=U-Boot 2015.04 (Jun 09 2016 - 19:21:52)
739
740 Environment size: 648/131068 bytes
741     </code>
742   </pre>
743 </details>
744 <details>
745   <summary>
746     Here is a second example using the <b>m3ulcb</b> board:
747   </summary>
748   <pre>
749     <code>
750 => printenv
751 baudrate=115200
752 bootargs=console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4
753 bootcmd=run load_ker; run load_dtb; booti 0x48080000 - 0x48000000
754 bootdelay=3
755 fdt_high=0xffffffffffffffff
756 filesize=cdeb
757 initrd_high=0xffffffffffffffff
758 load_dtb=ext4load mmc 0:1 0x48000000 /boot/r8a7796-m3ulcb.dtb
759 load_ker=ext4load mmc 0:1 0x48080000 /boot/Image
760 stderr=serial
761 stdin=serial
762 stdout=serial
763 ver=U-Boot 2015.04 (Nov 30 2016 - 18:25:18)
764
765 Environment size: 557/131068 bytes
766     </code>
767   </pre>
768 </details>
769   </li>
770
771   <li>To boot your board using the MicroSD card, be sure your environment is set up
772    as follows:
773
774   <pre>
775     <code>
776     setenv bootargs console=ttySC0,115200 ignore_loglevel vmalloc=384M video=HDMI-A-1:1920x1080-32@60 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait rootdelay=2
777     setenv bootcmd run load_ker\; run load_dtb\; booti 0x48080000 - 0x48000000
778     setenv load_ker ext4load mmc 0:1 0x48080000 /boot/Image
779     </code>
780   </pre>
781   </li>
782
783   <li>Depending on the board type, the BSP version, and the existence of
784    a Kingfisher board, make sure your ``load_dtb`` is set as follows:<br>
785
786   <b>h3ulcb with BSP version greater than or equal to 2.19</b>:
787
788   <pre>
789     <code>
790     setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/r8a7795-es1-h3ulcb.dtb
791     </code>
792   </pre>
793
794   <b>h3ulcb with BSP version less than 2.19</b>:
795
796   <pre>
797     <code>
798     setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/r8a7795-h3ulcb.dtb
799     </code>
800   </pre>
801
802   <b>m3ulcb</b>:
803   <pre>
804     <code>
805     setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/r8a7796-m3ulcb.dtb
806     </code>
807   </pre>
808
809   <b>m3ulcb with a Kingfisher board</b>:
810   <pre>
811     <code>
812     setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/r8a7796-m3ulcb-kf.dtb
813     </code>
814   </pre>
815
816   <b>h3ulcb with a Kingfisher board</b>:
817   <pre>
818     <code>
819     setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/r8a7795-es1-h3ulcb-kf.dtb
820     </code>
821   </pre>
822   </li>
823
824   <li>Save the boot environment:<br>
825     <code>
826       saveenv
827     </code>
828   </li>
829
830   <li>Boot the board:<br>
831   <code>
832     run bootcmd
833   </code>
834   </li>
835 </ol>
836
837 ## 10. Troubleshooting
838
839 ### Logging Into the Console
840
841 Once the board boots, you should see the
842 [Wayland display](https://en.wikipedia.org/wiki/Wayland_(display_server_protocol))
843 on the external monitor.
844 A login prompt should appear as follows depending on your board:
845
846 **h3ulcb**:
847
848 ```bash
849 Automotive Grade Linux ${AGL_VERSION} h3ulcb ttySC0
850
851 h3ulcb login: root
852 ```
853
854 **m3ulcb**:
855
856 ```bash
857 Automotive Grade Linux ${AGL_VERSION} m3ulcb ttySC0
858
859 m3ulcb login: root
860 ```
861
862 At the prompt, login by using `root` as the login.
863 The password is "empty" so you should not be prompted for the password.
864
865 ### Determining the Board's IP Address
866
867 If your board is connected to a local network using Ethernet and
868 if a DHCP server is able to distribute IP addresses,
869 you can determine the board's IP address and log in using `ssh`.
870
871 <details>
872   <summary>
873     Here is an example for the m3ulcb board:
874   </summary>
875   <pre>
876     <code>
877   m3ulcb login: root
878   Last login: Tue Dec  6 09:55:15 UTC 2016 on tty2
879   root@m3ulcb:~# ip -4 a
880   1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
881       inet 127.0.0.1/8 scope host lo
882         valid_lft forever preferred_lft forever
883   3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
884       inet 10.0.0.27/24 brd 10.0.0.255 scope global eth0
885         valid_lft forever preferred_lft forever
886   root@m3ulcb:~#
887     </code>
888   </pre>
889 </details>
890
891 <details>
892   <summary>
893     In the previous example, IP address is 10.0.0.27.
894     Once you know the address, you can use `ssh` to login.
895     Following is an example that shows logging into SSH and then
896     displaying the contents of the `/etc/os-release` file:
897   </summary>
898   <pre>
899     <code>
900   $ ssh root@10.0.0.27
901   Last login: Tue Dec  6 10:01:11 2016 from 10.0.0.13
902   root@m3ulcb:~# cat /etc/os-release
903   ID="poky-agl"
904   NAME="Automotive Grade Linux"
905   VERSION="3.0.0+snapshot-20161202 (chinook)"
906   VERSION_ID="3.0.0-snapshot-20161202"
907   PRETTY_NAME="Automotive Grade Linux 3.0.0+snapshot-20161202 (chinook)"
908     </code>
909   </pre>
910 </details>
911
912 **NOTE:** More generics troubleshooting can be found here : [Generic issues](../troubleshooting.html)