Skip to content

Building the HMI SDK with Yocto

Introduction

This page guides you through building the HMI SDK with Yocto. You will be able to modify the source code and customize the Linux environment according to your needs.

To build Yocto Linux, the following equipment should be prepared.

Equipment

Details

Linux PC



Approximately the following free space is required.
- 450 GB for RZ/G3E EVK

OS

Ubuntu 22.04 LTS, 64-bit version

Step 1: Obtain the RZ/G HMI SDK Yocto Build Package

Please download the HMI SDK Yocto Build Package using the button below.

During the build process, the source code of HMI SDK modules will be downloaded over a network connection. Alternatively, you can also manually download the same source code used to create the HMI SDK binaries and use it offline. Download the HMI SDK Source Code using the button below.

Source Code
for all RZ/G devices

Notice

  • The Source Code supplement is very large, so downloading may take some time.
  • Additional setup in Step 2-7 Set up the environment for an offline build is required if you choose to download the source code manually.

Note

Refer to File Contents for details about the HMI SDK Yocto Build Package and Source Code.
After downloading the package, please review the included Release Note.

Step 2: Build HMI SDK with Yocto

Tip

In the following instructions, text shown in angle brackets should be replaced with values specific to your environment.
The angle brackets < and > should not be included when you enter the text.

  1. Install the required packages.

    Run the following command to install the required packages on your Linux PC.

    sudo apt-get update
    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 libsdl1.2-dev xterm p7zip-full libyaml-dev libssl-dev bmap-tools file git libacl1 liblz4-tool locales python3-git python3-jinja2 python3-subunit zstd
    

  2. Set up the git environment.

    Run the following command to set up the git environment if it has not been configured yet.

    git config --global user.email "<Your email address>"
    git config --global user.name "<Your user name>"
    

    Note

    For more information, refer to Yocto Project Quick Build.

  3. Set environment variables.

    Please set the following environment variables.

    export WORK=<A directory path for building>
    export PLATFORM=rzg3e
    export BOARD=smarc-rzg3e
    export SDK_PKG_DIR=<A directory path for HMI SDK Yocto Build packages>
    

    Tip

    The SDK_PKG_DIR should point to the directory where you have downloaded your HMI SDK Yocto Build Packages, including RTK0EF0195F*SJ_${PLATFORM}_yocto-and-pre-built-image.zip and RTK0EF0195F*SJ_linux-src.zip.

  4. Extract the Yocto recipe package.

    Decompress the Yocto recipe and pre-built binary image packages.

    cd ${SDK_PKG_DIR}
    unzip RTK0EF0195F*SJ_${PLATFORM}_yocto-and-pre-built-image.zip
    

    Create a working directory.

    mkdir -p ${WORK}
    

    Extract the Yocto recipe package.

    cd ${WORK}
    tar xf ${SDK_PKG_DIR}/RTK0EF0195F*SJ_${PLATFORM}_yocto-and-pre-built-image/yocto_recipe_${PLATFORM}_hmi-sdk_v*.tar.gz --strip-components 1
    

  5. Initialize the build environment.

    Run the given environment setup script with the command shown below.

    cd ${WORK}
    TEMPLATECONF=${PWD}/meta-renesas/meta-rz-distro/conf/templates/rz-conf/ source poky/oe-init-build-env build
    

  6. Add layers.

    Add necessary Yocto meta-layers using the following commands.

    cd ${WORK}/build
    bitbake-layers add-layer ../meta-rz-features/meta-rz-graphics
    bitbake-layers add-layer ../meta-rz-features/meta-rz-codecs
    bitbake-layers add-layer ../meta-clang
    bitbake-layers add-layer ../meta-lts-mixins
    bitbake-layers add-layer ../meta-browser/meta-chromium
    bitbake-layers add-layer ../meta-openembedded/meta-networking
    bitbake-layers add-layer ../meta-browser-hwdecode
    bitbake-layers add-layer ../meta-rz-features/meta-rz-flutter
    bitbake-layers add-layer ../meta-rz-features/meta-rz-flutter-demo
    bitbake-layers add-layer ../meta-flutter
    bitbake-layers add-layer ../meta-flutter/meta-flutter-apps
    bitbake-layers add-layer ../meta-rz-demos
    

  7. Set up the environment for an offline build.

    Notice

    This step configures the environment for offline building when you choose to download the Source Code manually.

    If you prefer to obtain the source code via the network while building the HMI SDK with Yocto, you can skip this Step 2-7 and continue directly with Step 2-8.

    Change the environment variable BB_NO_NETWORK in local.conf from 0 to 1 using the sed command.

    cd ${WORK}/build
    sed -i '$aBB_NO_NETWORK = "1"' "conf/local.conf"
    

    Decompress the downloaded Source Code and set it up in the build environment.

    cd ${SDK_PKG_DIR}
    unzip RTK0EF0195F*SJ_linux-src.zip
    cd ${SDK_PKG_DIR}/RTK0EF0195F*SJ_linux-src/
    7z x oss-souce-code-pkg_${PLATFORM}_hmi-sdk_v*.7z
    mv downloads/ ${WORK}/build/
    

  8. Modify the configurations for the build environment.

    Add IMAGE_INSTALL_append and other settings to local.conf using the command shown below.

    cd ${WORK}/build
    sed -i '$aIMAGE_INSTALL:append = \" packagegroup-lvgl-demo packagegroup-benchmark-tools packagegroup-chromium-demo packagegroup-rzg-hmi-sdk-demo \"' "conf/local.conf"
    

  9. Build images.

    Run the bitbake command to build the images.

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-weston
    

    Tip

    The build may take several hours, depending on the PC specifications.

    This completes the build of the Linux environment.

  10. Create the SDK toolchain.

    If you want to further deploy sample or your customized applications, building the toolchain is also required. Create the SDK toolchain using the following command.

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-weston -c populate_sdk
    

This concludes the Building the HMI SDK with Yocto guide.

Tip

Your newly built images and SDK toolchain will be generated in the following directories.
Images: ${WORK}/build/tmp/deploy/images/${BOARD}/
SDK toolchain: ${WORK}/build/tmp/deploy/sdk/

To flash the image to the SD card using bmaptool, refer to Step 4: Create SD Cards with the Prebuilt Image.

To boot your device using the prepared SD card, refer to EVK DIP Switch Setup for your boot mode setup.

For detailed information about each demo application, see Demo Applications.
For further development of sample applications, see Sample Applications.
For additional customizations, see Wiki.