R01us0398ej0116 RZ G
R01us0398ej0116 RZ G
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).
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
<$WORK/a script>
#!/bin/bash
echo "This is content in a file"
Table of Contents
Introduction ............................................................................................................................................ 1
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.
https://github.com/renesas-rz/rzg_trusted-firmware-a, branch=v2.8/rzg2
https://github.com/renesas-rz/renesas-u-boot-cip.git, branch=v2021.10/rzg2
https://github.com/renesas-rz/rz_linux-cip,branch=rzg2-cip94
https://github.com/renesas-rz/rz_linux-cip,branch=rzg2-cip94-rt29
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.
(*) 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.
Recommended Environment
Hub
RZ/G2
TFTP server
NFS server
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.
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.
$ 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
Step 3 checkout
$ 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).
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.
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.
$ cd ${WORK}
$ source poky/oe-init-build-env
$ 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
For example
[Disable]
#DISTRO_FEATURES_append = " h264dec_lib"
[Enable (default)]
DISTRO_FEATURES_append = " h264dec_lib”
Default
No. Function name Explanation
value
RTM0AC0000XVCMND30SL41C
1 h264dec_lib RTM0AC0000XV264D30SL41C RTM0AC0000XCMCTL30SL41C
RCG3VUDRL4101ZDO
RTM0AC0000XVCMNE30SL41C
2 h264enc_lib RTM0AC0000XV264E30SL41C RTM0AC0000XCMCTL30SL41C
RCG3VUDRL4101ZDO
RTM0AC0000XVCMND30SL41C
3 h265dec_lib RTM0AC0000XV265D30SL41C RTM0AC0000XCMCTL30SL41C
RCG3VUDRL4101ZDO
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"
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>
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
3.2 Dip-Switch
b) Boot Mode
b) Boot Mode
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.
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.
• 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".
• 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”.
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.
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.
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.
Please start U-Boot by board reset. Please set and save environment variable as follows.
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
Note) For RZ/G2M v1.3 (SOC_FAMILY r8a774a1), the device trees are as follow:
Note) For RZ/G2M v3.0 (SOC_FAMILY r8a774a3), the device trees are as follow:
Note) For RZ/G2N (SOC_FAMILY r8a774b1), the device trees are as follow:
Note) For RZ/G2H (SOC_FAMILY r8a774e1), the device trees are as follow:
To change bootargs which passed to the kernel in boot sequence, please modify it by “setenv bootargs” command of U-
Boot.
=> saveenv
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
Note) <supported board name> is the following: ek874, hihope-rzg2m, hihope-rzg2n, hihope-rzg2h.
After board reset, U-Boot is started. After countdown, Linux boot messages are displayed. Please confirm login prompt
after Linux boot messages.
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.
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"
$ 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)
$ 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
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.
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).
- The following regions are used as a secure region. It doesn’t allow U-Boot and kernel to access those regions.
- 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.
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
N/A 0x300000
U-Boot
0x08_0000_0000
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
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
N/A 0x300000
U-Boot
0x08_0000_0000
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
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
N/A 0x300000
U-Boot
0x08_0000_0000
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
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
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
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)
➢ 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;
};
⚫ 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.
mmp_reserved: linux,multimedia {
compatible = "shared-dma-pool";
reusable;
reg = <0x00000000 0xXXXXXXXX 0x0 0xYYYYYYYY>;
};
⚫ 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
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.
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.
8. System Service
In RZ/G2 VLP64 environment, some services are added to root filesystem to assist related drivers.
It is automatically loaded in root filesystem and runs background during operation with binary file:
/usr/bin/watchdog-test -d -t 60 -e
To control Watchdog Service interface, we can refer similar commands of systemd service on linux. The following table
show 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):
• Disable Watchdog Service in runtime (Turn off completely. If you reset or powering up board again, watchdog
service does not start):
• 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 \
"
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 \
"
C- 1
Linux Interface Specification Yocto recipe Start-Up Guide
User’s Manual: Software