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. | |
OS | Ubuntu 22.04 LTS, 64-bit version | |
Notice
Several updated OSS components, released to address security vulnerabilities and enhance driver performance, are now available on Renesas' GitHub. Please refer to How to Update Linux Packages in the HMI SDK for instructions on how to replace them.
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.
Install the required packages.
Run the following command to install the required packages on your Linux PC.
Set up the
gitenvironment.Run the following command to set up the
gitenvironment 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.
Set environment variables.
Please set the following environment variables.
Tip
The
SDK_PKG_DIRshould point to the directory where you have downloaded your HMI SDK Yocto Build Packages, includingRTK0EF0195F*SJ_${PLATFORM}_yocto-and-pre-built-image.zipandRTK0EF0195F*SJ_linux-src.zip.Extract the Yocto recipe package.
Decompress the Yocto recipe and pre-built binary image packages.
Create a working directory.
Extract the Yocto recipe package.
Initialize the build environment.
Run the given environment setup script with the command shown below.
Add layers.
Add necessary Yocto
meta-layersusing 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-browser/meta-chromium bitbake-layers add-layer ../meta-openembedded/meta-networking bitbake-layers add-layer ../meta-browser-hwdecode bitbake-layers add-layer ../meta-rz-demoscd ${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-demosSet 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_NETWORKinlocal.conffrom0to1using thesedcommand.Decompress the downloaded Source Code and set it up in the build environment.
Modify the configurations for the build environment.
Add
IMAGE_INSTALL_appendand other settings tolocal.confusing 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" 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 the
bitbakecommand to build the images.After completing the build process above, change the eMMC setting from
1to0.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 0After making the change above, perform the additional build process as follows.
After the above build process, change the setting of SW_SD0_DEV_SEL from
1to0.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 0After the change above, perform the additional build process as follows.
Tip
The build may take several hours, depending on the PC specifications.
This completes the build of the Linux environment.
Create the SDK toolchain.
If you want to further deploy sample or your customized applications, building the
toolchainis also required. Create the SDK toolchain using the following command.
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.