Difference between revisions of "R-Car/Boards/CCPF-SK/Yocto-Gen3/v5.9.0"

From eLinux.org
Jump to: navigation, search
(Introduction: Notification of prebuilt binary)
(Update new version)
Line 14: Line 14:
 
* Prebuilt binary of Yocto BSP v5.9.0 is under preparing.
 
* Prebuilt binary of Yocto BSP v5.9.0 is under preparing.
 
* Currently, previous version(v5.5.0) is available.
 
* Currently, previous version(v5.5.0) is available.
 +
Update info:
 +
* 2022/03/02: Add support Camera device.
  
 
== Topic ==
 
== Topic ==
Line 102: Line 104:
 
* BSP is minimal BSP without GFX/MMP evaluation package.
 
* BSP is minimal BSP without GFX/MMP evaluation package.
  
=== MMP case ===
+
=== Manual steps for building MMP===
==== Using build script ====
+
Note:
# Directory Structure
+
* If you want to use build script, jump to [[{{PAGENAME}}#Using_build_script]]
#: <syntaxhighlight lang="bash">
 
|--build.sh
 
`--proprietary
 
  |--R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
 
  `--R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip
 
</syntaxhighlight>
 
# Build script(build.sh)
 
#: <syntaxhighlight lang="bash">
 
#!/bin/bash
 
  
BOARD_LIST=("h3ulcb" "m3ulcb")
 
TARGET_BOARD=$1
 
PROPRIETARY_DIR=`pwd`/proprietary
 
WORK=`pwd`/${TARGET_BOARD}
 
 
POKY_COMMIT=74b22db6879b388d700f61e08cb3f239cf940d18
 
META_OE_COMMIT=814eec96c2a29172da57a425a3609f8b6fcc6afe
 
META_RENESAS_COMMIT=13fd24957b9acc29a235ee0c7f398fd867f38b47
 
META_RENESAS_CCPF_COMMIT=bc6d5b8008359de0208a6d2f936f8c6d09b208b3
 
 
GFX_MMP_LIB=R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
 
GFX_MMP_DRIVER=R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip
 
 
Usage () {
 
    echo "Usage: $0 \${TARGET_BOARD_NAME}"
 
    echo "BOARD_NAME list: "
 
    for i in ${BOARD_LIST[@]}; do echo "  - $i"; done
 
    echo "BUILD_DIR is $BUILD_TYPE"
 
    exit
 
}
 
 
# Check Param.
 
if ! `IFS=$'\n'; echo "${BOARD_LIST[*]}" | grep -qx "${TARGET_BOARD}"`; then
 
    Usage
 
fi
 
 
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 https://github.com/renesas-rcar/meta-renesas &
 
git clone https://github.com/renesas-rcar/meta-renesas-ccpf &
 
 
# Wait for all clone operations
 
wait
 
 
# Switch to proper branches/commits
 
cd ${WORK}/poky
 
git checkout -b tmp ${POKY_COMMIT}
 
cd ${WORK}/meta-openembedded
 
git checkout -b tmp ${META_OE_COMMIT}
 
cd ${WORK}/meta-renesas
 
git checkout -b tmp ${META_RENESAS_COMMIT}
 
cd ${WORK}/meta-renesas-ccpf
 
git checkout -b tmp ${META_RENESAS_CCPF_COMMIT}
 
 
# Populate meta-renesas with proprietary software packages
 
WORK_PROP_DIR=${WORK}/proprietary
 
mkdir -p ${WORK_PROP_DIR}
 
unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_LIB} -d ${WORK_PROP_DIR}
 
unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_DRIVER} -d ${WORK_PROP_DIR}
 
cd ${WORK}/meta-renesas
 
sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f ${WORK_PROP_DIR}
 
 
cd ${WORK}
 
TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/mmp/ \
 
    source poky/oe-init-build-env ${WORK}/build
 
 
bitbake core-image-weston
 
 
</syntaxhighlight>
 
# build
 
#: <syntaxhighlight lang="bash">
 
./build.sh <target_board_name>
 
</syntaxhighlight>
 
#: {{Note}} target_board_name is "h3ulcb" or "m3ulcb".
 
#: If the build completes successfully, all the necessary files are generated in a following directory:
 
#:: <syntaxhighlight lang="text">
 
./<target_board_name>/build/tmp/deploy/images/<target_board_name>
 
</syntaxhighlight>
 
 
==== Manual steps ====
 
 
# Create a directory and switch to it
 
# 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.
 
#: Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
Line 213: Line 132:
 
git checkout -b tmp 13fd24957b9acc29a235ee0c7f398fd867f38b47
 
git checkout -b tmp 13fd24957b9acc29a235ee0c7f398fd867f38b47
 
cd $WORK/meta-renesas-ccpf
 
cd $WORK/meta-renesas-ccpf
git checkout -b tmp bc6d5b8008359de0208a6d2f936f8c6d09b208b3
+
git checkout -b tmp 09dd815616cce3a2bdcf8906c0d21403df8b93bd
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#: Another versions are not tested for compatibility.
 
#: Another versions are not tested for compatibility.
Line 278: Line 197:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#: '''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.
 
#: '''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.
# You can now proceed with running Yocto images
+
# You can now proceed with [[{{PAGENAME}}#Running_Yocto_images |Running Yocto images]]
  
=== MMP-dist case ===
+
=== Using build script ===
==== build script ====
+
# Directory Structure
 +
#: <syntaxhighlight lang="bash">
 +
|--build.sh
 +
`--proprietary
 +
  |--R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
 +
  `--R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip
 +
</syntaxhighlight>
 
# Build script(build.sh)
 
# Build script(build.sh)
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
Line 289: Line 214:
 
TARGET_BOARD=$1
 
TARGET_BOARD=$1
 
PROPRIETARY_DIR=`pwd`/proprietary
 
PROPRIETARY_DIR=`pwd`/proprietary
WORK=`pwd`/${TARGET_BOARD}
+
WORK=`pwd`/work_Yocto590_ccpfsk
 
 
POKY_COMMIT=74b22db6879b388d700f61e08cb3f239cf940d18
 
META_OE_COMMIT=814eec96c2a29172da57a425a3609f8b6fcc6afe
 
META_RENESAS_COMMIT=13fd24957b9acc29a235ee0c7f398fd867f38b47
 
META_RENESAS_CCPF_COMMIT=bc6d5b8008359de0208a6d2f936f8c6d09b208b3
 
YOCTO_PROJECT_CODENAME="dunfell"
 
META_BROWSER_COMMIT=157c2dcc26304edc2543e5f45e74daf70ef2b7a6 # m92
 
META_CLANG_COMMIT=76c6751d721a4265e01bb71d8dc4fb46dca6602f
 
META_PYTHON2_COMMIT=b901080cf57d9a7f5476ab4d96e56c30db8170a8
 
 
 
 
GFX_MMP_LIB=R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
 
GFX_MMP_LIB=R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
 
GFX_MMP_DRIVER=R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip
 
GFX_MMP_DRIVER=R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip
 +
repolist=( \
 +
    "git://git.yoctoproject.org/poky;74b22db6879b388d700f61e08cb3f239cf940d18" \
 +
    "git://git.openembedded.org/meta-openembedded;814eec96c2a29172da57a425a3609f8b6fcc6afe" \
 +
    "https://github.com/renesas-rcar/meta-renesas;13fd24957b9acc29a235ee0c7f398fd867f38b47" \
 +
    "https://github.com/renesas-rcar/meta-renesas-ccpf;09dd815616cce3a2bdcf8906c0d21403df8b93bd" \
 +
    "https://github.com/yhamamachi/meta-rcar-dev-utils;remotes/origin/v5.9.0"
 +
)
 +
repolist_dist=( \
 +
    "https://github.com/OSSystems/meta-browser;157c2dcc26304edc2543e5f45e74daf70ef2b7a6" \
 +
    "https://github.com/kraj/meta-clang;76c6751d721a4265e01bb71d8dc4fb46dca6602f" \
 +
    "git://git.openembedded.org/meta-python2;b901080cf57d9a7f5476ab4d96e56c30db8170a8" \
 +
)
  
Usage () {
+
_usage () {
     echo "Usage: $0 \${TARGET_BOARD_NAME}"
+
     echo "Usage: $0 \${BOARD_NAME} [build type options] [release package option]"
 
     echo "BOARD_NAME list: "
 
     echo "BOARD_NAME list: "
 
     for i in ${BOARD_LIST[@]}; do echo "  - $i"; done
 
     for i in ${BOARD_LIST[@]}; do echo "  - $i"; done
     echo "BUILD_DIR is $BUILD_TYPE"
+
     echo "build type options:"
 +
    echo "  -d: mmp-dist"
 +
    echo "  -m: mmp(default)"
 +
    echo "  -g: gfx-only"
 +
    echo "  -b: bsp"
 +
    echo "release package options:"
 +
    echo "  -r: Create core-image-xxxxx-release"
 
     exit
 
     exit
 
}
 
}
  
# Check Param.
+
repo_clone () {
if ! `IFS=$'\n'; echo "${BOARD_LIST[*]}" | grep -qx "${TARGET_BOARD}"`; then
+
    mkdir -p ${WORK}
     Usage
+
    for repo in ${repolist[@]}; do
fi
+
        URL=$(echo $repo | cut -d';' -f1)
 +
        COMMIT=$(echo $repo | cut -d';' -f2)
 +
        NAME=${URL##*/}
 +
        if [[ ! -d "${WORK}/${NAME}" ]]; then
 +
            git clone ${URL} ${WORK}/${NAME}
 +
        fi
 +
        cd ${WORK}/${NAME}; git checkout -B tmp ${COMMIT}
 +
     done
 +
}
 +
extract_proprietary_package() {
 +
    if [[ "$BUILD_TYPE" == "bsp" ]]; then
 +
        return
 +
    fi
 +
    WORK_PROP_DIR=${WORK}/proprietary
 +
    mkdir -p ${WORK_PROP_DIR}
 +
    unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_LIB} -d ${WORK_PROP_DIR}
 +
    unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_DRIVER} -d ${WORK_PROP_DIR}
 +
    cd ${WORK}/meta-renesas
 +
    sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f ${WORK_PROP_DIR}
 +
}
  
mkdir -p ${WORK}
+
check_target_board () {
cd ${WORK}
+
    if ! `IFS=$'\n'; echo "${BOARD_LIST[*]}" | grep -qx "${TARGET_BOARD}"`; then
 +
        _usage
 +
    fi
 +
}
  
# Clone basic Yocto layers in parallel
+
set_build_type () {
git clone git://git.yoctoproject.org/poky &
+
    BUILD_TARGET=core-image-weston
git clone git://git.openembedded.org/meta-openembedded &
+
    BUILT_DYPE=mmp
git clone https://github.com/renesas-rcar/meta-renesas &
+
    if [[ "$(echo $*' ' | grep ' -m ')" != "" ]]; then
git clone https://github.com/renesas-rcar/meta-renesas-ccpf &
+
        BUILD_TYPE=mmp
git clone git://github.com/OSSystems/meta-browser &
+
    elif [[ "$(echo $*' ' | grep ' -g ')" != "" ]]; then
git clone git://github.com/kraj/meta-clang -b ${YOCTO_PROJECT_CODENAME} &
+
        BUILD_TYPE=gfx-only
git clone git://git.openembedded.org/meta-python2 -b ${YOCTO_PROJECT_CODENAME} &
+
    elif [[ "$(echo $*' ' | grep ' -b ')" != "" ]]; then
 +
        BUILD_TYPE=bsp
 +
        BUILD_TARGET=core-image-minimal
 +
    elif [[ "$(echo $*' ' | grep ' -d ')" != "" ]]; then
 +
        BUILD_TYPE=mmp-dist
 +
        repolist=(${repolist[@]} ${repolist_dist[@]})
 +
    fi
 +
}
  
# Wait for all clone operations
+
build_yocto () {
wait
+
    cd ${WORK}
 +
    BUILD_DIR=${WORK}/build_${TARGET_BOARD}_${BUILD_TYPE}${RELEASE}
 +
    rm -rf ${BUILD_DIR}/conf
 +
    TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/${BUILD_TYPE}/ \
 +
            source poky/oe-init-build-env ${BUILD_DIR}
 +
    echo "DL_DIR = '${DL_DIR:-${WORK}/yocto_dl_dir}'" >> ${BUILD_DIR}/conf/local.conf
 +
    echo "SSTATE_DIR = '${SSTATE_DIR:-${WORK}/yocto_sstate_dir}'" >> ${BUILD_DIR}/conf/local.conf
 +
    echo "${LOCAL_CONF_APPEND}" >> ${BUILD_DIR}/conf/local.conf
 +
    bitbake-layers add-layer ${WORK}/meta-rcar-dev-utils/meta-rcar-gen3
 +
    if [[ "${RELEASE}" != "" ]]; then
 +
        cp -f ${WORK}/meta-rcar-bsp-release/meta-rcar-gen3/docs/sample/site.conf.sample \
 +
            ${BUILD_DIR}/conf/site.conf
 +
        bitbake-layers add-layer ${WORK}/meta-rcar-bsp-release/meta-rcar-gen3
  
# Switch to proper branches/commits
+
        case ${BUILD_TYPE} in
cd ${WORK}/poky
+
            "mmp*") bitbake gles-user-module omx-user-module -c install -f ;;
git checkout -b tmp ${POKY_COMMIT}
+
            "gfx")  bitbake gles-user-module -c install -f ;;
cd ${WORK}/meta-openembedded
+
        esac
git checkout -b tmp ${META_OE_COMMIT}
+
    fi
cd ${WORK}/meta-renesas
+
    bitbake ${BUILD_TARGET}${RELEASE}
git checkout -b tmp ${META_RENESAS_COMMIT}
+
}
cd ${WORK}/meta-renesas-ccpf
 
git checkout -b tmp ${META_RENESAS_CCPF_COMMIT}
 
cd ${WORK}/meta-browser
 
git checkout -B tmp ${META_BROWSER_COMMIT}
 
cd ${WORK}/meta-clang
 
git checkout -B tmp ${META_CLANG_COMMIT}
 
cd ${WORK}/meta-python2
 
git checkout -B tmp ${META_PYTHON2_COMMIT}
 
 
 
# Populate meta-renesas with proprietary software packages
 
WORK_PROP_DIR=${WORK}/proprietary
 
mkdir -p ${WORK_PROP_DIR}
 
unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_LIB} -d ${WORK_PROP_DIR}
 
unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_DRIVER} -d ${WORK_PROP_DIR}
 
cd ${WORK}/meta-renesas
 
sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f ${WORK_PROP_DIR}
 
 
 
cd ${WORK}
 
rm -rf ${WORK}/build/conf
 
TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/mmp-dist/ \
 
    source poky/oe-init-build-env ${WORK}/build
 
  
ulimit -n 8192
+
build_32bit_rom_writer () {
 
+
    cd ${WORK}
bitbake core-image-weston
+
    BUILD_32_DIR=${WORK}/build_32
 
+
    source poky/oe-init-build-env ${BUILD_32_DIR}
### For creating release package which is distributed on eLinux
+
    cp -f ${BUILD_DIR}/conf/* -t ${BUILD_32_DIR}/conf/
#cp -f ${WORK}/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/mmp-dist/site.conf.sample \
+
    echo "MACHINE ??= 'qemuarm'" >> ${BUILD_32_DIR}/conf/local.conf
#    ${WORK}/build/conf/site.conf
+
    echo "DEFAULTTUNE = 'armv7a'" >> ${BUILD_32_DIR}/conf/local.conf
#bitbake core-image-weston-release
+
    bitbake flash-writer renesas-bsp-rom-writer
#cd ${WORK}
+
    cp -rf ${BUILD_32_DIR}/tmp/deploy/images/qemuarm/renesas-bsp-rom-writer_32bit \
#TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/bsp/ \
+
        -t ${BUILD_DIR}/tmp/deploy/release/binary/ipl/
#    source poky/oe-init-build-env ${WORK}/build_32
 
#cp -f ${WORK}/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/mmp-dist/site.conf.sample \
 
#    ${WORK}/build_32/conf/site.conf
 
#echo 'MACHINE ??= "qemuarm"' > ${WORK}/build_32/conf/local.conf
 
#echo 'DEFAULTTUNE = "armv7a"' >> ${WORK}/build_32/conf/local.conf
 
#bitbake flash-writer renesas-bsp-rom-writer
 
#cp -f ${WORK}/build_32/tmp-glibc/deploy/images/qemuarm/AArch32_Flash_writer_SCIF_DUMMY_CERT_E6300400_ULCB.mot \
 
#    ${WORK}/build_32/tmp-glibc/deploy/images/qemuarm/renesas-bsp-rom-writer/starterkit/
 
#cp -rf ${WORK}/build_32/tmp-glibc/deploy/images/qemuarm/renesas-bsp-rom-writer \
 
#    ${WORK}/build/tmp/deploy/release/binary/ipl/renesas-bsp-rom-writer_32bit
 
</syntaxhighlight>
 
<!-- End of MMP-dist case -->
 
 
 
=== BSP case ===
 
==== Build script ====
 
# Build script(build.sh)
 
#: <syntaxhighlight lang="bash">
 
BOARD_LIST=("h3ulcb" "m3ulcb")
 
TARGET_BOARD=$1
 
PROPRIETARY_DIR=`pwd`/proprietary
 
WORK=`pwd`/${TARGET_BOARD}
 
 
 
# 5.9.0
 
POKY_COMMIT=74b22db6879b388d700f61e08cb3f239cf940d18
 
META_OE_COMMIT=814eec96c2a29172da57a425a3609f8b6fcc6afe
 
META_RENESAS_COMMIT=13fd24957b9acc29a235ee0c7f398fd867f38b47
 
META_RENESAS_CCPF_COMMIT=bc6d5b8008359de0208a6d2f936f8c6d09b208b3
 
 
 
Usage () {
 
    echo "Usage: $0 \${TARGET_BOARD_NAME}"
 
    echo "BOARD_NAME list: "
 
    for i in ${BOARD_LIST[@]}; do echo "  - $i"; done
 
    echo "BUILD_DIR is $BUILD_TYPE"
 
    exit
 
 
}
 
}
  
# Check Param.
+
## main process ##
if ! `IFS=$'\n'; echo "${BOARD_LIST[*]}" | grep -qx "${TARGET_BOARD}"`; then
+
RELEASE=""
     Usage
+
check_target_board $@
 +
set_build_type $@
 +
if [[ "$(echo $*' ' | grep ' -r ')" != "" ]]; then
 +
     repolist+=("https://github.com/yhamamachi/meta-rcar-bsp-release;remotes/origin/v5.9.0")
 +
    RELEASE=-release
 
fi
 
fi
 
+
repo_clone
mkdir -p ${WORK}
+
extract_proprietary_package
cd ${WORK}
+
build_yocto
 
+
if [[ "$(echo $*' ' | grep ' -r ')" != "" ]]; then
# Clone basic Yocto layers in parallel
+
    build_32bit_rom_writer
git clone git://git.yoctoproject.org/poky &
+
fi
git clone git://git.openembedded.org/meta-openembedded &
+
</syntaxhighlight> <!-- End of  build script -->
git clone https://github.com/renesas-rcar/meta-renesas &
+
# build
git clone https://github.com/renesas-rcar/meta-renesas-ccpf &
+
#: <syntaxhighlight lang="text">
 
+
./build.sh <target_board_name> <build type> <release package option>
# Wait for all clone operations
+
Ex.)
wait
+
    h3ulcb mmp build:
 
+
        ./build.sh h3ulcb -m
# Switch to proper branches/commits
+
     m3ulcb mmp-dist build for release:
cd ${WORK}/poky
+
        ./build.sh m3ulcb -d -r
git checkout -B tmp ${POKY_COMMIT}
+
</syntaxhighlight>
cd ${WORK}/meta-openembedded
+
#: {{Note}} target_board_name is "h3ulcb" or "m3ulcb".
git checkout -B tmp ${META_OE_COMMIT}
+
#: If the build completes successfully, all the necessary files are generated in a following directory:
cd ${WORK}/meta-renesas
+
#:: <syntaxhighlight lang="text">
git checkout -B tmp ${META_RENESAS_COMMIT}
+
./work_Yocto590_ccpfsk/build_<target_board_name>_<build type>/tmp/deploy/images/<target_board_name>
cd ${WORK}/meta-renesas-ccpf
+
ex.) h3ulcb mmp build:
git checkout -B tmp ${META_RENESAS_CCPF_COMMIT}
+
    ./work_Yocto590_ccpfsk/build_h3ulcb_mmp/tmp/deploy/images/h3ulcb
 
+
ex.) m3ulcb mmp-dist for release build:
cd ${WORK}
+
    ./work_Yocto590_ccpfsk/build_m3ulcb_mmp-dist-release/tmp/deploy/images/m3ulcb
rm -rf ${WORK}/build/conf
+
    or
TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/bsp/ \
+
    ./work_Yocto590_ccpfsk/build_m3ulcb_mmp-dist-release/tmp/deploy/release
     source poky/oe-init-build-env ${WORK}/build
 
bitbake core-image-minimal
 
 
 
### For creating release package which is distributed on eLinux
 
#cp -f ${WORK}/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/mmp-dist/site.conf.sample \
 
#    ${WORK}/build/conf/site.conf
 
#bitbake core-image-minimal-release
 
#cd ${WORK}
 
#TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/bsp/ \
 
#   source poky/oe-init-build-env ${WORK}/build_32
 
#cp -f ${WORK}/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/mmp-dist/site.conf.sample \
 
#   ${WORK}/build_32/conf/site.conf
 
#echo 'MACHINE ??= "qemuarm"' > ${WORK}/build_32/conf/local.conf
 
#echo 'DEFAULTTUNE = "armv7a"' >> ${WORK}/build_32/conf/local.conf
 
#bitbake flash-writer renesas-bsp-rom-writer
 
#cp -f ${WORK}/build_32/tmp-glibc/deploy/images/qemuarm/AArch32_Flash_writer_SCIF_DUMMY_CERT_E6300400_ULCB.mot \
 
#    ${WORK}/build_32/tmp-glibc/deploy/images/qemuarm/renesas-bsp-rom-writer/starterkit/
 
#cp -rf ${WORK}/build_32/tmp-glibc/deploy/images/qemuarm/renesas-bsp-rom-writer \
 
#    ${WORK}/build/tmp/deploy/release/binary/ipl/renesas-bsp-rom-writer_32bit
 
 
</syntaxhighlight>
 
</syntaxhighlight>
<!-- End of BSP case -->
 
  
 
== Build SDK ==
 
== Build SDK ==
Line 469: Line 372:
 
! Board name !! SoC version !! Type Name || DTB file
 
! Board name !! SoC version !! Type Name || DTB file
 
|-
 
|-
| H3SK || 2.0<br>2.0<br>2.0/3.0 ||  RTP0RC77951SKBX010SA00<br>RTP0RC77951SKBX010SA01<br>RTP0RC77951SKBX010SA03 || r8a77951-ulcb.dtb
+
| H3SK || 2.0<br>2.0<br>2.0/3.0 ||  RTP0RC77951SKBX010SA00<br>RTP0RC77951SKBX010SA01<br>RTP0RC77951SKBX010SA03 || r8a77951-ulcb-ccpf-sk.dtb
 
|-  
 
|-  
| H3e-2G SK || 3.0 ||  RTP8J779M1ASKB0SK0SA003 || r8a779<span style="color:#ff0000;">m</span>1-ulcb.dtb
+
| H3e-2G SK || 3.0 ||  RTP8J779M1ASKB0SK0SA003 || r8a779<span style="color:#ff0000;">m</span>1-ulcb-ccpf-sk.dtb
 
|-  
 
|-  
| M3SK || 1.0 || RTP0RC7796SKBX0010SA09 || r8a77960-ulcb.dtb
+
| M3SK || 1.0 || RTP0RC7796SKBX0010SA09 || r8a77960-ulcb-ccpf-sk.dtb
 
|-  
 
|-  
| M3SK || 3.0 || RTP8J77961ASKB0SK0SA05A || r8a77961-ulcb.dtb
+
| M3SK || 3.0 || RTP8J77961ASKB0SK0SA05A || r8a77961-ulcb-ccpf-sk.dtb
 
|-  
 
|-  
 
|}
 
|}
Line 494: Line 397:
 
| HDMI1(only H3SK) || ok
 
| HDMI1(only H3SK) || ok
 
|-
 
|-
| Camera 0 || Not supported
+
| [[{{PAGENAME}}#Camera| Camera 0]] || ok
 
|-
 
|-
| Camera 1 || Not supported
+
| [[{{PAGENAME}}#Camera| Camera 1]] || ok
 
|-
 
|-
 
| [[{{PAGENAME}}#NVMe| NVMe]] || ok
 
| [[{{PAGENAME}}#NVMe| NVMe]] || ok
Line 526: Line 429:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
<!--  
+
 
==== Camera 0 ====
+
==== Camera ====
==== Camera 1 ====
+
===== loading dtbo files =====
-->
+
It requires to use device tree overlay in U-boot.
 +
Following is the example of using tftp.
 +
<syntaxhighlight lang=bash>
 +
tftp 0x48040000 ulcb-ccpf-sk-cn12-imx219.dtbo
 +
fdt addr 0x48000000
 +
fdt resize 8192
 +
fdt apply 0x48040000
 +
tftp 0x48060000 ulcb-ccpf-sk-cn13-imx219.dtbo
 +
fdt apply 0x48060000
 +
</syntaxhighlight>
 +
See also:
 +
* [[R-Car/Boards/Kingfisher/Yocto-Gen3/{{SUBPAGENAME}}#DTS_overlay]]
 +
 
 +
===== Setup camera =====
 +
<syntaxhighlight lang=bash>
 +
media-ctl -d /dev/media0 -r
 +
media-ctl -d /dev/media0 -l "'rcar_csi2 feaa0000.csi2':1 -> 'VIN0 output':0 [1]"
 +
media-ctl -d /dev/media0 -V "'rcar_csi2 feaa0000.csi2':1 [fmt:SBGGR8_1X8/3264x2464 field:none]"
 +
media-ctl -d /dev/media0 -l "'rcar_csi2 fea80000.csi2':1 -> 'VIN4 output':0 [1]"
 +
media-ctl -d /dev/media0 -V "'rcar_csi2 fea80000.csi2':1 [fmt:SBGGR8_1X8/3264x2464 field:none]"
 +
</syntaxhighlight>
 +
 
 +
===== Using Camera =====
 +
Ex.) Show video captured by camera0 in weston.
 +
<syntaxhighlight lang=bash>
 +
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=mmap ! \
 +
    video/x-bayer,format=bggr,width=3264,height=2464 ! bayer2rgb ! videobalance ! videoconvert ! waylandsink
 +
</syntaxhighlight>
 +
 
 +
Ex.) Show video captured by camera0 in weston.
 +
<syntaxhighlight lang=bash>
 +
gst-launch-1.0 v4l2src device=/dev/video1 io-mode=mmap ! \
 +
    video/x-bayer,format=bggr,width=3264,height=2464 ! bayer2rgb ! videobalance ! videoconvert ! waylandsink
 +
</syntaxhighlight>
 +
 
 +
Ex.) Save and show an image captured by camera0
 +
<syntaxhighlight lang=bash>
 +
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=mmap num-buffers=1 ! \
 +
    video/x-bayer,format=bggr,width=3264, height=2464 ! queue ! bayer2rgb ! queue ! videoconvert ! video/x-raw,format=RGB,framerate=1/1 ! jpegenc ! filesink location=out.jpg
 +
gst-launch-1.0 -v filesrc location=out.jpg ! jpegdec ! imagefreeze ! videoconvert ! video/x-raw, format=BGRA ! waylandsink
 +
</syntaxhighlight>
 +
 
 +
How to crop or scale up/down video:
 +
* [https://en-support.renesas.com/knowledgeBase/19905191 FAQ: How to crop the video which is captured by camera.]
 +
* [https://en-support.renesas.com/knowledgeBase/19905180 FAQ: How to scale up/down the video using vspfilter.]
  
 
==== NVMe ====
 
==== NVMe ====

Revision as of 00:11, 2 March 2022


Introduction

This page contains information abot building and running Yocto on:

If prebuilt binary of Yocto BSP is needed, please refer to the following:

18px <translate> Note:</translate>:

  • Prebuilt binary of Yocto BSP v5.9.0 is under preparing.
  • Currently, previous version(v5.5.0) is available.

Update info:

  • 2022/03/02: Add support Camera device.

Topic

The new version of R-Car Starter Kit Premier is now on sale !!

  • Equipped with R-Car H3e-2G
    (En) https://www.renesas.com/jp/en/about/press-room/renesas-launches-r-car-gen3e-20-percent-higher-cpu-speed-automotive-infotainment-cockpit-and-digital
    (Zh) https://www.renesas.com/jp/zh/about/press-room/renesas-launches-r-car-gen3e-20-percent-higher-cpu-speed-automotive-infotainment-cockpit-and-digital
    (Jp) https://www.renesas.com/jp/ja/about/press-room/renesas-launches-r-car-gen3e-20-percent-higher-cpu-speed-automotive-infotainment-cockpit-and-digital
  • CPU performance is increased 20% by supporting up to 2GHz frequency over past products.
  • You can buy from here.

SW Release Information

Board name SW name Release date Note
R-Car Starter Kit ( Premier / Pro ) Yocto v5.9.0 (stable) [New!!] 2022/02/08
Kingfisher Infotainment Board Yocto v5.9.0 (stable) [New!!] 2022/02/14 To check for latest information, please refer to the meta-rcar/tree/v5.9.0.
Android 10 (stable) 2021/07/26 R-Car Starter Kit Premier(R-Car H3) + Kingfisher is supported.
R-Car Starter Kit Pro(RTP8J77961ASKB0SK0SA05A) + Kingfisher is also supported from 2021/11/25.
Android P (stable) 2020/09/29 R-Car Starter Kit Premier(R-Car H3) + Kingfisher is supported.
R-Car Starter Kit Pro(RTP8J77961ASKB0SK0SA05A) + Kingfisher is also supported from 2021/03/16.
CCPF-SK Board Yocto v5.9.0 (latest) [New!!] 2022/02/08 Prebuilt binary is available in Quick startup guide page. (Updated on 2022/03/18)


Software revisions

Software Revision
Yocto Project 3.1.11
aarch64-poky-linux-gcc (GCC) 9.3
Wayland/Weston 1.18.0/8.0.0
GStreamer 1.16.3
Kernel Ver 5.10.41
Userland 64/32bit 64
U-Boot 2020.10
OP_TEE 3.13.0
OpenGL ES 3.2

Environment

Host PC

Ubuntu 18.04/20.04 LTS (64bit) is recommended as OS. 32bit version is not supported.

Confirmed Board

Board SoC Confirmed
R-Car Starter Kit Premier H3e-2G v3.0 OK
R-Car Starter Kit Premier H3 v3.0 (1rank DDR) OK
R-Car Starter Kit Premier H3 v3.0 (2rank DDR) NT
R-Car Starter Kit Premier H3 v2.0 with 8GB DDR NT
R-Car Starter Kit Premier H3 v2.0 with 4GB DDR NT
R-Car Starter Kit Pro M3 v3.0 OK
R-Car Starter Kit Pro M3 v1.0 NT

18px <translate> Note:</translate> NT='Not Tested'

See also:

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:
    Download two files:
    • R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
    • R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip

    Graphic drivers are required for Wayland. Multimedia drivers are optional.
  2. Install required packages
    sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
    build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
    xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
    libsdl1.2-dev pylint3 xterm
    
    Refer to Yocto Project Quick Start for more information.

Building the BSP for CCPF-SK

What is different between "MMP" and "MMP-dist".

  • MMP is minimal BSP which contains GFX/MMP evaluation package.
  • MMP-dist is MMP + some additional packages(For debug, development, benchmark, and so on).
  • MMP-dist release package(core-image-weston-release) is distributed on R-Car/Boards/CCPF-SK/GettingStarted
  • BSP is minimal BSP without GFX/MMP evaluation package.

Manual steps for building MMP

Note:

  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 https://github.com/renesas-rcar/meta-renesas
    git clone https://github.com/renesas-rcar/meta-renesas-ccpf
    
  3. Switch to proper branches/commits
    cd $WORK/poky
    git checkout -b tmp 74b22db6879b388d700f61e08cb3f239cf940d18
    cd $WORK/meta-openembedded
    git checkout -b tmp 814eec96c2a29172da57a425a3609f8b6fcc6afe
    cd $WORK/meta-renesas
    git checkout -b tmp 13fd24957b9acc29a235ee0c7f398fd867f38b47
    cd $WORK/meta-renesas-ccpf
    git checkout -b tmp 09dd815616cce3a2bdcf8906c0d21403df8b93bd
    
    Another versions are not tested for compatibility.
  4. Create $WORK/../proprietary folder, then download proprietary driver modules to it.
    See also Required_packages
    You should see the following files:
    $ ls -1 $WORK/../proprietary/*.zip
    R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
    R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.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-20220121.zip 
    unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.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
    TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/<h3ulcb|m3ulcb>-ccpf-sk/mmp/ \
        source poky/oe-init-build-env ${WORK}/build
    
  7. Start the build
    bitbake core-image-weston
    
  8. 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.
  9. Bitbake has generated all the necessary files in ./tmp/deploy/images directory.
    You can verify its content:
    bash $ ls -1 `find ./tmp/deploy/images/h3ulcb/ -maxdepth 1 -type l -print`
    ./tmp/deploy/images/h3ulcb/Image
    ./tmp/deploy/images/h3ulcb/Image-h3ulcb.bin
    ./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.testdata.json
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.bmap
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.xz
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.xz.sha256sum
    ./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
    ./tmp/deploy/images/h3ulcb/r8a77951-ulcb-ccpf-sk.dtb
    ./tmp/deploy/images/h3ulcb/r8a77951-ulcb.dtb
    ./tmp/deploy/images/h3ulcb/r8a779m1-ulcb-ccpf-sk.dtb
    ./tmp/deploy/images/h3ulcb/r8a779m1-ulcb.dtb
    ./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-initial-env-h3ulcb-r8a7795_h3ulcb
    ./tmp/deploy/images/h3ulcb/u-boot-initial-env-r8a7795_h3ulcb
    ./tmp/deploy/images/h3ulcb/u-boot.bin
    ./tmp/deploy/images/h3ulcb/u-boot.bin-r8a7795_h3ulcb
    
    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.
  10. You can now proceed with Running Yocto images

Using build script

  1. Directory Structure
    |--build.sh
    `--proprietary
       |--R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
       `--R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip
    
  2. Build script(build.sh)
    #!/bin/bash
    
    BOARD_LIST=("h3ulcb" "m3ulcb")
    TARGET_BOARD=$1
    PROPRIETARY_DIR=`pwd`/proprietary
    WORK=`pwd`/work_Yocto590_ccpfsk
    GFX_MMP_LIB=R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip
    GFX_MMP_DRIVER=R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip
    repolist=( \
        "git://git.yoctoproject.org/poky;74b22db6879b388d700f61e08cb3f239cf940d18" \
        "git://git.openembedded.org/meta-openembedded;814eec96c2a29172da57a425a3609f8b6fcc6afe" \
        "https://github.com/renesas-rcar/meta-renesas;13fd24957b9acc29a235ee0c7f398fd867f38b47" \
        "https://github.com/renesas-rcar/meta-renesas-ccpf;09dd815616cce3a2bdcf8906c0d21403df8b93bd" \
        "https://github.com/yhamamachi/meta-rcar-dev-utils;remotes/origin/v5.9.0"
    )
    repolist_dist=( \
        "https://github.com/OSSystems/meta-browser;157c2dcc26304edc2543e5f45e74daf70ef2b7a6" \
        "https://github.com/kraj/meta-clang;76c6751d721a4265e01bb71d8dc4fb46dca6602f" \
        "git://git.openembedded.org/meta-python2;b901080cf57d9a7f5476ab4d96e56c30db8170a8" \
    )
    
    _usage () {
        echo "Usage: $0 \${BOARD_NAME} [build type options] [release package option]"
        echo "BOARD_NAME list: "
        for i in ${BOARD_LIST[@]}; do echo "  - $i"; done
        echo "build type options:"
        echo "  -d: mmp-dist"
        echo "  -m: mmp(default)"
        echo "  -g: gfx-only"
        echo "  -b: bsp"
        echo "release package options:"
        echo "  -r: Create core-image-xxxxx-release"
        exit
    }
    
    repo_clone () {
        mkdir -p ${WORK}
        for repo in ${repolist[@]}; do
            URL=$(echo $repo | cut -d';' -f1)
            COMMIT=$(echo $repo | cut -d';' -f2)
            NAME=${URL##*/}
            if [[ ! -d "${WORK}/${NAME}" ]]; then
                git clone ${URL} ${WORK}/${NAME}
            fi
            cd ${WORK}/${NAME}; git checkout -B tmp ${COMMIT}
        done
    }
    extract_proprietary_package() {
        if [[ "$BUILD_TYPE" == "bsp" ]]; then
            return
        fi
        WORK_PROP_DIR=${WORK}/proprietary
        mkdir -p ${WORK_PROP_DIR}
        unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_LIB} -d ${WORK_PROP_DIR}
        unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_DRIVER} -d ${WORK_PROP_DIR}
        cd ${WORK}/meta-renesas
        sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f ${WORK_PROP_DIR}
    }
    
    check_target_board () {
        if ! `IFS=$'\n'; echo "${BOARD_LIST[*]}" | grep -qx "${TARGET_BOARD}"`; then
            _usage
        fi
    }
    
    set_build_type () {
        BUILD_TARGET=core-image-weston
        BUILT_DYPE=mmp
        if [[ "$(echo $*' ' | grep ' -m ')" != "" ]]; then
            BUILD_TYPE=mmp
        elif [[ "$(echo $*' ' | grep ' -g ')" != "" ]]; then
            BUILD_TYPE=gfx-only
        elif [[ "$(echo $*' ' | grep ' -b ')" != "" ]]; then
            BUILD_TYPE=bsp
            BUILD_TARGET=core-image-minimal
        elif [[ "$(echo $*' ' | grep ' -d ')" != "" ]]; then
            BUILD_TYPE=mmp-dist
            repolist=(${repolist[@]} ${repolist_dist[@]})
        fi
    }
    
    build_yocto () {
        cd ${WORK}
        BUILD_DIR=${WORK}/build_${TARGET_BOARD}_${BUILD_TYPE}${RELEASE}
        rm -rf ${BUILD_DIR}/conf
        TEMPLATECONF=$PWD/meta-renesas-ccpf/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}-ccpf-sk/${BUILD_TYPE}/ \
                source poky/oe-init-build-env ${BUILD_DIR}
        echo "DL_DIR = '${DL_DIR:-${WORK}/yocto_dl_dir}'" >> ${BUILD_DIR}/conf/local.conf
        echo "SSTATE_DIR = '${SSTATE_DIR:-${WORK}/yocto_sstate_dir}'" >> ${BUILD_DIR}/conf/local.conf
        echo "${LOCAL_CONF_APPEND}" >> ${BUILD_DIR}/conf/local.conf
        bitbake-layers add-layer ${WORK}/meta-rcar-dev-utils/meta-rcar-gen3
        if [[ "${RELEASE}" != "" ]]; then
            cp -f ${WORK}/meta-rcar-bsp-release/meta-rcar-gen3/docs/sample/site.conf.sample \
                ${BUILD_DIR}/conf/site.conf
            bitbake-layers add-layer ${WORK}/meta-rcar-bsp-release/meta-rcar-gen3
    
            case ${BUILD_TYPE} in
                "mmp*") bitbake gles-user-module omx-user-module -c install -f ;;
                "gfx")  bitbake gles-user-module -c install -f ;;
            esac
        fi
        bitbake ${BUILD_TARGET}${RELEASE}
    }
    
    build_32bit_rom_writer () {
        cd ${WORK}
        BUILD_32_DIR=${WORK}/build_32
        source poky/oe-init-build-env ${BUILD_32_DIR}
        cp -f ${BUILD_DIR}/conf/* -t ${BUILD_32_DIR}/conf/
        echo "MACHINE ??= 'qemuarm'" >> ${BUILD_32_DIR}/conf/local.conf
        echo "DEFAULTTUNE = 'armv7a'" >> ${BUILD_32_DIR}/conf/local.conf
        bitbake flash-writer renesas-bsp-rom-writer
        cp -rf ${BUILD_32_DIR}/tmp/deploy/images/qemuarm/renesas-bsp-rom-writer_32bit \
            -t ${BUILD_DIR}/tmp/deploy/release/binary/ipl/
    }
    
    ## main process ##
    RELEASE=""
    check_target_board $@
    set_build_type $@
    if [[ "$(echo $*' ' | grep ' -r ')" != "" ]]; then
        repolist+=("https://github.com/yhamamachi/meta-rcar-bsp-release;remotes/origin/v5.9.0")
        RELEASE=-release
    fi
    repo_clone
    extract_proprietary_package
    build_yocto
    if [[ "$(echo $*' ' | grep ' -r ')" != "" ]]; then
        build_32bit_rom_writer
    fi
    
  3. build
    ./build.sh <target_board_name> <build type> <release package option>
    Ex.)
        h3ulcb mmp build:
            ./build.sh h3ulcb -m
        m3ulcb mmp-dist build for release:
            ./build.sh m3ulcb -d -r
    
    18px <translate> Note:</translate> target_board_name is "h3ulcb" or "m3ulcb".
    If the build completes successfully, all the necessary files are generated in a following directory:
    ./work_Yocto590_ccpfsk/build_<target_board_name>_<build type>/tmp/deploy/images/<target_board_name>
    ex.) h3ulcb mmp build:
        ./work_Yocto590_ccpfsk/build_h3ulcb_mmp/tmp/deploy/images/h3ulcb
    ex.) m3ulcb mmp-dist for release build:
        ./work_Yocto590_ccpfsk/build_m3ulcb_mmp-dist-release/tmp/deploy/images/m3ulcb
        or
        ./work_Yocto590_ccpfsk/build_m3ulcb_mmp-dist-release/tmp/deploy/release
    

Build SDK

Refer to Build SDK on the Yocto-Gen3 page.

Running Yocto images

Refer to Running Yocto images on the Yocto-Gen3 page.

Relationship diagram between each SK board and DTB file

Board name SoC version Type Name DTB file
H3SK 2.0
2.0
2.0/3.0
RTP0RC77951SKBX010SA00
RTP0RC77951SKBX010SA01
RTP0RC77951SKBX010SA03
r8a77951-ulcb-ccpf-sk.dtb
H3e-2G SK 3.0 RTP8J779M1ASKB0SK0SA003 r8a779m1-ulcb-ccpf-sk.dtb
M3SK 1.0 RTP0RC7796SKBX0010SA09 r8a77960-ulcb-ccpf-sk.dtb
M3SK 3.0 RTP8J77961ASKB0SK0SA05A r8a77961-ulcb-ccpf-sk.dtb

S/W support status

Support list

Functions Status
CAN ok
USB2.0 ok
USB3.0 ok
HDMI1(only H3SK) ok
Camera 0 ok
Camera 1 ok
NVMe ok
S2RAM(Suspend to RAM) ok(May fail in NVMe connection state.)
fan control ok

Note:

"ok" - Function succeeded in the simple test as below.
"NT" - Function wasn't tested
Please connect USB 3.0 device to USB 3.0 port and USB2.0 device to USB 2.0 port.

How to test some capabilities

CAN

Ex.) loop back

connect pin2 and pin6, pin3 and pin7
CCPF-SK-CAN.png
root@h3ulcb:~# ip link set can0 up type can bitrate 125000
root@h3ulcb:~# ip link set can1 up type can bitrate 125000
root@h3ulcb:~# candump can0&
root@h3ulcb:~# cangen can1 -I i -L i -D i
(Ctrl+C)
root@h3ulcb:~# candump can1&
root@h3ulcb:~# cangen can0 -I i -L i -D i


Camera

loading dtbo files

It requires to use device tree overlay in U-boot. Following is the example of using tftp.

tftp 0x48040000 ulcb-ccpf-sk-cn12-imx219.dtbo
fdt addr 0x48000000
fdt resize 8192
fdt apply 0x48040000
tftp 0x48060000 ulcb-ccpf-sk-cn13-imx219.dtbo
fdt apply 0x48060000

See also:

Setup camera
media-ctl -d /dev/media0 -r
media-ctl -d /dev/media0 -l "'rcar_csi2 feaa0000.csi2':1 -> 'VIN0 output':0 [1]"
media-ctl -d /dev/media0 -V "'rcar_csi2 feaa0000.csi2':1 [fmt:SBGGR8_1X8/3264x2464 field:none]"
media-ctl -d /dev/media0 -l "'rcar_csi2 fea80000.csi2':1 -> 'VIN4 output':0 [1]"
media-ctl -d /dev/media0 -V "'rcar_csi2 fea80000.csi2':1 [fmt:SBGGR8_1X8/3264x2464 field:none]"
Using Camera

Ex.) Show video captured by camera0 in weston.

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=mmap ! \
    video/x-bayer,format=bggr,width=3264,height=2464 ! bayer2rgb ! videobalance ! videoconvert ! waylandsink

Ex.) Show video captured by camera0 in weston.

gst-launch-1.0 v4l2src device=/dev/video1 io-mode=mmap ! \
    video/x-bayer,format=bggr,width=3264,height=2464 ! bayer2rgb ! videobalance ! videoconvert ! waylandsink

Ex.) Save and show an image captured by camera0

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=mmap num-buffers=1 ! \
    video/x-bayer,format=bggr,width=3264, height=2464 ! queue ! bayer2rgb ! queue ! videoconvert ! video/x-raw,format=RGB,framerate=1/1 ! jpegenc ! filesink location=out.jpg
gst-launch-1.0 -v filesrc location=out.jpg ! jpegdec ! imagefreeze ! videoconvert ! video/x-raw, format=BGRA ! waylandsink

How to crop or scale up/down video:

NVMe

root@h3ulcb:~# dmesg | grep nvme
nvme nvme0: pci function 0000:01:00.0
nvme 0000:01:00.0: enabling device (0000 -> 0002)
nvme nvme1: pci function 0001:01:00.0
nvme 0001:01:00.0: enabling device (0000 -> 0002)
nvme nvme0: 8/0/0 default/read/poll queues
nvme nvme1: 8/0/0 default/read/poll queues
root@h3ulcb:~# mount /dev/nvme0n1p1 /mnt
EXT4-fs (nvme0n1p1): mounted filesystem with ordered data mode. Opts: (null)
root@h3ulcb:~# ls /mnt
root@h3ulcb:~# umount /mnt
root@h3ulcb:~# mount /dev/nvme1n1p1 /mnt
EXT4-fs (nvme1n1p1): mounted filesystem with ordered data mode. Opts: (null)
root@h3ulcb:~# ls /mnt
root@h3ulcb:~# umount /mnt

S2RAM

Push SW6 or execute 'systemctl suspend' to enter Suspend to RAM.
it can wake-up by SW4.
18px <translate> Note:</translate>: May fail in NVMe connection state.

fan control

To use the fan control function, RL78 needs to be updated.

Temperature fan speed
less than 35 degrees 0%
above 35 degrees and below 50 degrees 50%
above 50 degrees 100%

This function can be stopped by "systemctl stop ccpfsk-fancontrol".

Known issues and limitations

  1. Refer to R-Car/Boards/CCPF-SK#Known_Issues.
  2. Refer to R-Car/Boards/Yocto-Gen3/v5.9.0#Known_issues_and_limitations.


Q&A site

https://renesasrulz.com/automotive/r-car-h3-m3-cockpit

FAQ site