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
- Users have launched Evaluation Board Kit according to Getting Started, which means they can run HMI Application on the board.
-
To build Yocto Linux, the below equipment should be prepared.
Equipment
Details
Linux PC
Approximately the following free space is necessary.
- 150 GB for RZ/G2L EVK
- 150 GB for RZ/G2LC EVK
- 85 GB for RZ/G2UL EVKOS
Ubuntu 22.04 LTS
64bit OS must be used.
Step 1: Obtain HMI SDK Yocto recipe¶
Download HMI SDK Yocto recipe and pre-built binary image package from below link.
In the build process, source code of modules in the HMI SDK will be downloaded via network connection, but you can use the same source code used for creating the HMI SDK binaries. Download HMI SDK source code from below link.
Get HMI SDK
Source code package
Note
The HMI SDK source code package file is quite large. It will take a long time to download it.
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.
-
Install the required packages
Install some packages into your Linux PC, which are necessary in the following steps.
-
Set up your
git
environmentSet 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.
-
Set environment variables
Set the following environment variables.
Note
The directory set to
SDK_PKG_DIR
shall include the HMI SDK packages such asRTK0EF0195F*SJ_*_yocto-and-pre-built-image.zip
andRTK0EF0195F*SJ_linux-src.zip
. -
Extract Yocto recipe package
Decompress the Yocto recipe and pre-built binary image package, create a working directory, and extract Yocto recipe package.
-
Initialize build environment
Run an environment setup script as follows.
-
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-clang 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-demos
cd ${WORK}/build bitbake-layers add-layer ../meta-rz-features/meta-rz-graphics bitbake-layers add-layer ../meta-clang 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-demos
-
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
inlocal.conf
from0
to1
usingsed
command.Decompress source code package and set it into the build environment.
-
Modify configurations for build environment
Add
IMAGE_INSTALL_append
and other settings tolocal.conf
as follows.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" sed -i '$aWHITELIST_GPL-3.0 += \" glmark2 \"' "conf/local.conf" sed -i '$aPREFERRED_VERSION_nodejs-native = \"14.%\"' "conf/local.conf"
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" sed -i '$aWHITELIST_GPL-3.0 += \" glmark2 \"' "conf/local.conf" sed -i '$aPREFERRED_VERSION_nodejs-native = \"14.%\"' "conf/local.conf"
-
Build images
Run
bitbake
command to build images.After the above build process, change the setting of EMMC from '1' to '0'.
cd $WORK/build/tmp/work-shared/${BOARD}/kernel-source vi arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi (change EMMC setting) before) #define EMMC 1 after) #define EMMC 0
After the change above, you need to have additional build process as follows:
After the above build process, change the setting of SW_SD0_DEV_SEL from '1' to '0'.
cd $WORK/build/tmp/work-shared/${BOARD}/kernel-source vi arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dts (change SW_SD0_DEV_SEL setting) before) #define SW_SD0_DEV_SEL 1 after) #define SW_SD0_DEV_SEL 0
After the change above, you need to have additional build process as follows:
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/
- Images: