R-Car/Boards/Kingfisher/Yocto-Gen3/v5.1.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/20.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-20210428.zip
 * R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
 * Graphic drivers are required for Wayland. Multimedia drivers are optional.
 * 1) Install required packages
 * Refer to Yocto Project Quick Start for more information.
 * Refer to Yocto Project Quick Start for more information.
 * Refer to Yocto Project Quick Start for more information.

Using build script

 * 1) Directory Structure
 * 2) Build script(build.sh)
 * 3) build
 * target_board_name is "h3ulcb" or "m3ulcb".
 * If the build completes successfully, all the necessary files are generated in a following directory:
 * target_board_name is "h3ulcb" or "m3ulcb".
 * 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:

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
 * Another versions are not tested for compatibility.
 * Legacy BSP instruction can be found here R-Car Kingfisher Yocto Gen3 legacy
 * 1) Apply patch to update meta-rcar(patch file: [[File:Update-meta-rcar-for-Yv510-20210531.patch.zip]])
 * 2) 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) Add layer meta-rcar
 * 2) Start the build
 * 3) 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--.tar.bz2 is the rootfs, modules-.tgz are kernel modules.
 * 1) You can now proceed with running Yocto images
 * NOTE: extra configuration examples are available in the following directory:
 * 1) Add layer meta-rcar
 * 2) Start the build
 * 3) 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--.tar.bz2 is the rootfs, modules-.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--.tar.bz2 is the rootfs, modules-.tgz are kernel modules.
 * 1) You can now proceed with running Yocto images
 * 1) You can now proceed with running Yocto images

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.) r8a77951-ulcb-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)

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

Ex1) 1 camera $ media-ctl -d /dev/media0 -V "'ov5642 22-003c':0 [fmt:UYVY8_2X8/1280x720 field:none]"
 * When you use a Leopard Imaging camera, add some parameters to bootargs.
 * 1) RDACM21-01


 * 1) LI-OV10635-GMSL


 * 1) S001A190CM0A

Ex2) 4 cameras
 * 1) RDACM21-01 x4

CMOS Camera
Ex)

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

 * Ex) OV5647
 * Ex) Display
 * Ex) Display


 * Ex) IMX219
 * Load "ulcb-kf-imx219.dtbo" file using device tree overlay feature:
 * See FAQ: How to use "Device_Tree_Overlays"
 * Ex) Display
 * Ex) Display

USB 2.0 Function
Ex.) g_mass_storage
 * 1) Enable CONFIG_USB_MASS_STORAGE on linux kernel.
 * Ex.) Using menuconfig:
 * See also: FAQ: How to change kernel config on Yocto
 * 1) Execute command
 * 2) Connect CN13 to HostPC, then mount mass_storage.
 * 1) Connect CN13 to HostPC, then mount mass_storage.
 * 1) Connect CN13 to HostPC, then mount mass_storage.

Multichannel Audio

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

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

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) Set to SW7 to "MOST" side
 * 5) Run the linux kernel
 * 6) Load "ulcb-kf-most.dtbo" file using device tree overlay feature:
 * 7) See FAQ: How to use "Device_Tree_Overlays"
 * 8) cd /usr/share/most/
 * 9) ./most_setup.sh
 * 10) ./setup-audio-50 &
 * 11) Push the "Switch" button on the Audio board
 * 12) Push the "Switch" button on the Audio board again
 * 13) Push the "Switch" button on the Audio board again
 * 14) ./most_play.sh /usr/share/sounds/alsa/Front_Left.wav
 * 1) Push the "Switch" button on the Audio board again
 * 2) Push the "Switch" button on the Audio board again
 * 3) ./most_play.sh /usr/share/sounds/alsa/Front_Left.wav
 * 1) ./most_play.sh /usr/share/sounds/alsa/Front_Left.wav
 * 1) ./most_play.sh /usr/share/sounds/alsa/Front_Left.wav

DTS overlay
Since the meta-rcar supports the DTS overlays then you can test option periferals without recompilation. Ex) => ext4load mmc 0 0x48080000 /boot/Image; ext4load mmc 0 0x48000000 /boot/r8a77951-ulcb-kf.dtb Ex1) test CN11 => ext4load mmc 0 0x48040000 /boot/ulcb-kf-cn11.dtbo Ex2) test SD card(CN47) instead WiFi => ext4load mmc 0 0x48040000 /boot/ulcb-kf-sd3.dtbo Ex3) test Most => ext4load mmc 0 0x48040000 /boot/ulcb-kf-most.dtbo => fdt addr 0x48000000; fdt resize 8192; fdt apply 0x48040000 => booti 0x48080000 - 0x48000000

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/.
 * 3) [Known issue]Cropping and Scaling don't work at the same time.
 * For example, if you run the following, you will get a black screen.