The best solution for
starting your AI applications.
Provided by Renesas Electronics Corporation
This project is maintained by renesas-rz
Hosted on GitHub Pages — Theme by orderedlist
Equipment | Details | |
---|---|---|
Linux PC | Approximately 120GB free space is necessary. | |
OS | Ubuntu 20.04 LTS 64bit OS must be used. |
RTK0EF0180F*_linux-src.zip
) contains following files:File name | Description |
---|---|
README.txt | README file. |
rzv2h_ai-sdk_yocto_recipe_v*.tar.gz | Yocto recipe. Yocto recipes are text files that contains necessary information to build Yocto Linux. |
This step explains how to extract RZ/V2H AI SDK Source Code zip file.
WORK
with the below command.
printenv WORK
<path to the working directory>/ai_sdk_work
mkdir -p ${WORK}/src_setup
cd ${WORK}/src_setup
unzip <Path to the file>/RTK0EF0180F*_linux-src.zip -d ${WORK}/src_setup
ls -1 ${WORK}/src_setup
README.txt
rzv2h_ai-sdk_yocto_recipe_v3.00.tar.gz
This step explains how to build Linux environment with RZ/V2H AI SDK Source Code
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
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
export YOCTO_WORK=${WORK}/src_setup/yocto
mkdir -p ${YOCTO_WORK}
cd ${YOCTO_WORK}
tar zxvf ${WORK}/src_setup/rzv2h_ai-sdk_yocto_recipe_v*.tar.gz
Patch file link | Description |
---|---|
0001-recipes-debian-buster-glibc-Update-version-from-2.28.patch | patch file for fixing glibc link error |
0001-rz-common-recipes-debian-buster-glibc-update-to-v2.28-10+deb10u4.patch | patch file for fixing glibc link error |
61835_update_url_gst_common.patch | patch file for fixing codec library link error |
cp <Path to the file>/0001-recipes-debian-buster-glibc-Update-version-from-2.28.patch ${YOCTO_WORK}
cd ${YOCTO_WORK}/meta-renesas
patch -p1 < ../0001-recipes-debian-buster-glibc-Update-version-from-2.28.patch
cp <Path to the file>/0001-rz-common-recipes-debian-buster-glibc-update-to-v2.28-10+deb10u4.patch ${YOCTO_WORK}
cd ${YOCTO_WORK}/meta-renesas
patch -p1 < ../0001-rz-common-recipes-debian-buster-glibc-update-to-v2.28-10+deb10u4.patch
cp <Path to the file>/61835_update_url_gst_common.patch ${YOCTO_WORK}
patch -d ${YOCTO_WORK}/meta-rz-features/meta-rz-codecs -p1 < ${YOCTO_WORK}/61835_update_url_gst_common.patch
File name | Description |
---|---|
e-CAM22_CURZ*.patch | e-CAM22_CURZH camera driver (MIPI) Yocto patch file for RZ/V2H |
cp <Path to the file>/e-CAM22_CURZ*.patch ${YOCTO_WORK}
cd ${YOCTO_WORK}
patch -p1 -i e-CAM22_CURZ*.patch
ls -1 ${YOCTO_WORK}
0001-recipes-debian-buster-glibc-Update-version-from-2.28.patch
0001-rz-common-recipes-debian-buster-glibc-update-to-v2.28-10+deb10u4.patch
0001-tesseract.patch
61835_update_url_gst_common.patch
e-CAM22_CURZ*.patch
meta-econsys
meta-gplv2
meta-openembedded
meta-renesas
meta-rz-features
meta-virtualization
poky
oe-init-build-env
script in Poky and set environment variable TEMPLATECONF
to the below path.
cd ${YOCTO_WORK}
TEMPLATECONF=${PWD}/meta-renesas/meta-rzv2h/docs/template/conf/ source poky/oe-init-build-env
${YOCTO_WORK}/build/conf/bblayers.conf
(configration file for layers).
bitbake-layers add-layer ../meta-rz-features/meta-rz-graphics
bitbake-layers add-layer ../meta-rz-features/meta-rz-drpai
bitbake-layers add-layer ../meta-rz-features/meta-rz-opencva
bitbake-layers add-layer ../meta-rz-features/meta-rz-codecs
bitbake-layers add-layer ../meta-econsys
patch -p1 < ../0001-tesseract.patch
MACHINE=rzv2h-evk-ver1 bitbake core-image-weston
${YOCTO_WORK}/build/tmp/deploy/images/rzv2h-evk-ver1
directory.File name | Description |
---|---|
core-image-weston-rzv2h-evk-ver1.wic.bmap core-image-weston-rzv2h-evk-ver1.wic.gz |
WIC format SD card image |
MACHINE=rzv2h-evk-ver1 bitbake core-image-weston -c populate_sdk
${YOCTO_WORK}/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-rzv2h-evk-ver1-toolchain-*.sh
.File name | Description |
---|---|
poky-glibc-x86_64-core-image-weston-aarch64-rzv2h-evk-ver1-toolchain-*.sh | Cross compiler installer |
cd ${YOCTO_WORK}/build
MACHINE=rzv2h-evk-ver1 bitbake core-image-weston -c cleanall
MACHINE=rzv2h-evk-ver1 bitbake core-image-weston
MACHINE=rzv2h-evk-ver1 bitbake core-image-weston -c populate_sdk
You have prepared following files, which is same as the one provided in Step 3: Obtain RZ/V2H AI SDK in Getting Started, and you can run AI Applications according to Getting Started.
Path | File name | Description |
---|---|---|
${YOCTO_WORK}/build/tmp/deploy/images/rzv2h-evk-ver1 |
core-image-weston-rzv2h-evk-ver1.wic.bmap core-image-weston-rzv2h-evk-ver1.wic.gz |
WIC format SD card image |
${YOCTO_WORK}/build/tmp/deploy/sdk | poky-glibc-x86_64-core-image-weston-aarch64-rzv2h-evk-ver1-toolchain-*.sh | Cross compiler installer |
If you have any questions about AI SDK Source Code,
please add new issues to AI SDK GitHub issues.
Go to GitHub issues
This section explains how to prepare Graphics Library for unrestricted version, intead of evaluation version.
${WORK}/src_setup
" on your Linux PC.
cd ${WORK}/src_setup
ls -1
README.txt
RTK0EF0*ZJ-v*_rzv_*.zip
rzv2h_ai-sdk_yocto_recipe_v3.00.tar.gz
yocto
rm -rf ${YOCTO_WORK}/meta-rz-features/meta-rz-graphics
unzip RTK0EF0045Z14001ZJ*.zip
tar zxvf RTK0EF0045Z14001ZJ*/meta-rz-features_graphics_*.tar.gz -C ${YOCTO_WORK}
After this procedure, please proceed to Step 3-7 in How to build RZ/V2H AI SDK Source Code to start building Linux kernel files.
This section explains how to change the microSD card image size by changing the build settings of the WIC file.
${YOCTO_WORK}/build/conf/local.conf
file in a text editor.
...
# 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 = "1048576"
...
The table below shows examples of setting values written in local.conf
file.SD card image size (Gbytes) |
Setting values in the "local.conf" file (Kbytes) |
---|---|
4 | 1048576 (default) |
8 | 4194304 |
After this procedure, please proceed to Step 3-8 in How to build RZ/V2H AI SDK Source Code to build the Linux kernel files.
This section explains how to prepare Video Codec Library for H.264 Enc/Dec and H.265 Enc/Dec function.
${WORK}/src_setup
" on your Linux PC.
cd ${WORK}/src_setup
ls -1
README.txt
RTK0EF0192Z00001ZJ.zip
rzv2h_ai-sdk_yocto_recipe_v3.00.tar.gz
yocto
rm -rf ${YOCTO_WORK}/meta-rz-features/meta-rz-codecs
rm -rf ${YOCTO_WORK}/meta-rz-features/meta-rz-opencva
unzip RTK0EF0192Z00001ZJ.zip
tar xvf RTK0EF0192Z00001ZJ/meta-rz-features.tar.gz -C ${YOCTO_WORK}
cd ${YOCTO_WORK}
patch -p1 -d meta-renesas < ${WORK}/src_setup/RTK0EF0192Z00001ZJ/0001-rzv2h-conf-r9a09g057-Add-hwcodec-to-MACHINE_FEATURE.patch
After this procedure, please proceed to Step 3-7 in How to build RZ/V2H AI SDK Source Code to start building Linux kernel files.
gst-launch-1.0 v4l2src num-buffers=100 device=/dev/video0 ! videoconvert ! video/x-raw, format=NV12 ! omxh264enc control-rate=2 target-bitrate=10485760 interval_intraframes=14 periodicty-idr=2 ! video/x-h264, profile=\(string\)high, level=\(string\)4 ! h264parse ! video/x-h264, stream-format=avc, alignment=au ! qtmux ! filesink location=H264_MP4_file.mp4
gst-launch-1.0 filesrc location=H264_MP4_file.mp4 ! qtdemux ! h264parse ! omxh264dec ! waylandsink
gst-launch-1.0 v4l2src num-buffers=100 device=/dev/video0 ! videoconvert ! video/x-raw, format=NV12 ! omxh265enc control-rate=2 target-bitrate=10485760 interval_intraframes=14 ! video/x-h265, profile=\(string\)main, level=\(string\)5 ! h265parse ! qtmux ! filesink location=H265_MP4_file.mp4
gst-launch-1.0 filesrc location=H265_MP4_file.mp4 ! qtdemux ! h265parse ! omxh265dec ! waylandsink