This page explains how to build Linux with RZ/V2L AI SDK Source Code.
Supported version: RZ/V2L AI SDK v5.00
Introduction
AI SDK is a quick and easy AI Application development environment.
It is specifically made for RZ/V2L 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...).
Requirement
Users have launched RZ/V2L 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 110GB 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/V2L AI SDK Source Code
Download the RZ/V2L AI SDK Source Code from the link below.
AI SDK Source Code (RTK0EF0160F*_linux-src.zip) contains following files:
File name
Description
README.txt
README file.
rzv2l_ai-sdk_yocto_recipe_v*.tar.gz
Yocto recipe.
Yocto recipes are text files that contains necessary information to build Yocto Linux.
oss_pkg_rzv_v*.7z
OSS package.
OSS package is a set of Open Source Software source code used when building the Yocto Linux.
AI SDK Source Code provides this file to reproduce the same Linux environment provided in RZ/V2L AI SDK.
Step 2: Extract RZ/V2L AI SDK Source Code
This step explains how to extract RZ/V2L AI SDK Source Code zip file.
On your Linux PC, check you have already registered the environment variable WORK with the below command.
Check the working directory to confirm the package contents.
If the above command prints followings, the package is extracted correctly.
Step 3: Build RZ/V2L AI SDK Source Code
This step explains how to build Linux environment with RZ/V2L 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.
Check the working directory to confirm Yocto recipes content.
If the above command prints followings, Yocto recipes are extracted correctly.
Initialize a build using the oe-init-build-env script in Poky and set environment variable TEMPLATECONF to the below path.
Run the following commands to add necessary layers for AI application to ${YOCTO_WORK}/build/conf/bblayers.conf (configration file for layers).
Run the following commands to extract the OSS package.
Check the working directory to confirm the package contents.
If the above command prints followings, the package is extracted correctly.
Apply a patch file:
To add Tesseract Open Source OCR Engine for AI applications.
Not to use network connection during the build. (Necessary OSS source codes are already provided in AI SDK Source Code.)
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/smarc-rzv2l directory.
*1 Bootloader generated when using QSPI Bootloader
core-image-weston-smarc-rzv2l.tar.bz2
Root filesystem
Note
Either one of bootloaders(*1) will be generated based on your bootloader choice.
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 build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-smarc-rzv2l-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
Add setting HD(1280x720) to Weston in root filesystem.
Run the following commands to extract root filesystem.
Edit /nfs/tmp/etc/xdg/weston/weston.ini file with a text editor.
Before the editing, open it and check that followings are written in the file.
Add the following setting to the end of the file.
After adding the above, the result will be as shown below.
Save and close the file.
Run the following commands to recompress the root filesystem.
This is the end of how to build AI SDK Source Code.