Difference between revisions of "R-Car/Boards/Kingfisher/Yocto-Gen3/v4.1.0"

From eLinux.org
Jump to: navigation, search
(Support list)
Line 290: Line 290:
 
| CAN || ok
 
| CAN || ok
 
|-
 
|-
| LVDS Camera(CN10/CN11) || NT
+
| LVDS Camera(CN10/CN11) || ok
 
|-
 
|-
 
| CMOS Camera || NT
 
| CMOS Camera || NT

Revision as of 17:56, 20 October 2020


Introduction

This page contains information on building and running Yocto on:

Note Note: This version does not support Wayland/weston and Multimedia Packages.

Topic

Kingfisher Board Stock Information

  • Global Disty(Shimafuji) : Available
  • Japan Disty (Marutsu) : Available
    • Click here for detail

    New Camera Support

  • Yocto v3.21.0 supports the new Entron S001A190CM0A camera.
    • Please refer to FAQ for how to purchase.

    SW Release Information

    Board name SW name Release date Note
    R-Car Starter Kit ( Premier / Pro ) Yocto v4.1.0 2020/08/06 This version does not support MMP.
    GFX(except for Wayland/weston) is supported from 2020/09/23.
    Yocto v3.21.0 2019/07/09 New R-Car Starter Kit Pro(RTP8J77961ASKB0SK0SA05A) is supported from 2020/07/10.
    Kingfisher Infotainment Board Android P [New!!] 2020/09/29 Only R-Car Starter Kit Premier(R-Car H3) + Kingfisher is supported.
    Yocto v3.21.0 2019/08/07 To check for latest information, please refer to the meta-rcar.
    New R-Car Starter Kit Pro(RTP8J77961ASKB0SK0SA05A) is supported from 2020/08/02.
    Yocto v4.1.0 2020/10/23 This version does not support MMP.

    [Note]:
    The URL for downloading "Multimedia and Graphics library and related Linux drivers" has changed.
    [OLD] https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard.html
    [NEW] https://www.renesas.com/us/en/application/automotive/r-car-h3-m3-h2-m2-e2-documents-software

    Currently, when you download the package from the following site, the file name is automatically changed.
    https://www.renesas.com/us/en/application/automotive/r-car-h3-m3-h2-m2-e2-documents-software
    See the "Required packages" chapter on each page.



    Yocto versions

    Poky-3.0.2 is supported with Yocto v4.1.0.
    Specific commit of meta-openembedded is required.

    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 package from Renesas.
      To download Graphics library and related Linux drivers, please use the following link:
      Download two files:
      • R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20200910.zip
      • R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20200910.zip
    2. Install required packages
      Ubuntu and Debian
      sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
           build-essential chrpath socat libsdl1.2-dev xterm python-crypto cpio python python3 \
           python3-pip python3-pexpect xz-utils debianutils iputils-ping libssl-dev
      
      Fedora
      sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
           diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
           ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \
           SDL-devel xterm python-crypto cpio python python3 python3-pip python3-pexpect \
           ghc-lzma-conduit iputils openssl
      
      Refer to Yocto Project Quick Start for more information.

    Building the BSP for Kingfisher

    Build using script

    1. Directory Structure
      |--build.sh
      `--proprietary
         |--R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20200910.zip
         `--R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20200910.zip
      
    2. Build script(build.sh)
      #!/bin/bash
      
      BOARD_LIST=("h3ulcb" "m3ulcb")
      TARGET_BOARD=$1
      PROPRIETARY_DIR=`pwd`/proprietary
      WORK=`pwd`/${TARGET_BOARD}
      
      Usage () {
          echo "Usage: $0 \${TARGET_BOARD_NAME}"
          echo "BOARD_NAME list: "
          for i in ${BOARD_LIST[@]}; do echo "  - $i"; done
          exit
      }
      
      # Check Param.
      if ! `IFS=$'\n'; echo "${BOARD_LIST[*]}" | grep -qx "${TARGET_BOARD}"`; then
          Usage
      fi
      
      # Create a directory and switch to it
      mkdir -p ${WORK}
      cd ${WORK}
      
      # Clone basic Yocto layers in parallel
      git clone git://git.yoctoproject.org/poky &
      git clone git://git.openembedded.org/meta-openembedded &
      git clone git://github.com/renesas-rcar/meta-renesas &
      git clone git://github.com/CogentEmbedded/meta-rcar.git &
      
      # Wait for all clone operations
      wait
      
      # Switch to proper branches/commits
      cd ${WORK}/poky
      git checkout -b tmp 5e1f52edb7a9f790fb6cb5d96502f3690267c1b1
      cd ${WORK}/meta-openembedded
      git checkout -b tmp 9e60d30669a2ad0598e9abf0cd15ee06b523986b
      cd ${WORK}/meta-renesas
      git checkout -b tmp f6ccae7cfb669937aac221ff5cb6a13b36eff951
      cd $WORK/meta-rcar
      git checkout -b v4.1.0 remotes/origin/v4.1.0
      
      # Populate meta-renesas with proprietary software packages
      cd ${WORK}/../proprietary
      unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20200910.zip
      unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20200910.zip
      cd ${WORK}/meta-renesas
      sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f ${WORK}/../proprietary
      
      cd ${WORK}
      source poky/oe-init-build-env ${WORK}/build
      
      #cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/bsp/*.conf ./conf/
      cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/gfx-only/*.conf ./conf/
      #cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/mmp/*.conf ./conf/
      
      cd ${WORK}/build
      cp conf/local-wayland.conf conf/local.conf
      
      bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
      bitbake core-image-weston
      
    3. build
      ./build.sh <target_board_name>
      
      If the build completes successfully, all the necessary files are generated in a following directory:
      ./<target_board_name>/build/tmp/deploy/images/<target_board_name>
      

    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.
      mkdir build
      cd build
      export WORK=`pwd`
      
    2. Clone basic Yocto layers:
      cd $WORK
      git clone git://git.yoctoproject.org/poky
      git clone git://git.openembedded.org/meta-openembedded
      git clone git://github.com/renesas-rcar/meta-renesas
      git clone git://github.com/CogentEmbedded/meta-rcar.git
      
    3. Switch to proper branches/commits
      cd $WORK/poky
      git checkout -b tmp 5e1f52edb7a9f790fb6cb5d96502f3690267c1b1
      cd $WORK/meta-openembedded
      git checkout -b tmp 9e60d30669a2ad0598e9abf0cd15ee06b523986b
      cd $WORK/meta-renesas
      git checkout -b tmp f6ccae7cfb669937aac221ff5cb6a13b36eff951
      cd $WORK/meta-rcar
      git checkout -b v4.1.0 remotes/origin/v4.1.0
      
      Another versions are not tested for compatibility.
      Legacy BSP instruction can be found here R-Car Kingfisher Yocto Gen3 legacy
    4. Download proprietary driver modules to $WORK/proprietary folder
      You should see the following files:
      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20200910.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20200910.zip
      
    5. Populate meta-renesas with proprietary software packages.
      export PKGS_DIR=$WORK/proprietary
      cd $PKGS_DIR
      unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20200910.zip
      unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20200910.zip
      cd $WORK/meta-renesas
      sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f $PKGS_DIR
      unset PKGS_DIR
      
    6. Setup build environment
      cd $WORK
      source poky/oe-init-build-env $WORK/build
      
    7. Prepare default configuration files.
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<h3ulcb|m3ulcb>/poky-gcc/gfx-only/*.conf ./conf/
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      
      NOTE: extra configuration examples are available in the following directory:
      $WORK/meta-rcar/meta-rcar-gen3-adas/docs/sample/conf/
      
    8. Add layer meta-rcar
      bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
      
    9. Start the build
      bitbake core-image-weston
      
    10. 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:
      NOTE: Tasks Summary: Attempted 4704 tasks of which 31 didn't need to be rerun and all succeeded.
      
      and the command prompt should return.
    11. Bitbake has generated all the necessary files in ./tmp/deploy/images directory.
      You can verify its content:
      $ ls -1 `find ./tmp/deploy/images/h3ulcb/ -maxdepth 1 -type l -print`
      ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.ext4
      ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.manifest
      ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.tar.bz2
      ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.tar.gz
      ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.testdata.json
      ./tmp/deploy/images/h3ulcb/Image
      ./tmp/deploy/images/h3ulcb/Image-h3ulcb.bin
      ./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
      ./tmp/deploy/images/h3ulcb/r8a7795-es1-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-es1-h3ulcb-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-es1-h3ulcb-kf.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-es1-h3ulcb-kf-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-4x2g.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-4x2g-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-4x2g-kf.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-4x2g-kf-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-kf.dtb
      ./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-kf-h3ulcb.dtb
      ./tmp/deploy/images/h3ulcb/u-boot.bin
      ./tmp/deploy/images/h3ulcb/u-boot.bin-r8a7795_h3ulcb
      ./tmp/deploy/images/h3ulcb/u-boot.bin-r8a7795_h3ulcb-4x2g
      ./tmp/deploy/images/h3ulcb/u-boot-elf-h3ulcb-4x2g.srec
      ./tmp/deploy/images/h3ulcb/u-boot-elf-h3ulcb.srec
      ./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin
      ./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin-r8a7795_h3ulcb
      ./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin-r8a7795_h3ulcb-4x2g
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn10-gmsl2.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn10-gmsl2-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn10-pca.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn10-pca-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn11.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn11-gmsl2.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn11-gmsl2-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn11-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn11-pca.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-cn11-pca-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-most.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-most-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-panel-koe-tx31d200vm0baa-1280x480.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-panel-koe-tx31d200vm0baa-1280x480-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-panel-mitsubishi-aa104xd12-1024x768.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-panel-mitsubishi-aa104xd12-1024x768-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-panel-mitsubishi-aa121td01-1280x800.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-panel-mitsubishi-aa121td01-1280x800-h3ulcb.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-sd3.dtbo
      ./tmp/deploy/images/h3ulcb/ulcb-kf-sd3-h3ulcb.dtbo
      
      Image is a Kernel image, *.dtb is a blob file, core-image-<image_type>-<board_name>.tar.bz2 is the rootfs, modules-<board_name>.tgz are kernel modules.
    12. 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.) r8a7795-h3ulcb-kf.dtb
    If you want to know the combinatation of the board and dtb file, please refer to here.

    S/W support status

    Support list

    Functions Status
    WiFi ok
    Bluetooth ok
    Gyro ok
    GPS ok
    CAN ok
    LVDS Camera(CN10/CN11) ok
    CMOS Camera NT
    Raspberry Pi camera Rev 1.3 NT
    Raspberry Pi camera Rev 2 NT
    USB2.0(CN13) Host NT
    USB2.0(CN13) Func(g_mass_storage) NT
    USB3.0(CN2) Host NT
    Multichannel Audio ok
    HDMI Out ok
    LVDS Out ok
    Serial(CN4) ok
    Mini PCIe NT
    M.2 ok
    MOST NT

    Note:

    "ok" - Function succeeded in the simple test as below.
    "NT" - Function wasn't tested

    How to test some capabilities

    T.B.D

    Q&A site

    http://renesasrulz.com/r-car-h3-m3-cockpit/

    FAQ page

    https://elinux.org/R-Car/Boards/Yocto-Gen3-CommonFAQ

    FAQ

    Failed to DRAM initialize (-1).

    If you face the following error please update(*) IPL and u-boot to the latest version.

    NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.12
    NOTICE:  BL2: PRR is R-Car M3 ES1.0
    NOTICE:  BL2: Boot device is HyperFlash(80MHz)
    NOTICE:  BL2: LCM state is CM
    NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x52
    NOTICE:  BL2: DDR3200(rev.0.20)[COLD_BOOT]..1
    NOTICE:  BL2: Failed to DRAM initialize (-1).
    ERROR:   
    ERROR:   BL2: System WDT overflow, occurred address is 0xe630d3cc
    

    (*)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#How_to_get_the_SA001_Camera.

    Known issues and limitations

    1. Refer to R-Car/Boards/Kingfisher#Known_Issues.