This page explains how to build Linux with RZ/V2H AI SDK Source Code.
Supported version: RZ/V2H AI SDK v4.00
Introduction
AI SDK is a quick and easy AI Application development environment.
It is specifically made for RZ/V2H Evaluation Board Kit with fixed Linux components.
(For more information, please refer to Getting Started and AI SDK.)
To modify Linux component, you need to build AI SDK from source code.
AI SDK Source Code can generate the same Linux environment as AI SDK.
This page explains how to build AI 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...).
To customize the Linux environment, please refer to RZ/V2H BSP Manual Set.
Requirement
Users have launched RZ/V2H Evaluation Board Kit according to Getting Started, which means they can run AI Application on the board.
To build Yocto Linux, the below equipment should be prepared.
Equipment
Details
Linux PC
Approximately 120GB free space is necessary.
OS
Ubuntu 20.04 LTS
64bit OS must be used.
Now you are ready to build your Linux development environment.
Let's get started!!
Step 1: Obtain RZ/V2H AI SDK Source Code
Download the RZ/V2H AI SDK Source Code from the link below.
Check the working directory to confirm the package contents.
If the above command prints followings, the package is extracted correctly.
Step 3: Build RZ/V2H AI SDK Source Code
This step explains how to build Linux environment with RZ/V2H AI SDK Source Code
To install necessary sofware, run the following commands on your Linux PC.
Run the following commands and set the user name and email address before starting the build procedure.
It is needed to avoid errors when using git command to apply patches.
Register the working directory path to an environment variable.
Extract Yocto recipe package.
Run the following procedures to apply the patch file.
Get e-CAM22_CURZH camera driver (MIPI) from e-con Systems.
The e-CAM22_CURZH camera driver (MIPI) used in AI SDK is not included in the RZ/V2H AI SDK Source Code. The required driver needs to be obtained through the following procedure.
To build the e-CAM22_CURZH camera driver (MIPI) for RZ/V2H Evaluation Board Kit, contact e-con Systems at this link to obtain the patch file below.
File name
Description
e-CAM22_CURZ*.patch
e-CAM22_CURZH camera driver (MIPI) Yocto patch file for RZ/V2H
Copy and apply the patch file.
Check the working directory to confirm Yocto recipes content.
If the above command prints followings, Yocto recipes are extracted correctly.
Run the following command to build the Linux kernel files.
(It takes a few hours to finish building depending on the user's host PC performance)
All necessary files listed below will be generated by the build command and
they will be located in ${YOCTO_WORK}/build/tmp/deploy/images/rzv2h-evk-ver1 directory.
Run the following command to build cross compiler installer.
A necessary file listed below will be generated by the build command and the cross compiler installer will be located in ${YOCTO_WORK}/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-rzv2h-evk-ver1-toolchain-*.sh.
Note
If some errors occurred during the build,
please clean the directory and rebuild it after a period of time according to the below commands.
And run the build command again.
For Linux kernel files
For cross compiler installer
This is the end of how to build AI SDK Source Code.
Open ${YOCTO_WORK}/build/conf/local.conf file in a text editor.
Find the following text in the file and edit the highlighted value to define the disk space of the image in Kbytes.
...
# Support WIC images with default wks from WKS_DEFAULT_FILE
# Reupdate WKS_DEFAULT_FILE if want to support another wks file.
WKS_SUPPORT ?= "1"
WKS_DEFAULT_FILE_rzv2h-dev = "rz-image-bootpart-mmc.wks"
WKS_DEFAULT_FILE_rzv2h-evk-alpha = "rz-image-bootpart-esd_rzv2h.wks"
WKS_DEFAULT_FILE_rzv2h-evk-ver1 = "rz-image-bootpart-esd_rzv2h.wks"
# Defines additional free disk space created in the image in Kbytes.
IMAGE_ROOTFS_EXTRA_SPACE = "8388608"
...
The table below shows examples of setting values written in local.conf file.
Note
If you have customized Linux, the disk image size may differ from the table.