0% found this document useful (0 votes)
193 views

R01us0398ej0116 RZ G

This document provides instructions for building software for RZ/G2 processors using the Yocto Project build system. It describes downloading required files, configuring the build environment, enabling multimedia and other functions, and building applications with bitbake. It also covers writing boot files to SPI flash memory using terminal software and dip switches.

Uploaded by

杉澤 佑樹
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views

R01us0398ej0116 RZ G

This document provides instructions for building software for RZ/G2 processors using the Yocto Project build system. It describes downloading required files, configuring the build environment, enabling multimedia and other functions, and building applications with bitbake. It also covers writing boot files to SPI flash memory using terminal software and dip switches.

Uploaded by

杉澤 佑樹
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

User’s Manual

Linux Interface
Specification
Yocto recipe Start-Up Guide
User’s Manual: Software
RZ/G2 group

All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).

www.renesas.com Rev.1.16 May. 31, 2023


How to Use This Manual
1. Purpose and Target Readers
This document is designed to provide the user with an understanding of the software development environment for
RZ/G2 Group processors. It is intended for users developing software incorporating the processors. A basic knowledge
of software development and Linux systems is necessary in order to use this document.

Particular attention should be paid to the precautionary notes when using the manual. These notes occur within
the body of the text, at the end of each section, and in the Usage Notes section.

The revision history summarizes the locations of revisions and additions. It does not list all revisions. Refer to the
text of the manual for details.

The following documents apply to the RZ/G2 Group. Make sure to refer to the latest versions of these documents.
The newest versions of the documents listed may be obtained from the Renesas Electronics Web site.

Document
Description Document Title Document No.
Type

Verified Linux Describes all basic steps to use Yocto build RZ/G Verified Linux R01TU0277EJxxxx
Package user’s environment with Verified Linux Package Package for 64bit kernel
manual Version 1.0.x Release
Note
Application Describes the procedure to develop application RZ/G2 Group Application R01US0429EJxxxx
note software with GStreamer and Qt Note
Describes build steps using Yocto build Linux Interface R01US0398EJxxxx
environment without Verified Linux Package Specification Yocto recipe
Start-Up Guide
Hardware Describes common specifications. RZ/G Series, 2nd R01UH0808EJ0100
user’s manual Generation User's
Manual: Hardware
2. List of Abbreviations and Acronyms

Abbreviation Description
AHCl Advanced Host Controller Interface
ALSA Advanced Linux Sound Architecture
ATA Advanced Technology Attachment
BSP Board Support Package
CPRM Content Protection for Recordable Media
DMA Direct Memory Access
DMAC DMA Controller
DRM Direct Rendering Manager
DU Display Unit on RZ/G
EHCI Enhanced Host Controller Interface
eMMC Embedded Multi Media Card
FB Framebuffer
GLSL OpenGL Shading Language
GPIO General Purpose Input/Output interface
GPL GNU General Public License
gPTP Generalized Precision Time Protocol
GUI Graphical User Interface
HSCIF High Speed Serial Communications Interface with FIFO
I2C Inter-Integrated Circuit
LGPL GNU Lesser General Public License
MMC Multi Media Card
MMCIF Multi Media Card Interface H/W module
MMP Multi Media Package
MSIOF Clock-Synchronized Serial Interface with FIFO
MTD Memory Technology Device
NCQ Native Command Queuing
OHCI Open Host Controller Interface
OSS Open Source Software
PCI Peripheral Component Interconnect
PCIe PCI Express
PCIEC PCIe host controller
PCM Pulse Code Modulation
PTP Precision Time Protocol
QSPI Quad Serial Peripheral Interface
SATA Serial Advanced Technology Attachment
SCIF Serial Communications Interface with FIFO
SD Secure Digital
SDIO Secure Digital Input/Output
SPI Serial Peripheral Interface
SRC Sampling Rate Converter
SSI Serial Sound Interface
USB Universal Serial Bus
V4L2 Video for Linux2
VLP Verified Linux Package
VSPD VSP for DU
xHCI Extensible Host Controller Interface

3. Conventions

Command line run on Linux host PC will be shown as below:

$ echo "This is command line run on x86-64 Linux PC"

Command line run on target board will be shown as below:

# echo "This is command line run on ARM board"

File content will be shown as below:

<$WORK/a script>
#!/bin/bash
echo "This is content in a file"
Table of Contents
Introduction ............................................................................................................................................ 1

1. RZ/G2 Linux BSP package files ........................................................................................................ 2


1.1 Reference (RZ/G2).................................................................................................................................................... 2
1.2 Environmental Requirement ..................................................................................................................................... 3

2. Building Instructions .......................................................................................................................... 5


Step 1 installation of required commands ................................................................................................................ 5
Step 2 download of required files ................................................................................................................................ 5
Step 3 checkout ................................................................................................................................................................ 6
Step 4 copy proprietary software into recipe directory structure ....................................................................... 6
Step 5 execute source command ................................................................................................................................ 7
Step 6 copy bblayers.conf and local.conf ................................................................................................................. 7
Step 7 enable Multimedia package .............................................................................................................................. 7
Step 8 enable/disable other functions ........................................................................................................................ 9
Step 9 building with bitbake ........................................................................................................................................ 10

3. Writing of IPL/Secure ...................................................................................................................... 11


3.1 Writing data ............................................................................................................................................................ 11
3.2 Dip-Switch .............................................................................................................................................................. 11
3.3 Switch setting for EK874 (RZG2E) ........................................................................................................................ 11
3.4 Switch setting for HiHope-RZG2M, HiHope-RZG2N and HiHope-RZG2H ......................................................... 11
3.5 How to write ........................................................................................................................................................... 12
Step 1 connect cable ..................................................................................................................................................... 12
Step 2 setting the terminal software ......................................................................................................................... 12
Step 3 write data file to SPI Flash .............................................................................................................................. 12
3.6 IPL/Secure write ..................................................................................................................................................... 13

4. Confirm starting of U-Boot and Linux ............................................................................................ 14


Step 1 setting Linux Host PC ...................................................................................................................................... 14
Step 2 connect cable ..................................................................................................................................................... 14
Step 3 setting the terminal software ......................................................................................................................... 14
Step 4 write U-Boot to SPI Flash ................................................................................................................................ 14
Step 5 set U-Boot environment variables ................................................................................................................ 14
Step 6 change the bootargs by U-Boot .................................................................................................................... 15
Step 7 save environment variables ........................................................................................................................... 15
Step 8 set file system .................................................................................................................................................... 15
Step 9 start Linux ........................................................................................................................................................... 16

5. Exporting Toolchains ....................................................................................................................... 17


Step 1 configure architectures of Host PC which are installed this toolchain .............................................. 17
Step 2 building toolchain package with bitbake .................................................................................................... 18
Step 3 Install toolchain on each Host PCs .............................................................................................................. 18
Step 4 setup environment variables for each compilation on each Host PCs ............................................... 18

6. Memory map .................................................................................................................................... 19

7. U-Boot command ............................................................................................................................. 30

8. System Service ................................................................................................................................. 31


8.1 Watchdog Service ................................................................................................................................................... 31
8.2 Video Input Initializing Service .............................................................................................................................. 32
Linux Interface Specification Yocto recipe Start-Up Guide

Introduction

This start-up guide explains RZ/G2 Group Yocto recipe package files, the system environments, the make method of
kernel, the operating of U-Boot and so on.

This product RZ/G2 Yocto recipe is a basic package to operate built-in Linux and basic middleware on the RZ/G2
System Evaluation Board. Please contact Renesas Electronics person who provided this product to you in case of
questions.

Note: Currently, RZ/G2E, RZ/G2M v1.3, RZ/G2M v3.0, RZ/G2N and RZ/G2H, with reference boards EK874 (Revision
C and E), HiHope-RZG2M, HiHope-RZG2N and HiHope-RZG2H are supported.

R01US0398EJ0116 Rev.1.16 Page 1 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

1. RZ/G2 Linux BSP package files


This Yocto recipe will be taken

The Initial Program Loader source code from:

https://github.com/renesas-rz/rzg_trusted-firmware-a, branch=v2.8/rzg2

The U-Boot source code from:

https://github.com/renesas-rz/renesas-u-boot-cip.git, branch=v2021.10/rzg2

RZ/G2 Linux source code from:

https://github.com/renesas-rz/rz_linux-cip,branch=rzg2-cip94
https://github.com/renesas-rz/rz_linux-cip,branch=rzg2-cip94-rt29

1.1 Reference (RZ/G2)


Document name Version
RZ/G2 Series User’s Manual: Hardware ---

RZ/G2 System Evaluation Board Hardware Manual ---

R01US0398EJ0116 Rev.1.16 Page 2 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

1.2 Environmental Requirement


Host PC and terminal software are necessary for the operation of this product. Furthermore, Ethernet cable is required to
use NFS mount function. Please refer to Table 1.

Table 1 RZ/G2 Linux BSP Environmental Requirement

Equipment Explanation
Linux Host PC Ubuntu 18.04 LTS (64bit) (*) is recommended as OS. 32bit version is not supported.
It is used as building and debugging environment.
It is used as TFTP server and NFS server.
Windows Host PC Windows 10 is recommended as OS.
It is used as debugging environment.
Terminal software and VCP driver are executed.
Terminal software Please use following software.
1) Tera Term
(Confirmed with Japanese version of Tera Term 4.88
Available at http://sourceforge.jp/projects/ttssh2 )
VCP driver Please install in Windows Host PC.
Execute CP210xVCPInstaller_x86/x64.exe for install before connect. USB become virtual
COM port on terminal software. Please connect to Serial-USB Bridge on RZG2 System
Evaluation Board
(Available at
http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx)
TFTP server software It is used when SPI Flash is written by U-Boot or Image is downloaded.

NFS server software It is used when File system is mounted by NFS.

(*) There will be a warning like “WARNING: Host distribution "ubuntu-18.04" has not been validated with this
version of the build system”. However, it can be safely used to build system.

R01US0398EJ0116 Rev.1.16 Page 3 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Recommended Environment

The following shows a Recommended Environment.

Hub

(Straight Ethernet cable)

Straight Ethernet cable

RZ/G2

System Evaluation Board


USB cable (type A
to mini/micro AB)

[Linux Host PC]

TFTP server

NFS server

[Windows 10 Host PC]

Terminal software to display console

(ssh to control Linux Host)

Figure 1. Recommended Environment for RZ/G2 Linux BSP

Note) Functions in covered with () are optional.

R01US0398EJ0116 Rev.1.16 Page 4 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

2. Building Instructions
You can build BSP by using Yocto Project. Please execute following steps in ${WORK} directory on Linux Host PC.
Filesystem by making following instruction is the one for testing current BSP package in Renesas. Please note that
Renesas has not been verified with any other build configuration or modified recipes except “core-image-weston”
configuration which is based on upstream Yocto Project deliverables and some additional packages correspond to
gstreamer.

Note) Renesas executed following instructions with clean ${WORK}/build directory. You may use wipe-sysroot and/or
bitbake -c cleansstate to reflect modifications of configuration files for Recipe as in open source Yocto Project’s
standards, however Renesas strongly recommends to use recipe with clean ${WORK}/build directory for each
configurations because there are some implicit dependency for header files exist to keep compatibility between
application build scheme with/without proprietary software.

Step 1 installation of required commands

Ubuntu is used as Linux Host PC since Yocto Project Quick Start specifies Ubuntu as one of the distribution. In case of
that you can install the required commands as follows.
Please refer to http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html for detail.

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev xterm cpio python python3 \
python3-pip python3-pexpect xz-utils debianutils iputils-ping libssl-dev

Note) There is a bitbake command in ${WORK}/poky/scripts/. Command path is available after step 6.

Note) When you use terminal interactions to build such as menuconfig under non-X terminal (ssh, etc.), please install
“screen” command package to Host PC.

Note) Please set up user name and e-mail in Git. You can set up with ‘git config --global’. Please refer to online manual
for git command.

Note) In Renesas environment, Ubuntu version is 18.04 LTS and git version is 2.7.4.

Step 2 download of required files

Required files (poky, meta-linaro) are downloaded by git clone.

$ cd ${WORK}
$ git clone git://git.yoctoproject.org/poky
$ git clone git://git.linaro.org/openembedded/meta-linaro.git
$ git clone git://git.openembedded.org/meta-openembedded
$ git clone https://github.com/renesas-rz/meta-rzg2.git
$ git clone https://git.yoctoproject.org/meta-gplv2
$ git clone https://github.com/meta-qt5/meta-qt5.git

R01US0398EJ0116 Rev.1.16 Page 5 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Step 3 checkout

Please checkout available version of each git clone.

$ cd ${WORK}/poky
$ git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc

$ cd ${WORK}/meta-linaro
$ git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885

$ cd ${WORK}/meta-openembedded
$ git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23

$ cd ${WORK}/meta-gplv2
$ git checkout -b tmp f875c60ecd6f30793b80a431a2423c4b98e51548

$ cd ${WORK}/meta-qt5
$ git checkout -b tmp c1b0c9f546289b1592d7a895640de103723a0305

$ cd ${WORK}/meta-rzg2
$ git checkout -b tmp <tag>

<tag> : please check and choose the latest tag by ‘git tag’
$ git tag
….
BSP-1.0.15-RT
BSP-1.0.16
….
“-RT” is for Linux Realtime support

Note) tmp is a temporary name of a local branch. We can use checkout command without branch. Please note that HEAD
refers directly to commit (detached HEAD).

Step 4 copy proprietary software into recipe directory structure

To use licensed 3D graphics software and Multimedia package from Renesas, please copy deliverables of those software
into recipe directory structure. Renesas provide shell script to copy those software.

Copy All Proprietary Software Packages to ${PKGS_DIR}:


$ mkdir ${PKGS_DIR}
$ cp <zip of Proprietary Software Package> ${PKGS_DIR}
Install them into recipe directory structure by shell script:
$ cd ${WORK}/meta-rzg2
$ sh docs/sample/copyscript/copy_proprietary_softwares.sh ${PKGS_DIR}

Note) Subdirectory is not supporting in ${PKGS_DIR}. Please store all packages on the root of ${PKGS_DIR}.
Note) Please use regular alphanumeric file name ([A-Za-z0-9_] e.g.) for ${PKGS_DIR} due to restrictions of current
copy script.

R01US0398EJ0116 Rev.1.16 Page 6 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Step 5 execute source command

Please execute source command with oe-init-build-env for setting environment.

$ cd ${WORK}
$ source poky/oe-init-build-env

Step 6 copy bblayers.conf and local.conf

Please copy configuration files from deliverables.

$ cp ${WORK}/meta-rzg2/docs/sample/conf/<supported board
name>/<toolchain>/*.conf ./conf/.

Note) <supported board name> is the one of the following: ek874, hihope-rzg2m, hihope-rzg2n, hihope-rzg2h.
<toolchain> is the one of the following: poky-gcc, linaro-gcc

Step 7 enable Multimedia package

Please modify configurations in ${WORK}/build/conf/local.conf by following instructions.

The following standard multimedia packages are enabled

No. Functions Explanation

1 MMNGR Memory manager driver & shared libraries

2 VSPM VSP driver & FDP driver & shared libraries

3 VSP2 VSP2 driver

4 OMX OMX common parts

To enable optional multimedia functions, please add DISTRO_FEATURES_append to ${WORK}/build/conf/local.conf


as DISTRO_FEATURES_append = “ <function name>”.

Note) These configurations exist near the end of local.conf.


Note) DISTRO_FEATURES_append are commented out by the default. To enable functions, please uncomment it.

For example
[Disable]
#DISTRO_FEATURES_append = " h264dec_lib"

[Enable (default)]
DISTRO_FEATURES_append = " h264dec_lib”

R01US0398EJ0116 Rev.1.16 Page 7 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

The following list is package name to enable/disable as optional multimedia functions

Default
No. Function name Explanation
value

1 h264dec_lib Enable H264 decoder library


RTM0AC0000XV264D30SL41C
2 h264enc_lib Enable H264 encoder library
RTM0AC0000XV264E30SL41C
3 h265dec_lib Enable H265 decoder library
RTM0AC0000XV265D30SL41C

The following list is dependent package name

No. Function name Type Name Dependent Packages

RTM0AC0000XVCMND30SL41C
1 h264dec_lib RTM0AC0000XV264D30SL41C RTM0AC0000XCMCTL30SL41C
RCG3VUDRL4101ZDO
RTM0AC0000XVCMNE30SL41C
2 h264enc_lib RTM0AC0000XV264E30SL41C RTM0AC0000XCMCTL30SL41C
RCG3VUDRL4101ZDO

RTM0AC0000XVCMND30SL41C
3 h265dec_lib RTM0AC0000XV265D30SL41C RTM0AC0000XCMCTL30SL41C
RCG3VUDRL4101ZDO

R01US0398EJ0116 Rev.1.16 Page 8 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Step 8 enable/disable other functions

Please modify configurations in ${WORK}/build/conf/local.conf by following instructions.

Default
No. Function How to
support
Default in local.conf:
INCOMPATIBLE_LICENSE = "GPLv3 GPLv3+"
Support GPLv3,
1 No
GPLv3+ softwares
To enable:
#INCOMPATIBLE_LICENSE = "GPLv3 GPLv3+"
Default in local.conf:
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "armv7vethf-neon-vfpv4"
USE_32BIT_PKGS = "1"
Support 32 bits
2 Yes
application
To disable:
#require conf/multilib.conf
#MULTILIBS = "multilib:lib32"
#DEFAULTTUNE_virtclass-multilib-lib32 = "armv7vethf-neon-vfpv4"
#USE_32BIT_PKGS = "1"
Default in local.conf without support GPLv3, GPLv3+ softwares:
CIP_MODE = “Buster-full"
#BBMASK_append_cipcore = "|perl_debian”
INCOMPATIBLE_LICENSE = "GPLv3 GPLv3+"

To switch to:
• Buster-full with support GPLv3, GPLv3+ softwares:
Support CIP Core CIP_MODE = “Buster-full"
(Buster-full, Buster- #BBMASK_append_cipcore = "|perl_debian”
3 Buster-full
limited, Jessie or #INCOMPATIBLE_LICENSE = "GPLv3 GPLv3+"
None) • Buster-limited:
CIP_MODE = “Buster-limited"
• Jessie:
CIP_MODE = “Jessie"
• None:
CIP_MODE = “None"
or
#CIP_MODE = “Buster-full"
Default in local.conf:
#MACHINE_FEATURES_append = " docker"
4 Support Docker No
To enable:
MACHINE_FEATURES_append = " docker"
Default in local.conf:
Support Realtime No description about Realtime kernel
5 No
Kernel To enable:
IS_RT_BSP = "1"

R01US0398EJ0116 Rev.1.16 Page 9 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Step 9 building with bitbake

Please build as follows. The file system (<core-image-target>-<supported board name>.tar.bz2) is created in
${WORK}/build/tmp/deploy/images/<supported board name>/ directory.

Note) <supported board name> is the one of the following: ek874, hihope-rzg2m, hihope-rzg2n, hihope-rzg2h.
<core-image-target> is the one of the following: core-image-bsp, core-image-weston, core-image-qt, core-image-hmi

Note) Build by bitbake might need several hours under the influence of Linux Host PC performance and network
environment.

Note) The bitbake downloads some package while building. Then the bitbake might stop for network timeout or link
error. In this case, please get applicable package in ${WORK}/build/downloads directory whenever build stops by wget
command, or please review timeout definitions of package download (wget, etc.) described in
${WORK}/poky/meta/conf/bitbake.conf.

$ cd ${WORK}/build
$ bitbake <core-image-target>

<core-image-target> can be:


core-image-bsp : basic BSP suport
core-image-weston : BSP with MMP and Graphic support
core-image-qt : BSP with MMP, Graphic and Qt support
core-image-hmi : BSP with MMP, Graphic and hmi demos

R01US0398EJ0116 Rev.1.16 Page 10 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

3. Writing of IPL/Secure
3.1 Writing data
Filename Program Top Flash Save Description
Address Address
bootparam_sa0.srec 0xE6320000 0x000000 Loader(Boot parameter)
bl2-<board>.srec 0xE6304000 0x040000 Loader
cert_header_sa6.srec 0xE6320000 0x180000 Loader(Certification)
bl31-<board>.srec 0x44000000 0x1C0000 ARM Trusted Firmware
tee-<board>.srec 0x44100000 0x200000 OP-Tee
u-boot-elf-<board>.srec 0x50000000 0x300000 U-Boot

Note) <board>: ek874, hihope-rzg2m, hihope-rzg2n, hihope-rzg2h.

3.2 Dip-Switch

3.3 Switch setting for EK874 (RZG2E)


a) SCIF Download Mode

Switch Pin1 Pin2 Pin3 Pin4 Pin5 Pin6


Number
SW12 OFF OFF OFF - - -

b) Boot Mode

Switch Pin1 Pin2 Pin3 Pin4 Pin5 Pin6


Number
SW12 ON ON ON - - -

3.4 Switch setting for HiHope-RZG2M, HiHope-RZG2N and HiHope-RZG2H


a) SCIF Download Mode

Switch Pin1 Pin2 Pin3 Pin4 Pin5 Pin6 Pin7 Pin8


Number
SW1002 ON ON ON ON OFF OFF OFF OFF

b) Boot Mode

Switch Pin1 Pin2 Pin3 Pin4 Pin5 Pin6 Pin7 Pin8


Number
SW1002 ON ON ON ON ON OFF ON ON

R01US0398EJ0116 Rev.1.16 Page 11 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

3.5 How to write


Please connect RZ/G2 System Evaluation Board, Windows Host PC with terminal software for console and Linux Host
PC.

Step 1 connect cable

Connect USB Host connector of Windows Host PC that is virtual COM port to RZ/G2 System Evaluation Board with
USB cable for displaying console.

Step 2 setting the terminal software

Activate the Terminal Software on Windows Host PC. Configure the Terminal Software on Windows Host PC as
followings. Please refer to Table 1 about the VCP driver for making a USB host connector into a virtual COM port.

[setting value] baud rate 115200, 8bit data, parity none, stop 1 bit, flow control none.

Step 3 write data file to SPI Flash

A file is written in SPI Flash in the following procedures.

• Set dip switch “SCIF download mode”.


• Reset board then start SCIF download mode.
• After “Please send !” displayed, In case of Tera Term, transmit file
AArch64_Flash_writer_SCIF_DUMMY_CERT_E6300400_<board_name>.mot which is stored in
${WORK}/build/tmp/deploy/images/<board_name>, by "File -> Send file (S)".
• Execute xls2 command (load program to flash).

SCIF Download mode (w/o verification)


(C) Renesas Electronics Corp.

-- Load Program to SystemRAM ---------------


please send !

RZ/G2 Scif Download MiniMonitor V1.00 2019.04.12


Work Memory : SystemRAM
Board Judge : Used Board-ID
Board Name : HiHope RZ/G2M
Product Code : RZ/G2M ES1.1
>xls2
===== Qspi/HyperFlash writing of Gen3 Board Command =============
Load Program to Spiflash
Writes to any of SPI address.
Winbond : W25M512JV
Program Top Address & Qspi/HyperFlash Save Address
===== Please Input Program Top Address ============
Please Input : H'

• After "Please Input Program Top Address" is displayed, input Program Top Address in 3.1 and "Enter".
• After "Please Input Qspi/HyperFlash Save Address" is displayed, input Flash Save Address in 3.1 and "Enter".

R01US0398EJ0116 Rev.1.16 Page 12 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

• After "Please send ! ('.' & CR stop load)" is displayed, In case of Tera Term, transmit files in 3.1 by "File -> Send file
(S)".
• If there are some data in writing area, "SPI Data Clear(H'FF) Check :H'00000000-0003FFFF Clear OK?(y/n)" is
displayed. Then input "y".
• After "SAVE SPI-FLASH ....... complete!" is displayed, the prompt returns. It means finish.
• Please repeat the xls2 command, if other files are written.
• Power OFF.
• Set dip switch to “Boot Mode”.

3.6 IPL/Secure write


Please write the file described in Chapter 4.1 to SPI Flash.

The data file is stored in the ${WORK}/build/tmp/deploy/images/<board_name> directory.

R01US0398EJ0116 Rev.1.16 Page 13 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

4. Confirm starting of U-Boot and Linux


Please connect RZ/G2 System Evaluation Board, Windows Host PC with terminal software for console and Linux Host
PC with TFTP and NFS server as Figure 1. Then please confirm normal starting of U-Boot and Linux with following
step. Please refer to 2.2 for dip switch setting.

Step 1 setting Linux Host PC

Please install TFTP server and NFS server in Linux Host PC with apt-get command and so on. Please set
/etc/xinetd.d/tftp of TFTP server and /etc/exports of NFS server according to your environment.

Step 2 connect cable

Connect USB Host connector of Windows Host PC that is virtual COM port to RZ/G2 System Evaluation Board with
USB cable for displaying console.

Step 3 setting the terminal software

Activate the Terminal Software on Windows Host PC. Configure the Terminal Software on Windows Host PC as
followings. Please refer to Table 1 about the VCP driver for making a USB host connector into a virtual COM port.

[setting value] baud rate 115200, 8bit data, parity none, stop 1 bit, flow control none.

Step 4 write U-Boot to SPI Flash

Filename Program Top Address Flash Save Address Description


u-boot-elf-*.srec 0x50000000 0x300000 U-Boot
Note) *: ek874, hihope-rzg2m, hihope-rzg2n, hihope-rzg2h.

The data file is stored in the ${WORK}/build/tmp/deploy/images/<board_name> directory.


Refer to Chapter 4.3 Step3 for write procedure.

Step 5 set U-Boot environment variables

Please refer to 2.2 for dip switch setting.

Please start U-Boot by board reset. Please set and save environment variable as follows.

=> setenv ethaddr xx:xx:xx:xx:xx:xx


=> setenv ipaddr 192.168.0.20
=> setenv serverip 192.168.0.1
=> setenv bootcmd 'tftp 0x48080000 Image;tftp 0x48000000 Image-
<SOC_FAMILY>-<Device_Tree>;booti 0x48080000 - 0x48000000'

Note) <SOC_FAMILY> is the following: r8a774c0, r8a774a1, r8a774a3, r8a774b1, r8a774e1.

Note) For RZ/G2E (SOC_FAMILY r8a774c0), the device trees are as follow:
R01US0398EJ0116 Rev.1.16 Page 14 of 32
May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

- Image-r8a774c0-ek874*.dtb. (for the Board Revision E)

- Image-r8a774c0-ek874-revc*.dtb. (for the Board Revision C)

- Image-r8a774c0-es10-ek874*.dtb. (for the oldest version of LSI)

Note) For RZ/G2M v1.3 (SOC_FAMILY r8a774a1), the device trees are as follow:

- Image-r8a774a1-hihope-rzg2m-ex*.dtb (for latest version of Board)

- Image-r8a774a1-hihope-rzg2m-rev2-ex*.dtb (for an older version of Board)

Note) For RZ/G2M v3.0 (SOC_FAMILY r8a774a3), the device trees are as follow:

- Image-r8a774a3-hihope-rzg2m-ex*.dtb (for latest version of Board)

Note) For RZ/G2N (SOC_FAMILY r8a774b1), the device trees are as follow:

- Image-r8a774b1-hihope-rzg2n-ex*.dtb (for latest version of Board)

- Image-r8a774b1-hihope-rzg2n-rev2-ex*.dtb (for an old version of Board)

Note) For RZ/G2H (SOC_FAMILY r8a774e1), the device trees are as follow:

Image-r8a774e1-hihope-rzg2h-ex*.dtb (for latest version of Board)

Step 6 change the bootargs by U-Boot

To change bootargs which passed to the kernel in boot sequence, please modify it by “setenv bootargs” command of U-
Boot.

=> setenv bootargs 'rw root=/dev/nfs nfsroot=192.168.0.1:/export/rfs


ip=192.168.0.20'

Step 7 save environment variables

=> saveenv

Step 8 set file system

Please extract file system (core-image-weston(bsp|qt|hmi)-<supported board name>.tar.bz2). Please export /export
directory of NFS server.

$ mkdir /export/rfs
$ cd /export/rfs
$ sudo tar xvf core-image-weston(bsp|qt|hmi)-<supported board
name>.tar.bz2

R01US0398EJ0116 Rev.1.16 Page 15 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Note) <supported board name> is the following: ek874, hihope-rzg2m, hihope-rzg2n, hihope-rzg2h.

Step 9 start Linux

After board reset, U-Boot is started. After countdown, Linux boot messages are displayed. Please confirm login prompt
after Linux boot messages.

Note) When MAC Address is rewritten, it is necessary to reset.

R01US0398EJ0116 Rev.1.16 Page 16 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

5. Exporting Toolchains
Please refer Documents from Yocto Project to export Toolchains such as
http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html.
And please use build target of bitbake as “core-image-weston(qt)-sdk -c populate_sdk” to generate package.

Note) When you use “ld” directly but not via gcc (in case of building Kernel, Driver or U-Boot), please disable
LDFLAGS with ‘unset LDFLAGS’. Furthermore, in kernel build, ‘make menuconfig’ occurs error by ncurses. In this
case, please set PKG_CONFIG_PATH and disable PKG_CONFIG_SYSROOT_DIR.

$ export PKG_CONFIG_PATH=$OECORE_NATIVE_SYSROOT/usr/lib/pkgconfig
$ unset PKG_CONFIG_SYSROOT_DIR

Note) Please do not use same shell environment to other compilation/debugging purpose (also make menuconfig of linux
kernel, e.g.) but cross compilation for RZ/G2E|G2M|G2N|G2H which shell environment with “source” command to
setup environment variables for the SDK. Because some environment variables for cross compilation interferes execution
of other tools on the same shell environment.

Example of instruction:

In following examples, it’s assumed that it’s already extracted and prepared recipe environment such as in the
instructions of Section 3 (must done just before execution of bitbake, at least). You may reuse ${WORK}/build while
you reuse same configuration after executing bitbake as in Section 3 for this purpose.

Step 1 configure architectures of Host PC which are installed this toolchain

Please modify SDKMACHINE description on ${WORK}/build/conf/local.conf.

On ${WORK}/build/conf/local.conf

# This variable specified the architecture to build SDK/ADT items for and means
# you can build the SDK packages for architectures other than the machine you are
# running the build on (i.e. building i686 packages on an x86_64 host.
# Supported values are i686 and x86_64
#SDKMACHINE ?= "i686"
SDKMACHINE ?= "x86_64"

Note) 32bit Ubuntu is not supported.


Ubuntu 16.04 and Ubuntu 18.04 can be used to build BSP and SDK, but when install SDK should use Ubuntu 18.04.
(If install SDK to Ubuntu 16.04, an error will appear. If ignore that error, installed SDK can still be used to build user
applications, but building kernel or kernel modules is not possible)

R01US0398EJ0116 Rev.1.16 Page 17 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Step 2 building toolchain package with bitbake

$ cd ${WORK}/build
$ bitbake core-image-weston(qt)-sdk -c populate_sdk
$ cp tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston(qt)-sdk-
aarch64-toolchain-2.4.3.sh (shared dir. where able to access from each Host
PCs)

Note) Please perform “bitbake core-image-minimal -c populate_sdk” in BSP Only.

Step 3 Install toolchain on each Host PCs

$ sudo (shared dir. where able to access from each Host PCs)/poky-glibc-
x86_64-core-image-weston(qt)-sdk-aarch64-toolchain-2.4.3.sh

[sudo] password for (INSTALL person): (password of your account)


Enter target directory for SDK (default: /opt/poky/2.4.3): (just a return)
Extracting SDK...done
Setting it up...done

When it request to re configure please just enter to keep default value

Compile also drivers which will not load (COMPILE_TEST) [N/y/?] <Enter>
Local version - append to kernel release (LOCALVERSION) [-yocto-standard] -yocto-
standard
Automatically append version information to the version string
(LOCALVERSION_AUTO) [Y/n/?] <Enter>

SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the
environment setup script e.g.
$ . /opt/poky/2.4.3/environment-setup-aarch64-poky-linux
$ . /opt/poky/2.4.3/environment-setup-armv7vehf-neon-pokymllib32-linux-gnueabi

Step 4 setup environment variables for each compilation on each Host PCs

Please setup environment variables as follows or integrate set-up sequence into your build script or Makefile.

$ cd (Your working directory)


$ source /opt/poky/2.4.3/environment-setup-aarch64-poky-linux
$ export LDFLAGS=””
$ ${CC} (Your source code).c …..

R01US0398EJ0116 Rev.1.16 Page 18 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

6. Memory map
Following from Figure 2 to Figure 6 show memory map of this RZ/G2E|G2M|G2N|G2H Linux BSP package.

Note)

- The volume of SDRAM is total 2GB (RZ/G2E System Evaluation Board EK874), 4GB (RZ/G2M System
Evaluation Board HiHope-RZG2M), 4GB (RZ/G2N System Evaluation Board HiHope-RZG2N), 4GB (RZ/G2H
System Evaluation Board HiHope-RZG2H).

- 2GB from 0x00_4000_0000 to 0x00_BFFF_FFFF is a shadow area from 0x04_0000_0000 to 0x04_7FFF_FFFF.

- The following regions are used as a secure region. It doesn’t allow U-Boot and kernel to access those regions.

➢ 63MB from 0x00_43F0_0000 to 0x00_47DF_FFFF in SDRAM

➢ 16KB from 0x00_E630_0000 to 0x00_E630_3FFF in System RAM

- In case the configuration of BSP + 3D Graphics + Multimedia package, it doesn't allow to store any data in
"CMA for Lossy comp" (default: 0x00_5400_0000 - 0x00_56FF_FFFF) region which is for media playback
before kernel boots up. Any data stored in this region are read through the decompression module in AXI-
Bus, so a normal data (not a decoded frame) will be corrupted.

R01US0398EJ0116 Rev.1.16 Page 19 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address
0x0 0x00_4000_0000
BSC
Option
0x00_2000_0000 0x00_43F0_0000
Reserved Certification
0x00_3000_0000 Secure
PCI-exp ARM Trusted Firmware
Region
0x00_4000_0000
SDRAM 2GB 0x00_47E0_0000
0x00_8000_0000
Legacy 0x00_4800_0000
0x00_5000_0000
U-Boot
0x00_C000_0000
Reserved
0x00_E000_0000
IO area
0x01_0000_0000 Shadow area

~ ~
0x04_0000_0000
SDRAM 2GB 0x00_C000_0000
0x04_4000_0000

0x04_8000_0000

N/A

0x05_0000_0000

N/A

0x06_0000_0000

N/A

System RAM SPI Flash


Load by Boot
0x00_E630_0000 ROM program
0x06_8000_0000 0x0
Secure Boot parameter
Region Boot parameter 0x040000
N/A IPL
IPL
0x180000
0x07_0000_0000 Certification
0x1C0000
ARM Trusted
Firmware

N/A 0x300000
U-Boot

0x08_0000_0000

Figure 2. RZ/G2E System Evaluation Board EK874 memory map (Boot)

R01US0398EJ0116 Rev.1.16 Page 20 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address
0x0 0x00_4000_0000
BSC
Option
0x00_2000_0000 0x00_43F0_0000
Reserved Certification
0x00_3000_0000 Secure
PCI-exp Region ARM Trusted Firmware
0x00_4000_0000
SDRAM 2GB 0x00_47E0_0000
Legacy 0x00_4800_0000
0x00_8000_0000 dtb
0x00_4808_0000
0x00_C000_0000 Kernel Image
Reserved
0x00_E000_0000
IO area
0x01_0000_0000 Shadow area

~ ~ 0x00_5020_0000

0x04_0000_0000
SDRAM 2GB
0x00_5400_0000
0x04_4000_0000
0x00_5700_0000
0x04_8000_0000 0x00_5800_0000
CMA
CMA(256MB)
256 MB
N/A
0x00_6800_0000
CMA for MMP 128 MB
0x05_0000_0000

N/A

0x00_C000_0000
0x06_0000_0000

N/A

0x06_8000_0000

N/A

0x07_0000_0000

N/A

0x08_0000_0000

Figure 3. RZ/G2E System Evaluation Board EK874 memory map (Linux)

R01US0398EJ0116 Rev.1.16 Page 21 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address
0x0 0x00_4000_0000
BSC
Option
0x00_2000_0000 0x00_43F0_0000
Reserved Certification
0x00_3000_0000 Secure
PCI-exp ARM Trusted Firmware
Region
0x00_4000_0000 OP-Tee
SDRAM 2GB 0x00_47E0_0000
Legacy 0x00_4800_0000

0x00_C000_0000
Reserved
0x00_E000_0000
IO area 0x00_5000_0000
0x01_0000_0000 U-Boot
Shadow area

~ ~
0x04_0000_0000
SDRAM 2GB

0x04_8000_0000

N/A Load by
IPL
0x05_0000_0000

N/A

0x06_0000_0000
SDRAM 2GB
0x00_C000_0000

System RAM Hyper Flash


Load by Boot
0x00_E630_0000 ROM program
0x06_8000_0000 0x0
Secure Boot parameter
Region Boot parameter 0x040000
N/A IPL
IPL
0x180000
0x07_0000_0000 Certification
0x1C0000
ARM Trusted
Firmware

N/A 0x300000
U-Boot

0x08_0000_0000

Figure 4. RZ/G2M System Evaluation Board (HIHOPE-RZG2M) memory map (Boot)

R01US0398EJ0116 Rev.1.16 Page 22 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address
0x0 0x00_4000_0000
BSC
Option
0x00_2000_0000 0x00_43F0_0000
Reserved Certification
0x00_3000_0000 Secure
PCI-exp Region ARM Trusted Firmware
0x00_4000_0000 OP-Tee
SDRAM 2GB 0x00_47E0_0000
Legacy 0x00_4800_0000
dtb
0x00_4808_0000
0x00_C000_0000 Kernel Image
Reserved
0x00_E000_0000
IO area
0x01_0000_0000 Shadow area

~ ~
0x04_0000_0000
SDRAM 2GB
0x00_5400_0000
CMA for Lossy comp
(48MB)
0x00_5700_0000
0x00_5800_0000
0x04_8000_0000

CMA
N/A
(512MB)

0x05_0000_0000
0x00_7800_0000
CMA for MMP
(256MB)
0x00_8800_0000
N/A

0x06_0000_0000
SDRAM 2GB

0x00_C000_0000
0x06_8000_0000

N/A

0x07_0000_0000

N/A

0x08_0000_0000

Figure 5. RZ/G2M System Evaluation Board (HiHope-RZG2M) memory map (Linux)

R01US0398EJ0116 Rev.1.16 Page 23 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address
0x0 0x00_4000_0000
BSC
Option
0x00_2000_0000 0x00_43F0_0000
Reserved Certification
0x00_3000_0000 Secure
PCI-exp ARM Trusted Firmware
Region
0x00_4000_0000
SDRAM 2GB 0x00_47E0_0000
0x00_8000_0000
Legacy 0x00_4800_0000
0x00_5000_0000
U-Boot
0x00_C000_0000
Reserved
0x00_E000_0000
IO area
0x01_0000_0000 Shadow area

~ ~
0x04_0000_0000
SDRAM 2GB 0x00_C000_0000
0x04_4000_0000

0x04_8000_0000
SDRAM 2GB

0x05_0000_0000

N/A

0x06_0000_0000

N/A

System RAM SPI Flash


Load by Boot
0x00_E630_0000 ROM program
0x06_8000_0000 0x0
Secure Boot parameter
Region Boot parameter 0x040000
N/A IPL
IPL
0x180000
0x07_0000_0000 Certification
0x1C0000
ARM Trusted
Firmware

N/A 0x300000
U-Boot

0x08_0000_0000

Figure 6. RZ/G2N System Evaluation Board (HiHope-RZG2N) memory map (Boot)

R01US0398EJ0116 Rev.1.16 Page 24 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address 0x00_4000_0000


0x0
BSC Option
0x00_43F0_0000
0x00_2000_0000 Certification
Reserved
0x00_3000_0000 Secure ARM Trusted Firmware
PCI-exp Region OP-Tee
0x00_4000_0000 0x00_47E0_0000
SDRAM 2GB 0x00_4800_0000
Legacy dtb
0x00_8000_0000
0x00_4808_0000
Kernel Image
0x00_C000_0000
Reserved
0x00_E000_0000
IO area
0x01_0000_0000 Shadow area

~ ~
0x04_0000_0000
SDRAM 2GB 0x00_5400_0000
CMA for Lossy comp
0x04_4000_0000 (48MB)
0x00_5700_0000
0x00_5800_0000
0x04_8000_0000
SDRAM 2GB CMA
(512MB)

0x05_0000_0000 0x00_7800_0000
CMA for MMP
(256MB)

0x00_8800_0000
N/A

0x06_0000_0000

N/A
0x00_C000_0000

0x06_8000_0000

N/A

0x07_0000_0000

N/A

0x08_0000_0000

Figure 7. RZ/G2N System Evaluation Board (HiHope-RZG2N) memory map (Linux)

R01US0398EJ0116 Rev.1.16 Page 25 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address
0x0 0x00_4000_0000
BSC
Option
0x00_2000_0000 0x00_43F0_0000
Reserved Certification
0x00_3000_0000 Secure
PCI-exp ARM Trusted Firmware
Region
0x00_4000_0000 OP-Tee
SDRAM 2GB 0x00_47E0_0000
Legacy 0x00_4800_0000

0x00_C000_0000
Reserved
0x00_E000_0000
IO area 0x00_5000_0000
0x01_0000_0000 U-Boot
Shadow area

~ ~
0x04_0000_0000
SDRAM 2GB

0x04_8000_0000

N/A Load by
IPL
0x05_0000_0000
SDRAM 2GB

0x05_8000_0000

N/A

0x06_0000_0000

0x00_C000_0000
N/A
System RAM Hyper Flash
Load by Boot
0x00_E630_0000 ROM program
0x06_8000_0000 0x0
Secure Boot parameter
Region Boot parameter 0x040000
N/A IPL
IPL
0x180000
0x07_0000_0000 Certification
0x1C0000
ARM Trusted
Firmware

N/A 0x300000
U-Boot

0x08_0000_0000

Figure 8. RZ/G2H System Evaluation Board (HIHOPE-RZG2H) memory map (Boot)

R01US0398EJ0116 Rev.1.16 Page 26 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Physical Address
0x0 0x00_4000_0000
BSC
Option
0x00_2000_0000 0x00_43F0_0000
Reserved Certification
0x00_3000_0000 Secure
PCI-exp Region ARM Trusted Firmware
0x00_4000_0000 OP-Tee
SDRAM 2GB 0x00_47E0_0000
Legacy 0x00_4800_0000
dtb
0x00_4808_0000
0x00_C000_0000 Kernel Image
Reserved
0x00_E000_0000
IO area
0x01_0000_0000 Shadow area

~ ~
0x04_0000_0000
SDRAM 2GB
0x00_5400_0000
CMA for Lossy comp
(48MB)
0x00_5700_0000
0x00_5800_0000
0x04_8000_0000

CMA
N/A
(512MB)

0x05_0000_0000 0x00_7800_0000
SDRAM 2GB
CMA for MMP
(256MB)
0x00_8800_0000
0x05_8000_0000

N/A

0x06_0000_0000

N/A

0x00_C000_0000
0x06_8000_0000

N/A

0x07_0000_0000

N/A

0x08_0000_0000

Figure 9. RZ/G2H System Evaluation Board (HiHope-RZG2H) memory map (Linux)

R01US0398EJ0116 Rev.1.16 Page 27 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

Note)
- Kernel region is assigned by Kernel device tree arch/arm64/boot/dts/renesas/xxx.dts and totally mapped to 1920MB
(RZ/G2E System Evaluation Board EK874), 3968MB (RZ/G2M System Evaluation Board HiHope-RZG2M),
3968MB (RZ/G2N System Evaluation Board HiHope-RZG2N), 3968MB (RZ/G2H System Evaluation Board
HiHope-RZG2H)

Kernel region consists of 1 part: (RZ/G2E System Evaluation Board EK874)

➢ 1920MB from 0x00_4800_0000 to 0x00_BFFF_FFFF

Kernel region consists of 2 part: (RZ/G2M System Evaluation Board HiHope-RZG2M)

➢ 1920MB from 0x00_4800_0000 to 0x00_BFFF_FFFF

➢ 2GB from 0x06_0000_0000 to 0x06_7FFF_FFFF

Kernel region consists of 2 part: (RZ/G2N System Evaluation Board HiHope-RZG2N)

➢ 1920MB from 0x00_4800_0000 to 0x00_BFFF_FFFF

➢ 2GB from 0x04_8000_0000 to 0x04_EFFF_FFFF

Kernel region consists of 2 part: (RZ/G2H System Evaluation Board HiHope-RZG2H)

➢ 1920MB from 0x00_4800_0000 to 0x00_BFFF_FFFF

➢ 2GB from 0x05_0000_0000 to 0x05_7FFF_FFFF

There are three types of CMA regions.

They are defined in device tree (arch/arm64/boot/dts/renesas/xxxx.dts).

➢ Default CMA region: It is for kernel, general drivers and multimedia package.

linux,cma {
compatible = "shared-dma-pool";
reusable;
reg = <0x00000000 0xXXXXXXXX 0x0 0xYYYYYYYY>;
linux,cma-default;
};

0xXXXXXXXX is start address of CMA region.


0xYYYYYYYY is size of CMA region.
Note)

⚫ 128 MB in this CMA (RZ/G2M (v1.3, v3.0) |G2N|G2H 512MB, RZ/G2E 256MB) is reserved
for kernel and general drivers, and the remaining RZ/G2M (v1.3, v3.0) |G2N|G2H 384 MB,
RZ/G2E 128MB is reserved for multimedia package.
⚫ The CMA region can be adjusted by changing the start address and the size.

⚫ Should take care of the lack of memory allocated by kernel and general drivers when reducing
the region size.

R01US0398EJ0116 Rev.1.16 Page 28 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

➢ CMA region for MMP: It is for multimedia package (specific H/Ws).

mmp_reserved: linux,multimedia {
compatible = "shared-dma-pool";
reusable;
reg = <0x00000000 0xXXXXXXXX 0x0 0xYYYYYYYY>;
};

0xXXXXXXXX is start address of CMA region.


0xYYYYYYYY is size of CMA region.
Note)

⚫ Refer to User’s manual of Memory Manager in order to change CMA region for MMP.

Virtual Address
0x0

User
(256TB)

0x0001_0000_0000_0000

N/A

0xFFFF_0000_0000_0000
vmalloc
vmemmap
Kernel
・・・ (256TB)
Kernel
・・・
0xFFFF_FFFF_FFFF_FFFF

Figure 10 . RZ/G2 memory map (Virtual)

Note)
- Kernel uses 4KB page size (VA_BITS=48) and 4 levels of translation tables. Both regions of User and Kernel
are 256TB. Refer to Documentation/arm64/memory.txt.

- Detail information about kernel memory map in virtual address space, refer to User’s manual of Kernel.

R01US0398EJ0116 Rev.1.16 Page 29 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

7. U-Boot command
Please refer to U-Boot user's manual about available U-Boot command for RZ/G2 Linux BSP.
The help or “?” command shows U-Boot command list, but be careful that it includes some unsupported command.

R01US0398EJ0116 Rev.1.16 Page 30 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

8. System Service
In RZ/G2 VLP64 environment, some services are added to root filesystem to assist related drivers.

8.1 Watchdog Service


Watchdog Service is a systemd service, which is used to generate a reset when system is freeze.

It is automatically loaded in root filesystem and runs background during operation with binary file:

/usr/bin/watchdog-test -d -t 60 -e

This binary is compiled from “tools/testing/selftests/watchdog/watchdog-test.c” in kernel source code.

The meaning of each parameter:

• -d: Turn off the watchdog timer

• -t: set time out to 60s

• -e: Turn on the watchdog timer

• -p: set ping rate (default value is 1s if not set)

To control Watchdog Service interface, we can refer similar commands of systemd service on linux. The following table
show supported commands:

Table 2 Supported commands

Command Description
systemctl stop watchdog Stop Watchdog Service
systemctl start watchdog Start Watchdog Service
systemctl restart watchdog Restart Watchdog Service
systemctl disable watchdog Disable Watchdog Service in root filesystem
systemctl enable watchdog Enable Watchdog Service in root filesystem

Watchdog Service is automatically activated by default. To turn off Watchdog Service, please choose one of the
following ways:

• Stop Watchdog Service in runtime (Turn off only once. If you reset or powering up board again, watchdog
service still starts again):

o systemctl stop watchdog.

• Disable Watchdog Service in runtime (Turn off completely. If you reset or powering up board again, watchdog
service does not start):

o systemctl stop watchdog.

o systemctl disable watchdog.

R01US0398EJ0116 Rev.1.16 Page 31 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide

• Remove Watchdog Service from BSP packages: remove “watchdog” package in “recipes-images/core-image-
renesas-base.inc”

IMAGE_INSTALL_append = " \
bash \
v4l-utils \
i2c-tools \
coreutils \
- watchdog \
"

8.2 Video Input Initializing Service


In RZ/G2 environment, there is a service named “vin” which automatically sets connecting among VIN, CSI2 and
OV5645 camera sensor.
This script automatically sets default links for:

Processor CSI20 CSI40

RZ/G2H VIN4/VC0 VIN0/VC0

RZ/G2M v1.3 VIN4/VC0 -

RZ/G2M v3.0 VIN4/VC0 VIN0/VC0

RZ/G2N VIN4/VC0 VIN0/VC0

RZ/G2E - VIN4/VC0

To change the connection in runtime, user can use a script at “/home/root/vin-init.sh” created by vin service then
modify some parameters which are described in this script based on user’s purpose and connection tables (Table 4.3, 4.4,
4.5, 4.6 in Video Capture User’s Manual).

To remove “vin” service from BSP packages, please remove “vin-init” package in “recipes-images/core-image-bsp.inc”:

IMAGE_INSTALL_append = " \
….
rt-tests \
ltp \
openssl \
- vin-init \
"

R01US0398EJ0116 Rev.1.16 Page 32 of 32


May. 31, 2023
Linux Interface Specification Yocto recipe Start-Up Guide
REVISION HISTORY
User’s Manual: Software
Rev. Date Description
Page Summary
1.00 Apr. 2019 ⎯ First Edition issued
1.01 Jun. 2019 __ Add support Hihope-RZG2M
__ Add support Hihope-RZG2N, remove ECC support, add lossy compress in memory
1.02 Oct. 2019
map
2, 6 Add information for Linux Realtime support
12 Add information where to get flash-writer
1.03 Jan. 2020 17 Correct SDK path to source the environment setup script
22,24,
Change memory map, global CMA for G2M, G2N increased to 512MB
25
1.04 Jun. 2020 __ Add support Hihope-RZG2H
__ Add support Hihope-RZG2M with RZ/G2M v3.0
31, 32 Add new chapter “8.System Service” which includes:
1.05 Aug. 2020
• 8.1 Watchdog Service
• 8.2 Video Input Initializing Service
1.06 Nov. 2020 9 Add description about “Support CIP Core”.
- Add information about EK874 Board Revision E (RZ/G2E)
1.07 Feb. 2021 - Update version of Linux Host PC from Ubuntu 16.04 LTS to 18.04 LTS
9 Add description about “Support Docker”
1 Support EK874 Board Revision E (RZ/G2E) officially
1.0.8 May. 2021
2 Update branch of U-boot to v2020.10/rzg2
Add information about Initial Program Loader source.
2
Correct RZ/G2 Linux source link.
1.0.9 Aug. 2021
3 Add a note about warning when building with Ubuntu 18.04.
9 Add information about supporting Realtime kernel.
1.10 Nov. 2021 2 Update RZ/G2 Linux source branches.
2 Update RZ/G2 Linux and TF-A source branches.
1.11 Feb. 2022
5 Update correct link for meta-gplv2 repo
1.12 May. 2022 2 Update RZ/G2 Linux and u-boot source branches.
1.13 Aug. 2022 2 Update RZ/G2 Linux and TF-A source branches.
1.14 Nov. 2022 2 Update RZ/G2 Linux source branch.
1.15 Feb. 2023 2 Update RZ/G2 Linux and TF-A source branches.
1.16 May. 2023 2 Update RZ/G2 Linux source branch.

C- 1
Linux Interface Specification Yocto recipe Start-Up Guide
User’s Manual: Software

Publication Date: Rev.1.16 May. 31, 2023

Published by: Renesas Electronics Corporation


Linux Interface Specification
Yocto recipe Start-Up Guide

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy