R-Car/Boards/Kingfisher/Yocto-Gen3/v3.21.0

Introduction
This page contains information on building and running Yocto on: See also:
 * Infotainment Carrier Board For R-Car Starter Kit(Kingfisher)
 * Latest version R-Car/Boards/Kingfisher/Yocto-Gen3
 * Stable version R-Car/Boards/Kingfisher/Yocto-Gen3-stable

Host PC
Ubuntu 16.04 LTS (64bit) is recommended as OS. 32bit version is not supported.

Required packages

 * 1) Download evaluation version of proprietary graphics and multimedia drivers from Renesas.
 * To download Multimedia and Graphics library and related Linux drivers, please use the following link:
 * https://www.renesas.com/us/en/application/automotive/r-car-h3-m3-h2-m2-e2-documents-software
 * Download two files:
 * R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20190722.zip
 * R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20190722.zip
 * Graphic drivers are required for Wayland. Multimedia drivers are optional.
 * 1) Install required packages
 * Ubuntu and Debian
 * Fedora
 * Refer to Yocto Project Quick Start for more information.
 * Fedora
 * Refer to Yocto Project Quick Start for more information.
 * Refer to Yocto Project Quick Start for more information.

Build using script
This example is for Kingfisher with H3ULCB board. If you use other board, you need to modify the script.
 * 1) Directory Structure
 * 2) Build script(build.sh)
 * 3) build
 * If the build completes successfully, all the necessary files are generated in a following directory:
 * 1) build
 * If the build completes successfully, all the necessary files are generated in a following directory:
 * If the build completes successfully, all the necessary files are generated in a following directory:

Build using manual steps

 * 1) Create a directory and switch to it
 * Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
 * 1) Clone basic Yocto layers:
 * 2) Switch to proper branches/commits (2021/07/15 updated)
 * Another versions are not tested for compatibility.
 * Legacy BSP instruction can be found here R-Car Kingfisher Yocto Gen3 legacy
 * 1) Download proprietary driver modules to $WORK/proprietary folder
 * You should see the following files:
 * 1) Populate meta-renesas with proprietary software packages.
 * 2) Setup build environment
 * 3) Prepare default configuration files.
 * NOTE: extra configuration examples are available in the following directory:
 * 1) (Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support)
 * 2) Edit local.conf with evaluation packages requirements:
 * 3) Add layer meta-rcar
 * 4) Start the build
 * 5) Building image can take up to a few hours depending on your host system performance. After the build has been completed successfully, you should see the output similar to:
 * and the command prompt should return.
 * 1) Bitbake has generated all the necessary files in ./tmp/deploy/images directory. You can verify its content:
 * Image is a Kernel image, *.dtb is a blob file, core-image-weston-m3ulcb.tar.bz2 is the rootfs, modules-m3ulcb.tgz are kernel modules.
 * 1) You can now proceed with running Yocto images
 * 1) Edit local.conf with evaluation packages requirements:
 * 2) Add layer meta-rcar
 * 3) Start the build
 * 4) Building image can take up to a few hours depending on your host system performance. After the build has been completed successfully, you should see the output similar to:
 * and the command prompt should return.
 * 1) Bitbake has generated all the necessary files in ./tmp/deploy/images directory. You can verify its content:
 * Image is a Kernel image, *.dtb is a blob file, core-image-weston-m3ulcb.tar.bz2 is the rootfs, modules-m3ulcb.tgz are kernel modules.
 * 1) You can now proceed with running Yocto images
 * and the command prompt should return.
 * 1) Bitbake has generated all the necessary files in ./tmp/deploy/images directory. You can verify its content:
 * Image is a Kernel image, *.dtb is a blob file, core-image-weston-m3ulcb.tar.bz2 is the rootfs, modules-m3ulcb.tgz are kernel modules.
 * 1) You can now proceed with running Yocto images
 * 1) You can now proceed with running Yocto images

Build with MOST
MOST and GPS share the same R-Car SoC pins and GPS is used by default. In order to use MOST one need to perform h/w modifications on KF board:

Build with SD3 (CN47)
SD3 and WIFI share the same R-Car SoC resource and WIFI is used by default. In order to use SD on CN47 instead WIFI add following option to local.conf:

Build with LVDS panel(CN49)
Yocto v3.13.0 or later supports the following LVDS panels. How to select:
 * Add following option to local.conf:

Build with CN11
CN11 is available on kigfisher board + R-Car Starter Kit Premier(H3) only. CN11 and CN29/48(CMOS/CSI) share the same R-Car SoC pins and CN29/CN48 is used by default. In order to use CN11 instead CN29/48(CMOS/CSI), add following option to local.conf:

Build SDK
Refer to Build SDK on the Yocto-Gen3 page.

Running Yocto images
Refer to Running Yocto images on the Yocto-Gen3 page. [NOTE]
 * DTB filename for Kingfisher contains suffix "-kf".
 * Ex.) r8a7795-h3ulcb-kf.dtb
 * If you want to know the combinatation of the board and dtb file, please refer to here.

Support list
Note:
 * "ok" - Function succeeded in the simple test as below.
 * "NT" - Function wasn't tested

WiFi
To check wifi and scan available WAPs run:

Bluetooth
Ex 1)To check bluetooth and scan available BT devices run:

Ex 2)BT-Audio Please play music on target device.

CAN
Ex) loop back
 * Connect the following pins of CN17 and CN18:
 * KF_CAN.jpg
 * KF_CAN.jpg

Serial
Ex) loop back
 * For KF M03: Connect the following pins on CN4:
 * For KF M04 or later: Connect the following pins on CN4:
 * For KF M04 or later: Connect the following pins on CN4:

LVDS Camera

 * 
 * Camera board: GMSL02
 * Camera: IMI RDACM21-01 <-- This may be out of stock
 * Camera: Leopard Imaging LI-OV10635-GMSL
 * Camera: Entron S001A190CM0A (How to get : R-Car/Boards/Kingfisher)
 * 
 * Camera board: FPDL01
 * Camera: IMI RDACM24-01 <-- This may be out of stock

[Note]
 * H3 can use CN10 and CN11
 * M3 can use CN10

Ex1) Ex2) Ex3) 2 cameras
 * When you use a Leopard Imaging camera, add some parameters to bootargs.
 * 1) RDACM21-01/RDACM24-1
 * 2) LI-OV10635-GMSL
 * 3) S001A190CM0A
 * 1) S001A190CM0A
 * 1) S001A190CM0A

CMOS Camera
Ex)

Raspberry Pi camera Rev 1.3(OV5647) / 2(IMX219)

 * In case of v2(IMX219)
 * Add the following option to local.conf:
 * Ex)
 * Ex)

Multichannel Audio

 * Ex1) CN12/32/33 on KF
 * Ex2)
 * Ex3)
 * Ex3)
 * Ex3)

MOST
Ex)
 * 1) Connect OS81092 board(Physical+ Interface Board OS81092) and CN22 of KF.
 * 2) Connect Audio board(OS81092 Audio Demo Board) and OS819092 board with exclusive cable.
 * 3) Connect Audio board and CN5 of SK with USB cable.
 * 4) Run the linux kernel
 * 5) cd /usr/share/most/
 * 6) ./most_setup.sh
 * 7) ./setup-audio-50 &
 * 8) Push the "Switch" button on the Audio board
 * 9) Push the "Switch" button on the Audio board again
 * 10) Push the "Switch" button on the Audio board again
 * 11) ./most_play.sh ${PATH}/hoge.mp3 5
 * 1) Push the "Switch" button on the Audio board again
 * 2) Push the "Switch" button on the Audio board again
 * 3) ./most_play.sh ${PATH}/hoge.mp3 5
 * 1) ./most_play.sh ${PATH}/hoge.mp3 5
 * 1) ./most_play.sh ${PATH}/hoge.mp3 5

Radio
Ex) FM Radio
 * Connect the antenna to CN42 on Kingfisher boards.
 * If radio module is used for the first time, updating radio module firmware is required.
 * Updating firmware is not required after the second time.
 * Updating firmware is not required after the second time.

M.2
Ex) Transcend TS128GMTE850

mPCI
Ex) Intel 512AN-MMW 2) bitbake 3) How to run

Video Playback (H.264 decoding)
Ex1) Video playback Ex2) Video playback with audio

Failed to DRAM initialize (-1).
If you face the following error please update(*) IPL and u-boot to the latest version. (*)How to update
 * http://elinux.org/R-Car/Boards/Kingfisher#How_to_update_of_Sample_Loader_and_MiniMonitor
 * http://elinux.org/R-Car/Boards/M3SK#Flashing_firmware
 * http://elinux.org/R-Car/Boards/H3SK#Flashing_firmware

How to get the SA001 Camera
Refer to R-Car/Boards/Kingfisher.

Known issues and limitations

 * 1) Refer to R-Car/Boards/Kingfisher.
 * 2) Refer to R-Car/Boards/Yocto-Gen3/.