Skip to content

How To Build HMI SDK

Introduction

HMI SDK is a quick and easy HMI Application development environment.

To modify Linux component, you need to build HMI SDK from source code.
HMI SDK source code will generate same Linux environment as HMI SDK.

This page explains how to build HMI SDK source code.
After you have completed this page, you would be able to change the source code and customize Linux environment (i.e., memory map, additional OSS etc...).

Requirement

  1. Users have launched Evaluation Board Kit according to Getting Started, which means they can run HMI Application on the board.
  2. To build Yocto Linux, the below equipment should be prepared.

    Equipment

    Details

    Linux PC

    Approximately 110GB free space is necessary.

    OS

    Ubuntu 20.04 LTS

    64bit OS must be used.

Step 1: Obtain HMI SDK source code

Download HMI SDK source code from below link.

Get HMI SDK

Get HMI SDK source code

Step 2: Build HMI SDK source code

This step explains how to build Linux environment with HMI SDK source code.

Note

In the following instructions, text in angle brackets should be replaced with a character string that depends on your environment.

The brackets < and > are unnecessary in the text.

  1. Install the required packages

    Install some packages into your Linux PC, which are necessary in the following steps.

    sudo apt-get update
    sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping libsdl1.2-dev xterm p7zip-full libyaml-dev libssl-dev bmap-tools
    
  2. Set up your git environment

    Set up your git environment if you have never done it.

    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

    Set the following environment variables.

    export WORK=<A directory path for building>
    export PLATFORM=rzg2l
    export BOARD=smarc-rzg2l
    export SDK_PKG_DIR=<A directory path for HMI SDK source code packages>
    

    Note

    Currently, RZ/G Linux HMI SDK supports only rzg2l for PLATFORM and smarc-rzg2l for BOARD.

    The directory set to SDK_PKG_DIR shall include the HMI SDK source code package such as RTK0EF0195F*SJ_linux-src.zip.

  4. Extract Yocto recipe package

    Decompress the source code package, create a working directory, and extract Yocto recipe package.

    cd ${SDK_PKG_DIR}
    unzip RTK0EF0195F*SJ_linux-src.zip
    

    mkdir -p ${WORK}
    cd ${WORK}
    tar xf ${SDK_PKG_DIR}/RTK0EF0195F*SJ_linux-src/yocto_recipe_rzg2l_hmi-sdk_v*.tar.gz --strip-components 1
    
  5. Initialize build environment

    Run an environment setup script as follows.

    cd ${WORK}
    TEMPLATECONF=${PWD}/meta-renesas/meta-${PLATFORM}/docs/template/conf/ source poky/oe-init-build-env build
    
  6. Add layers

    Add necessary Yocto meta-layers layer as follows.

    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-rz-demos
    
  7. Set up environment for offline build

    This step is configuration for offline building.

    If you would like to get source code via network when you build the HMI SDK, skip this step.

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

    cd ${WORK}/build
    sed -i "s|\(BB_NO_NETWORK =.*\)\"0\"|\1\"1\"|" "conf/local.conf"
    

    Decompress OSS source code package and set it into the build environment.

    cd ${SDK_PKG_DIR}/RTK0EF0195F*SJ_linux-src/
    7z x oss-souce-code-pkg_rzg2l_hmi-sdk_v*.7z
    mv oss-souce-code-pkg_rzg2l_hmi-sdk_v*/downloads/ ${WORK}/build/
    
  8. Modify configurations for build environment

    Add IMAGE_INSTALL_append and WHITELIST_GPL-3.0 to local.conf as follows.

    cd ${WORK}/build
    sed -i '$aIMAGE_INSTALL_append = \" packagegroup-lvgl-demo packagegroup-benchmark-tools packagegroup-rz-benchmark-demo\"' "conf/local.conf"
    sed -i '$aWHITELIST_GPL-3.0 += \" glmark2 \"' "conf/local.conf"
    
  9. Build images

    Run bitbake command to build images.

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

    Note

    If you need to create an SDK toolchain, run bitbake command as follows.

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

    Note

    After building images or SDK toolchain, you can find them in the following directories respectively.

    • Images: ${WORK}/build/tmp/deploy/images/${BOARD}/
    • SDK toolchain: ${WORK}/build/tmp/deploy/sdk/