Difference between revisions of "R-Car/Boards/Yocto-Gen3/v5.1.0"

From eLinux.org
Jump to: navigation, search
(Copy from v4.7.0 page)
 
(Manual steps)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Template:R-Car-Gen3-Navbox}}
 
{{Template:R-Car-Gen3-Navbox}}
 +
{{Template:R-Car-Yocto-Gen3-legacy-header}}
 
{{TOC right}}
 
{{TOC right}}
 
[[Category:R-Car]]
 
[[Category:R-Car]]
Line 10: Line 11:
 
** https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs/r-car-h3-m3-starter-kit
 
** https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs/r-car-h3-m3-starter-kit
 
'''NOTE: USE OFFICIAL DOCUMENTATION provided with R-Car BSPs FOR H3SK/M3SK boards'''
 
'''NOTE: USE OFFICIAL DOCUMENTATION provided with R-Car BSPs FOR H3SK/M3SK boards'''
<br/><br/>
+
<br/>
* [[R-Car/Boards/Kingfisher | Infotainment Carrier Board For R-Car Starter Kit(Kingfisher)]]
+
See also:
 
+
* Latest version [[R-Car/Boards/Yocto-Gen3 ]]
{{Note}}
+
* Stable version [[R-Car/Boards/Yocto-Gen3-stable ]]
<span style="color: #FF0000; font-size: 1.5em;">
 
This version does not support Wayland/weston and Multimedia Packages.<br/>
 
<span>
 
  
 
== Topic ==
 
== Topic ==
Line 27: Line 25:
 
! Software !! Revision
 
! Software !! Revision
 
|-
 
|-
| Yocto Project || [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-3.1.3 3.1.3]
+
| Yocto Project || [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-3.1.4 3.1.4]
 
|-  
 
|-  
 
| aarch64-poky-linux-gcc (GCC) || 9.3
 
| aarch64-poky-linux-gcc (GCC) || 9.3
 
|-  
 
|-  
| Kernel Ver || 5.4.72
+
| Wayland/Weston || 1.18.0/8.0.0
 +
|-
 +
| GStreamer || 1.16.3
 +
|-
 +
| Kernel Ver || 5.10
 
|-  
 
|-  
 
| Userland 64/32bit || 64
 
| Userland 64/32bit || 64
 
|-  
 
|-  
| U-Boot || 2020.01
+
| U-Boot || 2020.10
 
|-  
 
|-  
 
| OP_TEE || 3.8.0
 
| OP_TEE || 3.8.0
Line 44: Line 46:
  
 
== Host PC ==
 
== Host PC ==
Ubuntu 16.04 LTS (64bit) is recommended as OS. 32bit version is not supported. <br/>
+
Ubuntu 16.04/20.04 LTS (64bit) is recommended as OS. 32bit version is not supported. <br/>
  
 
== Required packages ==
 
== Required packages ==
  
<!-- # Download evaluation version of proprietary graphics and multimedia drivers from Renesas. -->
+
# Download evaluation version of proprietary graphics and multimedia drivers from Renesas.
# Download evaluation version of proprietary graphics package from Renesas.
+
#: To download Multimedia and Graphics library and related Linux drivers, please use the following link:
<!-- #: To download Multimedia and Graphics library and related Linux drivers, please use the following link: -->
 
#: To download Graphics library and related Linux drivers, please use the following link:
 
 
#::* https://www.renesas.com/us/en/application/automotive/r-car-h3-m3-h2-m2-e2-documents-software
 
#::* https://www.renesas.com/us/en/application/automotive/r-car-h3-m3-h2-m2-e2-documents-software
 
#: Download two files:
 
#: Download two files:
#::* R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210119.zip
+
#::* R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
#::* R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210119.zip
+
#::* R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
<!-- #: <br/> -->
+
#: <br/>
<!-- #: Graphic drivers are required for Wayland. Multimedia drivers are optional. -->
+
#: Graphic drivers are required for Wayland. Multimedia drivers are optional.
 
# Install required packages
 
# Install required packages
#: '''Ubuntu and Debian'''
+
#: <syntaxhighlight lang="bash">
#:: <syntaxhighlight lang="bash">
 
 
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
    build-essential chrpath socat libsdl1.2-dev xterm python-crypto cpio python python3 \
+
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
    python3-pip python3-pexpect xz-utils debianutils iputils-ping libssl-dev
+
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
</syntaxhighlight>
+
libsdl1.2-dev pylint3 xterm
#: '''Fedora'''
 
#:: <syntaxhighlight lang="bash">
 
sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
 
    diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
 
    ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \
 
    SDL-devel xterm python-crypto cpio python python3 python3-pip python3-pexpect \
 
    ghc-lzma-conduit iputils openssl
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#: Refer to [http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#packages Yocto Project Quick Start] for more information.
 
#: Refer to [http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#packages Yocto Project Quick Start] for more information.
Line 78: Line 70:
 
NOTE: to have ADAS View and HAD Solution kits supported follow instructions: [[R-Car/Boards/Yocto-Gen3-ADAS | R-Car Yocto Gen3 ADAS]]
 
NOTE: to have ADAS View and HAD Solution kits supported follow instructions: [[R-Car/Boards/Yocto-Gen3-ADAS | R-Car Yocto Gen3 ADAS]]
  
=== Build using script ===
+
=== Using build script ===
 
# Directory Structure
 
# Directory Structure
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
 
|--build.sh
 
|--build.sh
 
`--proprietary
 
`--proprietary
   |--R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210119.zip
+
   |--R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
   `--R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210119.zip
+
   `--R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-202100428.zip
 
</syntaxhighlight>
 
</syntaxhighlight>
 
# Build script(build.sh)
 
# Build script(build.sh)
Line 95: Line 87:
 
WORK=`pwd`/${TARGET_BOARD}
 
WORK=`pwd`/${TARGET_BOARD}
  
POKY_COMMIT=012ad10a89a889c21e67c27dc37d22520212548f
+
POKY_COMMIT=424296bf9bb4bae27febf91bce0118df09ce5fa1
META_OE_COMMIT=2a5c534d2b9f01e9c0f39701fccd7fc874945b1c
+
META_OE_COMMIT=f2d02cb71eaff8eb285a1997b30be52486c160ae
META_RENESAS_COMMIT=a8db60a4d442a7ad86bbb992c63f24bcdce18144
+
META_RENESAS_COMMIT=fd8ab2bb1b5ca98483c6f4aecf09a85c4d6bc016
  
GFX_MMP_LIB=R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210119.zip
+
GFX_MMP_LIB=R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
GFX_MMP_DRIVER=R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210119.zip
+
GFX_MMP_DRIVER=R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
  
 
Usage () {
 
Usage () {
Line 120: Line 112:
 
git clone git://git.yoctoproject.org/poky &
 
git clone git://git.yoctoproject.org/poky &
 
git clone git://git.openembedded.org/meta-openembedded &
 
git clone git://git.openembedded.org/meta-openembedded &
git clone git://github.com/renesas-rcar/meta-renesas &
+
git clone https://github.com/renesas-rcar/meta-renesas &
  
 
# Wait for all clone operations
 
# Wait for all clone operations
Line 132: Line 124:
 
cd ${WORK}/meta-renesas
 
cd ${WORK}/meta-renesas
 
git checkout -b tmp ${META_RENESAS_COMMIT}
 
git checkout -b tmp ${META_RENESAS_COMMIT}
 +
 +
# Apply patch to update meta-renesas
 +
cd ${WORK}
 +
curl -sO https://elinux.org/images/6/6a/Update-meta-rcar-for-Yv510-20210531.patch.zip
 +
unzip -qo Update-meta-rcar-for-Yv510-20210531.patch.zip
 +
cd ${WORK}/meta-renesas
 +
patch -N -p1 < ../Update-meta-rcar-for-Yv510-20210531.patch
  
 
# Populate meta-renesas with proprietary software packages
 
# Populate meta-renesas with proprietary software packages
Line 145: Line 144:
  
 
#cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/bsp/*.conf ./conf/
 
#cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/bsp/*.conf ./conf/
cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/gfx-only/*.conf ./conf/
+
#cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/gfx-only/*.conf ./conf/
#cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/mmp/*.conf ./conf/
+
cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/mmp/*.conf ./conf/
  
 
cd ${WORK}/build
 
cd ${WORK}/build
Line 163: Line 162:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Build using manual steps ===
+
=== Manual steps ===
 
# Create a directory and switch to it
 
# Create a directory and switch to it
 
#: Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
 
#: Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
Line 175: Line 174:
 
git clone git://git.yoctoproject.org/poky
 
git clone git://git.yoctoproject.org/poky
 
git clone git://git.openembedded.org/meta-openembedded
 
git clone git://git.openembedded.org/meta-openembedded
git clone git://github.com/renesas-rcar/meta-renesas
+
git clone https://github.com/renesas-rcar/meta-renesas
 
</syntaxhighlight>
 
</syntaxhighlight>
 
# Switch to proper branches/commits
 
# Switch to proper branches/commits
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
 
cd $WORK/poky
 
cd $WORK/poky
git checkout -b tmp 012ad10a89a889c21e67c27dc37d22520212548f
+
git checkout -b tmp 424296bf9bb4bae27febf91bce0118df09ce5fa1
 
cd $WORK/meta-openembedded
 
cd $WORK/meta-openembedded
git checkout -b tmp 2a5c534d2b9f01e9c0f39701fccd7fc874945b1c
+
git checkout -b tmp f2d02cb71eaff8eb285a1997b30be52486c160ae
 
cd $WORK/meta-renesas
 
cd $WORK/meta-renesas
git checkout -b tmp a8db60a4d442a7ad86bbb992c63f24bcdce18144
+
git checkout -b tmp fd8ab2bb1b5ca98483c6f4aecf09a85c4d6bc016
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#: Another versions are not tested for compatibility.
 
#: Another versions are not tested for compatibility.
 
#: Legacy BSP instruction can be found here [[R-Car/Boards/Yocto-Gen3-legacy | R-Car Yocto Gen3 legacy]]
 
#: Legacy BSP instruction can be found here [[R-Car/Boards/Yocto-Gen3-legacy | R-Car Yocto Gen3 legacy]]
# Download proprietary driver modules to $WORK/proprietary folder
+
# Apply patch to update meta-rcar(patch file: [[File:Update-meta-rcar-for-Yv510-20210531.patch.zip]])
 +
#: <syntaxhighlight lang="bash">
 +
cd ${WORK}
 +
curl -sO https://elinux.org/images/6/6a/Update-meta-rcar-for-Yv510-20210531.patch.zip
 +
unzip -qo Update-meta-rcar-for-Yv510-20210531.patch.zip
 +
cd ${WORK}/meta-renesas
 +
patch -N -p1 < ../Update-meta-rcar-for-Yv510-20210531.patch
 +
</syntaxhighlight>
 +
# Create $WORK/../proprietary folder, then download proprietary driver modules to it.
 +
#: See also [[{{PAGENAME}}#Required_packages | Required_packages]]
 
#: You should see the following files:
 
#: You should see the following files:
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
$ ls -1 $WORK/proprietary/*.zip
+
$ ls -1 $WORK/../proprietary/*.zip
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210119.zip
+
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210119.zip
+
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
 
</syntaxhighlight>
 
</syntaxhighlight>
 
# Populate meta-renesas with proprietary software packages.
 
# Populate meta-renesas with proprietary software packages.
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
export PKGS_DIR=$WORK/proprietary
+
export PKGS_DIR=$WORK/../proprietary
 
cd $PKGS_DIR
 
cd $PKGS_DIR
unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210119.zip  
+
unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip  
unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210119.zip
+
unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
 
cd $WORK/meta-renesas
 
cd $WORK/meta-renesas
 
sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f $PKGS_DIR
 
sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f $PKGS_DIR
Line 212: Line 220:
 
# Prepare default configuration files.
 
# Prepare default configuration files.
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<h3ulcb|m3ulcb>/poky-gcc/gfx-only/*.conf ./conf/
+
cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<h3ulcb|m3ulcb>/poky-gcc/mmp/*.conf ./conf/
 
cd $WORK/build
 
cd $WORK/build
 
cp conf/local-wayland.conf conf/local.conf
 
cp conf/local-wayland.conf conf/local.conf
Line 233: Line 241:
 
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.manifest
 
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.manifest
 
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.tar.bz2
 
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.tar.bz2
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.tar.gz
 
 
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.testdata.json
 
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.testdata.json
 +
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.bmap
 +
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.xz
 +
./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.xz.sha256sum
 
./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
 
./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
./tmp/deploy/images/h3ulcb/r8a7795-es1-h3ulcb-h3ulcb.dtb
+
./tmp/deploy/images/h3ulcb/r8a77950-ulcb-h3ulcb.dtb
./tmp/deploy/images/h3ulcb/r8a7795-es1-h3ulcb.dtb
+
./tmp/deploy/images/h3ulcb/r8a77950-ulcb.dtb
./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-4x2g-h3ulcb.dtb
+
./tmp/deploy/images/h3ulcb/r8a77951-ulcb-h3ulcb.dtb
./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-4x2g.dtb
+
./tmp/deploy/images/h3ulcb/r8a77951-ulcb.dtb
./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb-h3ulcb.dtb
+
./tmp/deploy/images/h3ulcb/r8a779m1-ulcb-h3ulcb.dtb
./tmp/deploy/images/h3ulcb/r8a7795-h3ulcb.dtb
+
./tmp/deploy/images/h3ulcb/r8a779m1-ulcb.dtb
./tmp/deploy/images/h3ulcb/u-boot-elf-h3ulcb-4x2g.srec
 
 
./tmp/deploy/images/h3ulcb/u-boot-elf-h3ulcb.srec
 
./tmp/deploy/images/h3ulcb/u-boot-elf-h3ulcb.srec
 
./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin
 
./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin
 
./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin-r8a7795_h3ulcb
 
./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin-r8a7795_h3ulcb
./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin-r8a7795_h3ulcb-4x2g
+
./tmp/deploy/images/h3ulcb/u-boot-initial-env-h3ulcb-r8a7795_h3ulcb
 +
./tmp/deploy/images/h3ulcb/u-boot-initial-env-r8a7795_h3ulcb
 
./tmp/deploy/images/h3ulcb/u-boot.bin
 
./tmp/deploy/images/h3ulcb/u-boot.bin
 
./tmp/deploy/images/h3ulcb/u-boot.bin-r8a7795_h3ulcb
 
./tmp/deploy/images/h3ulcb/u-boot.bin-r8a7795_h3ulcb
./tmp/deploy/images/h3ulcb/u-boot.bin-r8a7795_h3ulcb-4x2g
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#: '''Image''' is a Kernel image, '''*.dtb''' is a blob file,  '''core-image-<image_type>-<board_name>.tar.bz2''' is the rootfs, '''modules-<board_name>.tgz''' are kernel modules.
 
#: '''Image''' is a Kernel image, '''*.dtb''' is a blob file,  '''core-image-<image_type>-<board_name>.tar.bz2''' is the rootfs, '''modules-<board_name>.tgz''' are kernel modules.
 
# You can now proceed with [[{{PAGENAME}}#Running_Yocto_images|Running Yocto images]]
 
# You can now proceed with [[{{PAGENAME}}#Running_Yocto_images|Running Yocto images]]
 +
 +
== Relationship diagram between each SK board and DTB file in Yocto v5.1.0  ==
 +
{| class="wikitable"
 +
|-
 +
! Board name !! SoC version !! Type Name || DTB file
 +
|-
 +
| H3SK || 2.0 || RTP0RC77951SKBX010SA00 || r8a77951-ulcb.dtb
 +
|-
 +
| H3SK || 2.0 || RTP0RC77951SKBX010SA01 || r8a77951-ulcb.dtb
 +
|-
 +
| H3SK || 2.0/3.0 || RTP0RC77951SKBX010SA03 || r8a77951-ulcb.dtb
 +
|-
 +
| H3e-2G SK || 3.0 || RTP8J779M1ASKB0SK0SA003  || r8a779<span style="color:#ff0000;">m</span>1-ulcb.dtb
 +
|-
 +
| M3SK || 1.0 || RTP0RC7796SKBX0010SA09 || r8a77960-ulcb.dtb
 +
|-
 +
| M3SK || 3.0 || RTP8J77961ASKB0SK0SA05A || r8a77961-ulcb.dtb
 +
|-
 +
|}
  
 
== Build SDK ==
 
== Build SDK ==
Line 268: Line 296:
 
Follow these steps to setup working TFTP and NFS server:
 
Follow these steps to setup working TFTP and NFS server:
 
# Setup a TFTP server.
 
# Setup a TFTP server.
#: '''Ubuntu'''
 
 
#: Install '''tftpd-hpa''' package along with tftp tools:
 
#: Install '''tftpd-hpa''' package along with tftp tools:
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
 
sudo apt-get install tftp tftpd-hpa
 
sudo apt-get install tftp tftpd-hpa
</syntaxhighlight>
 
#: '''Fedora'''
 
## Install necessary packages:
 
##: <syntaxhighlight lang="bash">
 
sudo yum install tftp-server tftp
 
</syntaxhighlight>
 
##: tftp-server is a part of xinetd. See [http://docs.fedoraproject.org/en-US/Fedora/20/html/Installation_Guide/ch13s05s03.html Fedora manual] for more information.
 
## Enable TFTP server:
 
##: <syntaxhighlight lang="bash">
 
sudo vi /etc/xinetd.d/tftp
 
</syntaxhighlight>
 
##: Set <syntaxhighlight lang="bash">
 
disable = no
 
</syntaxhighlight>
 
##: Save file and exit.
 
## Start xinetd:
 
##: <syntaxhighlight lang="bash">
 
sudo systemctl start xinetd.service
 
sudo systemctl enable xinetd.service
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
# Copy '''Image''' and '''XXXX.dtb''' from $WORK/build/tmp/deploy/images/<board_name>/ to TFTP server root.
 
# Copy '''Image''' and '''XXXX.dtb''' from $WORK/build/tmp/deploy/images/<board_name>/ to TFTP server root.
#: '''Ubuntu'''
+
#: <syntaxhighlight lang="bash">
#:: <syntaxhighlight lang="bash">
 
 
cp $WORK/build/tmp/deploy/images/h3ulcb/Image /srv/tftp/
 
cp $WORK/build/tmp/deploy/images/h3ulcb/Image /srv/tftp/
 
cp $WORK/build/tmp/deploy/images/h3ulcb/XXXX.dtb /srv/tftp/
 
cp $WORK/build/tmp/deploy/images/h3ulcb/XXXX.dtb /srv/tftp/
</syntaxhighlight>
 
#: ''' Fedora'''
 
#:: <syntaxhighlight lang="bash">
 
cp $WORK/build/tmp/deploy/images/h3ulcb/Image /var/lib/tftpboot/
 
cp $WORK/build/tmp/deploy/images/h3ulcb/XXXX.dtb /var/lib/tftpboot/
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#: [[R-Car/Boards/H3SK#H3SK_has_several_kinds_of_boards | Which version is my H3SK board?]]
 
#: [[R-Car/Boards/H3SK#H3SK_has_several_kinds_of_boards | Which version is my H3SK board?]]
 
# Verify that TFTP server is working.
 
# Verify that TFTP server is working.
 +
#: <syntaxhighlight lang="bash">
 +
tftp localhost << EOS
 +
    get Image
 +
    quit
 +
EOS
 +
ls Image
 +
</syntaxhighlight>
 +
<!-- not work on Ubuntu 16.04 due to old version of tftp
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
 
tftp localhost -c get Image && ls Image
 
tftp localhost -c get Image && ls Image
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
-->
 
# Setup NFS server.
 
# Setup NFS server.
#: '''Debian/Ubuntu'''
 
 
## Install necessary packages:
 
## Install necessary packages:
 
##: <syntaxhighlight lang="bash">
 
##: <syntaxhighlight lang="bash">
Line 317: Line 327:
 
##: <syntaxhighlight lang="bash">
 
##: <syntaxhighlight lang="bash">
 
sudo /etc/init.d/nfs-kernel-server start
 
sudo /etc/init.d/nfs-kernel-server start
</syntaxhighlight>
 
#: '''Fedora'''
 
## Install necessary packages:
 
##: <syntaxhighlight lang="bash">
 
sudo yum install nfs-utils
 
</syntaxhighlight>
 
## Enable and start nfs server:
 
##: <syntaxhighlight lang="bash">
 
sudo systemctl enable rpcbind.service
 
sudo systemctl enable nfs-server.service
 
sudo systemctl enable nfs-lock.service
 
sudo systemctl enable nfs-idmap.service
 
sudo systemctl start rpcbind.service
 
sudo systemctl start nfs-server.service
 
sudo systemctl start nfs-lock.service
 
sudo systemctl start nfs-idmap.service
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
# Export root FS to NFS. (Change IMAGE and MACHINE to fit your build).
 
# Export root FS to NFS. (Change IMAGE and MACHINE to fit your build).
Line 378: Line 372:
 
setenv serverip <your-computer-ip>
 
setenv serverip <your-computer-ip>
 
setenv dtb <your-dtb-file-name>
 
setenv dtb <your-dtb-file-name>
setenv bootcmd 'tftp 0x48080000 Image; tftp 0x48000000 ${dtb}; booti 0x48080000 - 0x48000000'
+
setenv bootcmd 'tftp 0x48080000 <path_to_Image>/Image; tftp 0x48000000 <path_to_dtb>/${dtb}; booti 0x48080000 - 0x48000000'
 
setenv bootargs 'ignore_loglevel rw root=/dev/nfs nfsroot=<your-computer-ip>:<nfs-path>,nfsvers=3 ip=<board-ip>:<your-computer-ip>::255.255.255.0:h3ulcb'
 
setenv bootargs 'ignore_loglevel rw root=/dev/nfs nfsroot=<your-computer-ip>:<nfs-path>,nfsvers=3 ip=<board-ip>:<your-computer-ip>::255.255.255.0:h3ulcb'
 
saveenv
 
saveenv
Line 386: Line 380:
 
setenv ipaddr 192.168.1.3
 
setenv ipaddr 192.168.1.3
 
setenv serverip 192.168.1.2
 
setenv serverip 192.168.1.2
setenv dtb r8a7795-h3ulcb.dtb
+
setenv dtb r8a77951-ulcb.dtb
setenv bootcmd 'tftp 0x48080000 Image; tftp 0x48000000 ${dtb}; booti 0x48080000 - 0x48000000'
+
setenv bootcmd 'tftp 0x48080000 /Image; tftp 0x48000000 /${dtb}; booti 0x48080000 - 0x48000000'
setenv bootargs 'ignore_loglevel rw root=/dev/nfs nfsroot=192.168.1.2:/nfs/h3ulcb,nfsvers=3 ip=192.168.1.3:192.168.1.2::255.255.255.0:h3ulcb'
+
setenv bootargs 'ignore_loglevel rw root=/dev/nfs nfsroot=${serverip}:/nfs/h3ulcb,nfsvers=3,tcp ip=${ipaddr}:${serverip}::255.255.255.0:h3ulcb'
 
saveenv
 
saveenv
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 404: Line 398:
 
#: <syntaxhighlight lang="text">
 
#: <syntaxhighlight lang="text">
 
=> ping 192.168.1.2
 
=> ping 192.168.1.2
ravb:0 is connected to ravb.  Reconnecting to ravb
+
Using ethernet@e6800000 device
ravb Waiting for PHY auto negotiation to complete.. done
 
ravb: 100Base/Full
 
Using ravb device
 
 
host 192.168.1.2 is alive
 
host 192.168.1.2 is alive
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 414: Line 405:
 
# The board should boot the kernel:
 
# The board should boot the kernel:
 
#: <syntaxhighlight lang="text">
 
#: <syntaxhighlight lang="text">
[    0.000147] NOTICE:  BL2: R-Car H3 Initial Program Loader(CA57)
+
NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.3.0.1
[    0.004584] NOTICE:  BL2: Initial Program Loader(Rev.2.0.6)
+
NOTICE:  BL2: PRR is R-Car H3 Ver.3.0
[    0.010117] NOTICE:  BL2: PRR is R-Car H3 Ver.3.0
+
NOTICE:  BL2: Board is Starter Kit Premier Rev.2.1
[    0.014786] NOTICE:  BL2: Board is Starter Kit Rev.2.0
+
NOTICE:  BL2: Boot device is HyperFlash(80MHz)
[    0.019898] NOTICE:  BL2: Boot device is HyperFlash(80MHz)
+
NOTICE:  BL2: LCM state is CM
[    0.025325] NOTICE:  BL2: LCM state is CM
+
NOTICE:  AVS setting succeeded. DVFS_SetVID=0x53
[    0.029366] NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x53
+
NOTICE:  BL2: DDR3200(rev.0.41)
[   0.035342] NOTICE:  BL2: CH0: 0x400000000 - 0x47fffffff, 2 GiB
+
NOTICE:  BL2: [COLD_BOOT]
[    0.041203] NOTICE:  BL2: CH1: 0x500000000 - 0x57fffffff, 2 GiB
+
NOTICE:  BL2: DRAM Split is 4ch(DDR f)
[    0.047078] NOTICE:  BL2: CH2: 0x600000000 - 0x67fffffff, 2 GiB
+
NOTICE:  BL2: QoS is default setting(rev.0.11)
[    0.052954] NOTICE:  BL2: CH3: 0x700000000 - 0x77fffffff, 2 GiB
+
NOTICE:  BL2: DRAM refresh interval 1.95 usec
[    0.058843] NOTICE:  BL2: DDR3200(rev.0.40)
+
NOTICE:  BL2: Periodic Write DQ Training
[    0.074243] NOTICE: BL2: [COLD_BOOT]
+
NOTICE:  BL2: CH0: 400000000 - 47fffffff, 2 GiB
[    0.083820] NOTICE: BL2: DRAM Split is 4ch(DDR f)
+
NOTICE:  BL2: CH1: 500000000 - 57fffffff, 2 GiB
[    0.087119] NOTICE: BL2: QoS is default setting(rev.0.11)
+
NOTICE:  BL2: CH2: 600000000 - 67fffffff, 2 GiB
[    0.092563] NOTICE: BL2: DRAM refresh interval 1.95 usec
+
NOTICE:  BL2: CH3: 700000000 - 77fffffff, 2 GiB
[    0.097919] NOTICE:  BL2: Periodic Write DQ Training
+
NOTICE:  BL2: Lossy Decomp areas
[    0.102951] NOTICE:  BL2: v1.5(release):af9f429
+
NOTICE:      Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
[    0.107337] NOTICE:  BL2: Built : 07:10:13, Jul 15 2020
+
NOTICE:       Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
[    0.112525] NOTICE:  BL2: Normal boot
+
NOTICE:       Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
[    0.116165] NOTICE:  BL2: dst=0xe6324100 src=0x8180000 len=512(0x200)
+
NOTICE:  BL2: FDT at 0xe63267c8
[    0.122553] NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
+
NOTICE:  BL2: v2.3():7638cfbe6-dirty
[    0.129184] NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
+
NOTICE:  BL2: Built : 04:47:31, May 31 2021
[    0.136402] NOTICE:  BL2: dst=0x44100000 src=0x8200000 len=1048576(0x100000)
+
NOTICE:  BL2: Normal boot
[    0.151227] NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
+
NOTICE:  BL2: dst=0xe6326300 src=0x8180000 len=512(0x200)
[    0.165206] NOTICE:  BL2: Booting BL31
+
NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
 +
NOTICE:  rcar_file_len: len: 0x0003e000
 +
NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=253952(0x3e000)
 +
NOTICE:  rcar_file_len: len: 0x00200000
 +
NOTICE:  BL2: dst=0x44100000 src=0x8200000 len=2097152(0x200000)
 +
NOTICE:  rcar_file_len: len: 0x00100000
 +
NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
 +
NOTICE:  BL2: Booting BL31
  
  
U-Boot 2020.01 (Jul 15 2020 - 06:40:13 +0000)
+
U-Boot 2020.10 (May 31 2021 - 04:47:42 +0000)
  
 
CPU: Renesas Electronics R8A7795 rev 3.0
 
CPU: Renesas Electronics R8A7795 rev 3.0
Model: Renesas H3ULCB board based on r8a7795 ES2.0+ with 8GiB (4 x 2 GiB)
+
Model: Renesas H3ULCB board based on r8a77950
 
DRAM:  7.9 GiB
 
DRAM:  7.9 GiB
Bank #0: 0x048000000 - 0x0bfffffff, 1.9 GiB
 
Bank #1: 0x500000000 - 0x57fffffff, 2 GiB
 
Bank #2: 0x600000000 - 0x67fffffff, 2 GiB
 
Bank #3: 0x700000000 - 0x77fffffff, 2 GiB
 
 
 
MMC:  sd@ee100000: 0, sd@ee140000: 1
 
MMC:  sd@ee100000: 0, sd@ee140000: 1
 
Loading Environment from MMC... OK
 
Loading Environment from MMC... OK
Line 459: Line 452:
 
Net:  eth0: ethernet@e6800000
 
Net:  eth0: ethernet@e6800000
 
Hit any key to stop autoboot:  0
 
Hit any key to stop autoboot:  0
 +
ethernet@e6800000 Waiting for PHY auto negotiation to complete. done
 
Using ethernet@e6800000 device
 
Using ethernet@e6800000 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.2
+
TFTP from server 192.168.137.10; our IP address is 192.168.137.2
Filename '/Image'.
+
Filename '/h3ulcb/Image'.
 
Load address: 0x48080000
 
Load address: 0x48080000
 
Loading: #################################################################
 
Loading: #################################################################
Line 491: Line 485:
 
         #################################################################
 
         #################################################################
 
         #################################################################
 
         #################################################################
         ##########################################################
+
         #################################################################
         781.3 KiB/s
+
         #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #############################################
 +
        2.1 MiB/s
 
done
 
done
Bytes transferred = 27556352 (1a47a00 hex)
+
Bytes transferred = 33102336 (1f91a00 hex)
 
Using ethernet@e6800000 device
 
Using ethernet@e6800000 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.2
+
TFTP from server 192.168.137.10; our IP address is 192.168.137.2
Filename '/r8a7795-h3ulcb-4x2g.dtb'.
+
Filename '/h3ulcb/r8a77951-ulcb.dtb'.
 
Load address: 0x48000000
 
Load address: 0x48000000
 
Loading: ######
 
Loading: ######
         744.1 KiB/s
+
         2.3 MiB/s
 
done
 
done
Bytes transferred = 76285 (129fd hex)
+
Bytes transferred = 80970 (13c4a hex)
 +
Moving Image from 0x48080000 to 0x48200000, end=4a220000
 
## Flattened Device Tree blob at 48000000
 
## Flattened Device Tree blob at 48000000
 
   Booting using the fdt blob at 0x48000000
 
   Booting using the fdt blob at 0x48000000
   Loading Device Tree to 0000000053fea000, end 0000000053fff9fc ... OK
+
   Loading Device Tree to 0000000053fe9000, end 0000000053fffc49 ... OK
 +
Overlap found: 0x500000000..0x57fffffff / 0x500000000..0x53fffffff
 +
Overlap found: 0x600000000..0x67fffffff / 0x600000000..0x63fffffff
 +
Overlap found: 0x700000000..0x77fffffff / 0x700000000..0x73fffffff
  
Starting kernel ...                                                                                                                    
+
Starting kernel ...
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 514: Line 518:
  
 
==== Preparing eMMC/SD card ====
 
==== Preparing eMMC/SD card ====
 +
<span style="color:#ff0000">'''WARNING!''' These steps will erase the SD card completely. In short, all files will be lost.</span><br/>
 +
There two methods to prepare SD card. so, please select one of them.
 +
===== Manual steps =====
 
In order to prepare you SD card, follow these instructions on host machine:
 
In order to prepare you SD card, follow these instructions on host machine:
 
# Partion your SD card to set 1 partition and ID=83 (Linux)
 
# Partion your SD card to set 1 partition and ID=83 (Linux)
 
#: Make sure the SD card doesn't contain any important files.
 
#: Make sure the SD card doesn't contain any important files.
#: <span style="color:#ff0000">'''WARNING!''' These steps may erase the SD card completely. All files my be lost.</span>
 
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
 
$ fdisk /dev/mmcblk0
 
$ fdisk /dev/mmcblk0
Line 531: Line 537:
 
$ mkfs.ext3 /dev/mmcblk0p1
 
$ mkfs.ext3 /dev/mmcblk0p1
 
</syntaxhighlight>
 
</syntaxhighlight>
# Mount this partition on your host to any directory and upack the core-image-*.tar.bz2 into mounted folder. And Copy Image and XXXX.dtb from $WORK/build/tmp/deploy/images/<board_name>/ to sd card /boot.
+
# Mount this partition on your host to any directory and upack the core-image-*.tar.bz2 into mounted folder.<br/>And Copy Image and XXXX.dtb from $WORK/build/tmp/deploy/images/<board_name>/ to sd card /boot.
 
#: <syntaxhighlight lang="bash">
 
#: <syntaxhighlight lang="bash">
 
$ mount /dev/mmcblk0p1 /mnt
 
$ mount /dev/mmcblk0p1 /mnt
Line 541: Line 547:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
#: NOTE: probably you need to be a root user, hence use "sudo"
 
#: NOTE: probably you need to be a root user, hence use "sudo"
 +
 +
===== Using bmaptool =====
 +
Install bmaptool by following command:
 +
:<syntaxhighlight lang=bash>
 +
sudo apt install bmap-tools
 +
</syntaxhighlight>
 +
ex.) case of '/dev/sdb':
 +
:<syntaxhighlight lang=bash>
 +
sudo bmaptool copy ./core-image-weston-m3ulcb.wic.xz /dev/sdb
 +
</syntaxhighlight>
 +
::Note:
 +
::: It requires to be located both *.wic.xz and *.wic.bmap in same directory.
 +
::: It doesn't required to contain partition number(ex. /dev/sdb1, /dev/mmcblk0p1, and so on), /dev/mmcblk0 or /dev/sdb and so on are correct
 +
:Log:
 +
::<syntaxhighlight lang=bash>
 +
bash $ sudo bmaptool copy ./core-image-weston-m3ulcb.wic.xz /dev/XXXX
 +
bmaptool: info: discovered bmap file './core-image-weston-m3ulcb.wic.bmap'
 +
bmaptool: info: block map format version 2.0
 +
bmaptool: info: 199184 blocks of size 4096 (778.1 MiB), mapped 102471 blocks (400.3 MiB or 51.4%)
 +
bmaptool: info: copying image 'core-image-weston-m3ulcb.wic.xz' to block device '/dev/XXXX' using bmap file 'core-image-weston-m3ulcb.wic.bmap'
 +
bmaptool: info: 100% copied
 +
bmaptool: info: synchronizing '/dev/XXXX'
 +
bmaptool: info: copying time: 1m 6.8s, copying speed 6.0 MiB/sec
 +
</syntaxhighlight>
 +
Note:<br>
 +
: /dev/XXXX is differnet by host PC environment.<br>
 +
: It can be checked by using 'fdisk -l'.<br>
  
 
==== Configure U-Boot to boot from SD card ====
 
==== Configure U-Boot to boot from SD card ====
Line 557: Line 590:
 
* Example of U-Boot environment variables:
 
* Example of U-Boot environment variables:
 
*: <syntaxhighlight lang="text">
 
*: <syntaxhighlight lang="text">
baudrate=115200
 
 
bootargs_emmc=rw root=/dev/mmcblk0p1 rootwait
 
bootargs_emmc=rw root=/dev/mmcblk0p1 rootwait
bootargs_nfs=rw root=/dev/nfs rootwait ip=dhcp
+
bootargs_nfs=rw root=/dev/nfs nfsroot=192.168.1.2:/nfs/h3ulcb,tcp,v3 rootwait ip=dhcp
 
bootargs_sd0=rw root=/dev/mmcblk1p1 rootwait
 
bootargs_sd0=rw root=/dev/mmcblk1p1 rootwait
 
bootcmd=run bootcmd_sd0
 
bootcmd=run bootcmd_sd0
bootcmd_emmc=set bootargs ${bootargs_emmc};ext2load mmc 1:1 0x48080000 /boot/Image;ext2load mmc 1:1 0x48000000 /boot/${dtb};run booti_cmd
+
bootcmd_emmc=setenv bootargs ${bootargs_emmc};ext2load mmc 1:1 0x48080000 /boot/Image;ext2load mmc 1:1 0x48000000 /boot/${dtb};run booti_cmd
bootcmd_nfs=set bootargs ${bootargs_nfs};bootp 0x48080000 Image;tftp 0x48000000 ${dtb};run booti_cmd
+
bootcmd_nfs=setenv bootargs ${bootargs_nfs};tftp 0x48080000 Image;tftp 0x48000000 ${dtb};run booti_cmd
bootcmd_sd0=set bootargs ${bootargs_sd0};ext2load mmc 0:1 0x48080000 /boot/Image;ext2load mmc 0:1 0x48000000 /boot/${dtb};run booti_cmd
+
bootcmd_sd0=setenv bootargs ${bootargs_sd0};ext2load mmc 0:1 0x48080000 /boot/Image;ext2load mmc 0:1 0x48000000 /boot/${dtb};run booti_cmd
 
bootdelay=3
 
bootdelay=3
 
booti_cmd=booti 0x48080000 - 0x48000000
 
booti_cmd=booti 0x48080000 - 0x48000000
dtb=r8a7795-h3ulcb.dtb
+
dtb=r8a77951-ulcb.dtb
ethact=ravb
 
 
ethaddr=2E:09:0A:00:BE:11
 
ethaddr=2E:09:0A:00:BE:11
fdt_high=0xffffffffffffffff
 
initrd_high=0xffffffffffffffff
 
stderr=serial
 
stdin=serial
 
stdout=serial
 
ver=U-Boot 2015.04 (Sep 23 2016 - 13:45:29)<br>
 
Environment size: 1092/131068 bytes
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
* To verify the SD card, type the following in U-Boot prompt:
 
* To verify the SD card, type the following in U-Boot prompt:
 
*: <syntaxhighlight lang="text">
 
*: <syntaxhighlight lang="text">
=> mmc dev 0  
+
=> mmc dev 0
 
switch to partitions #0, OK
 
switch to partitions #0, OK
 
mmc0 is current device
 
mmc0 is current device
Line 599: Line 623:
 
<DIR>      4096 .
 
<DIR>      4096 .
 
<DIR>      4096 ..
 
<DIR>      4096 ..
         27556352 Image-5.4.0-yocto-standard
+
<SYM>         27 Image
<SYM>        26 Image
+
        33102336 Image-5.10.0-yocto-standard
           77264 r8a7795-es1-h3ulcb.dtb
+
           82258 r8a77950-ulcb.dtb
           76285 r8a7795-h3ulcb-4x2g.dtb
+
           80970 r8a77951-ulcb.dtb
           76269 r8a7795-h3ulcb.dtb
+
           81598 r8a779m1-ulcb.dtb
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 616: Line 640:
 
$ echo 0 > /sys/class/leds/led5(6)/brightness
 
$ echo 0 > /sys/class/leds/led5(6)/brightness
 
</syntaxhighlight>
 
</syntaxhighlight>
 
== Q&A site ==
 
http://renesasrulz.com/r-car-h3-m3-cockpit/
 
 
== FAQ page ==
 
https://elinux.org/R-Car/Boards/Yocto-Gen3-CommonFAQ
 
  
 
== FAQ ==
 
== FAQ ==
Line 652: Line 670:
 
#: H3 SK: No.1 of [[R-Car/Boards/H3SK#Known_Issues]]
 
#: H3 SK: No.1 of [[R-Car/Boards/H3SK#Known_Issues]]
 
#: M3 SK: No.2 of [[R-Car/Boards/M3SK#Known_Issues]]
 
#: M3 SK: No.2 of [[R-Car/Boards/M3SK#Known_Issues]]
# [Known issue] eMMC performance is lower than Yocto v3.21.0.
+
# [Known issue] Optee error
# [Known issue] After "starting kernel..", some messages such as following are shown in U-boot.
+
#: console log are displayed from WARN_ON macro while the Linux booting.
#:* timeout during DMA
+
#:: <syntaxhighlight lang="text">optee: PTA_CMD_GET_DEVICES invoke function err: ffff0009</syntaxhighlight>
#:* communication out of sync
+
#: It does not affect the behavior of the Linux Kernel and OP-TEE.
 +
# [Known issue] SMCCC error
 
#: This issue does not affect booting Yocto.
 
#: This issue does not affect booting Yocto.
# [Known issue] U-boot shows that 2GB DDR is equipped on M3v3 SK.
+
#:: <syntaxhighlight lang="text">[    1.675346] SMCCC: SOC_ID: ARCH_FEATURES(ARCH_SOC_ID) returned error: fffffffffffffffd</syntaxhighlight>
#: It is just display issue.
+
# [Known issue] The performance is not good compared to previous release.
#: In Yocto, it recognizes 8GB DDR.
+
#:ex.) glmark2 score, eMMC
#: <syntaxhighlight lang=text>
+
#: It can be improved by setting cpu governor to 'performance'.
NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.3.0.0
+
#:: <syntaxhighlight lang="text">
NOTICE:  BL2: PRR is R-Car M3 Ver.3.0
+
root@h3ulcb:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
NOTICEBL2: Board is Starter Kit Rev.3.0
+
schedutil
NOTICE:  BL2: Boot device is HyperFlash(80MHz)
+
root@h3ulcb:~# echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
NOTICE: BL2: LCM state is CM
+
</syntaxhighlight>
NOTICE:  AVS setting succeeded. DVFS_SetVID=0x53
+
#: See also: [[R-Car/Default-CPUFreq-governor-from-v5-9]] .
NOTICE: BL2: DDR3200(rev.0.41)
+
# [Known issue] DDR memory size issue
NOTICE: BL2: [COLD_BOOT]
+
#: On some boards U-boot and the kernel do not output the correct DDR memory size.
NOTICE:  BL2: DRAM Split is 2ch
+
#:: <syntaxhighlight lang="text">
NOTICE: BL2: QoS is default setting(rev.0.04)
+
Ex) R-Car M3 v3 DDR 8GiB Starter Kit (RTP8J77961ASKB0SK0SA05A)
NOTICE:  BL2: DRAM refresh interval 1.95 usec
+
CPU: Renesas Electronics R8A7796 rev 3.0
NOTICE: BL2: Periodic Write DQ Training
+
Model: Renesas M3ULCB board based on r8a77960
NOTICE:  BL2: CH0: 400000000 - 43fffffff, 1 GiB
+
DRAM1.9 GiB <-- here
NOTICE:  BL2: CH2: 600000000 - 63fffffff, 1 GiB
 
NOTICE:  BL2: FDT at 0xe63247c8
 
NOTICE:  BL2: v2.3():2871855
 
NOTICE:  BL2: Built : 10:19:08, Dec 10 2020
 
NOTICE: BL2: Normal boot
 
NOTICE: BL2: dst=0xe6324300 src=0x8180000 len=512(0x200)
 
NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
 
NOTICE:  rcar_file_len: len: 0x0003e000
 
NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=253952(0x3e000)
 
NOTICE: rcar_file_len: len: 0x00200000
 
NOTICE: BL2: dst=0x44100000 src=0x8200000 len=2097152(0x200000)
 
NOTICErcar_file_len: len: 0x00100000
 
NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
 
NOTICE:  BL2: Booting BL31
 
  
U-Boot 2020.01 (Dec 10 2020 - 10:54:27 +0000)
+
Ex) R-Car H3 v3 DDR 8GiB Starter Kit (RTP0RC77951SKBX010SA03)
CPU: Renesas Electronics R8A7796 rev 3.0
+
root@h3ulcb:~# cat /proc/meminfo |grep MemTotal
Model: Renesas M3ULCB board based on r8a7796 ES3.0+ with 8GiB (2 x 4 GiB)
+
MemTotal:       3840572 kB <-- here
DRAM: 1.9 GiB
+
root@h3ulcb:~#
Bank #0: 0x048000000 - 0x07fffffff, 896 MiB
 
Bank #1: 0x600000000 - 0x63fffffff, 1 GiB
 
MMC:  sd@ee100000: 0, sd@ee140000: 1
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
#:: Please see below to work around this issue.
 +
#:: See "Step 4" of https://elinux.org/R-Car/Boards/Yocto-Gen3/v5.1.0#Build_using_manual_steps .
 +
 +
{{Template:R-Car-Yocto-Gen3-footer}}

Latest revision as of 23:36, 22 March 2022


This page is out of date.
Please refer to the Yocto-Gen3 page for the latest version.

Introduction

This page contains information on building and running Yocto on:

NOTE: USE OFFICIAL DOCUMENTATION provided with R-Car BSPs FOR H3SK/M3SK boards
See also:

Topic

EOL Notification of the M3SK

Production of M3SK is discontinued.
See M3SK page for detail.

The new version of R-Car Starter Kit Premier is now on sale !!

  • Equipped with R-Car H3e-2G
    (En) https://www.renesas.com/jp/en/about/press-room/renesas-launches-r-car-gen3e-20-percent-higher-cpu-speed-automotive-infotainment-cockpit-and-digital
    (Zh) https://www.renesas.com/jp/zh/about/press-room/renesas-launches-r-car-gen3e-20-percent-higher-cpu-speed-automotive-infotainment-cockpit-and-digital
    (Jp) https://www.renesas.com/jp/ja/about/press-room/renesas-launches-r-car-gen3e-20-percent-higher-cpu-speed-automotive-infotainment-cockpit-and-digital
  • CPU performance is increased 20% by supporting up to 2GHz frequency over past products.
  • You can buy from here.

SW Release Information

Board name SW name Release date Note
R-Car Starter Kit ( Premier / Pro ) Yocto v5.9.0 (stable) [New!!] 2022/02/08
Kingfisher Infotainment Board Yocto v5.9.0 (stable) [New!!] 2022/02/14 To check for latest information, please refer to the meta-rcar/tree/v5.9.0.
Android 10 (stable) 2021/07/26 R-Car Starter Kit Premier(R-Car H3) + Kingfisher is supported.
R-Car Starter Kit Pro(RTP8J77961ASKB0SK0SA05A) + Kingfisher is also supported from 2021/11/25.
Android P (stable) 2020/09/29 R-Car Starter Kit Premier(R-Car H3) + Kingfisher is supported.
R-Car Starter Kit Pro(RTP8J77961ASKB0SK0SA05A) + Kingfisher is also supported from 2021/03/16.
CCPF-SK Board Yocto v5.9.0 (latest) [New!!] 2022/02/08 Prebuilt binary is available in Quick startup guide page. (Updated on 2022/03/18)


R-Car Starter Kit is available

R-Car Starter Kit information
Board Name SoC version Hardware information Where to buy
R-Car Starter Kit Premier (H3) v3.0 Click here Click here
R-Car Starter Kit Pro (M3) v3.0 Click here Click here



Software revisions

Software Revision
Yocto Project 3.1.4
aarch64-poky-linux-gcc (GCC) 9.3
Wayland/Weston 1.18.0/8.0.0
GStreamer 1.16.3
Kernel Ver 5.10
Userland 64/32bit 64
U-Boot 2020.10
OP_TEE 3.8.0
OpenGL ES 3.2

Host PC

Ubuntu 16.04/20.04 LTS (64bit) is recommended as OS. 32bit version is not supported.

Required packages

  1. Download evaluation version of proprietary graphics and multimedia drivers from Renesas.
    To download Multimedia and Graphics library and related Linux drivers, please use the following link:
    Download two files:
    • R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
    • R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip

    Graphic drivers are required for Wayland. Multimedia drivers are optional.
  2. Install required packages
    sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
    build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
    xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
    libsdl1.2-dev pylint3 xterm
    
    Refer to Yocto Project Quick Start for more information.

Building the BSP for Renesas H3 Starter Kit, M3 Starter Kit

NOTE: to have ADAS View and HAD Solution kits supported follow instructions: R-Car Yocto Gen3 ADAS

Using build script

  1. Directory Structure
    |--build.sh
    `--proprietary
       |--R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
       `--R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-202100428.zip
    
  2. Build script(build.sh)
    #!/bin/bash
    
    BOARD_LIST=("h3ulcb" "m3ulcb")
    TARGET_BOARD=$1
    PROPRIETARY_DIR=`pwd`/proprietary
    WORK=`pwd`/${TARGET_BOARD}
    
    POKY_COMMIT=424296bf9bb4bae27febf91bce0118df09ce5fa1
    META_OE_COMMIT=f2d02cb71eaff8eb285a1997b30be52486c160ae
    META_RENESAS_COMMIT=fd8ab2bb1b5ca98483c6f4aecf09a85c4d6bc016
    
    GFX_MMP_LIB=R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
    GFX_MMP_DRIVER=R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
    
    Usage () {
        echo "Usage: $0 \${TARGET_BOARD_NAME}"
        echo "BOARD_NAME list: "
        for i in ${BOARD_LIST[@]}; do echo "  - $i"; done
        exit
    }
    
    # Check Param.
    if ! `IFS=$'\n'; echo "${BOARD_LIST[*]}" | grep -qx "${TARGET_BOARD}"`; then
        Usage
    fi
    
    mkdir -p ${WORK}
    cd ${WORK}
    
    # Clone basic Yocto layers in parallel
    git clone git://git.yoctoproject.org/poky &
    git clone git://git.openembedded.org/meta-openembedded &
    git clone https://github.com/renesas-rcar/meta-renesas &
    
    # Wait for all clone operations
    wait
    
    # Switch to proper branches/commits
    cd ${WORK}/poky
    git checkout -b tmp ${POKY_COMMIT}
    cd ${WORK}/meta-openembedded
    git checkout -b tmp ${META_OE_COMMIT}
    cd ${WORK}/meta-renesas
    git checkout -b tmp ${META_RENESAS_COMMIT}
    
    # Apply patch to update meta-renesas
    cd ${WORK}
    curl -sO https://elinux.org/images/6/6a/Update-meta-rcar-for-Yv510-20210531.patch.zip
    unzip -qo Update-meta-rcar-for-Yv510-20210531.patch.zip
    cd ${WORK}/meta-renesas
    patch -N -p1 < ../Update-meta-rcar-for-Yv510-20210531.patch
    
    # Populate meta-renesas with proprietary software packages
    WORK_PROP_DIR=${WORK}/proprietary
    mkdir -p ${WORK_PROP_DIR}
    unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_LIB} -d ${WORK_PROP_DIR}
    unzip -qo ${PROPRIETARY_DIR}/${GFX_MMP_DRIVER} -d ${WORK_PROP_DIR}
    cd ${WORK}/meta-renesas
    sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f ${WORK_PROP_DIR}
    
    cd ${WORK}
    source poky/oe-init-build-env ${WORK}/build
    
    #cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/bsp/*.conf ./conf/
    #cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/gfx-only/*.conf ./conf/
    cp ${WORK}/meta-renesas/meta-rcar-gen3/docs/sample/conf/${TARGET_BOARD}/poky-gcc/mmp/*.conf ./conf/
    
    cd ${WORK}/build
    cp conf/local-wayland.conf conf/local.conf
    
    bitbake core-image-weston
    
  3. build
    ./build.sh <target_board_name>
    
    If the build completes successfully, all the necessary files are generated in a following directory:
    ./<target_board_name>/build/tmp/deploy/images/<target_board_name>
    

Manual steps

  1. Create a directory and switch to it
    Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
    mkdir build
    cd build
    export WORK=`pwd`
    
  2. Clone basic Yocto layers:
    cd $WORK
    git clone git://git.yoctoproject.org/poky
    git clone git://git.openembedded.org/meta-openembedded
    git clone https://github.com/renesas-rcar/meta-renesas
    
  3. Switch to proper branches/commits
    cd $WORK/poky
    git checkout -b tmp 424296bf9bb4bae27febf91bce0118df09ce5fa1
    cd $WORK/meta-openembedded
    git checkout -b tmp f2d02cb71eaff8eb285a1997b30be52486c160ae
    cd $WORK/meta-renesas
    git checkout -b tmp fd8ab2bb1b5ca98483c6f4aecf09a85c4d6bc016
    
    Another versions are not tested for compatibility.
    Legacy BSP instruction can be found here R-Car Yocto Gen3 legacy
  4. Apply patch to update meta-rcar(patch file: File:Update-meta-rcar-for-Yv510-20210531.patch.zip)
    cd ${WORK}
    curl -sO https://elinux.org/images/6/6a/Update-meta-rcar-for-Yv510-20210531.patch.zip
    unzip -qo Update-meta-rcar-for-Yv510-20210531.patch.zip
    cd ${WORK}/meta-renesas
    patch -N -p1 < ../Update-meta-rcar-for-Yv510-20210531.patch
    
  5. Create $WORK/../proprietary folder, then download proprietary driver modules to it.
    See also Required_packages
    You should see the following files:
    $ ls -1 $WORK/../proprietary/*.zip
    R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip
    R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
    
  6. Populate meta-renesas with proprietary software packages.
    export PKGS_DIR=$WORK/../proprietary
    cd $PKGS_DIR
    unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20210428.zip 
    unzip -qo R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20210428.zip
    cd $WORK/meta-renesas
    sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh -f $PKGS_DIR
    unset PKGS_DIR
    
  7. Setup build environment
    cd $WORK
    source poky/oe-init-build-env $WORK/build
    
  8. Prepare default configuration files.
    cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<h3ulcb|m3ulcb>/poky-gcc/mmp/*.conf ./conf/
    cd $WORK/build
    cp conf/local-wayland.conf conf/local.conf
    
  9. Start the build
    bitbake core-image-weston
    
  10. Building image can take up to a few hours depending on your host system performance.
    After the build has been completed successfully, you should see the output similar to:
    NOTE: Tasks Summary: Attempted 4704 tasks of which 31 didn't need to be rerun and all succeeded.
    
    and the command prompt should return.
  11. Bitbake has generated all the necessary files in ./tmp/deploy/images directory.
    You can verify its content:
    $ ls -1 `find ./tmp/deploy/images/h3ulcb/ -maxdepth 1 -type l -print`
    ./tmp/deploy/images/h3ulcb/Image
    ./tmp/deploy/images/h3ulcb/Image-h3ulcb.bin
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.ext4
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.manifest
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.tar.bz2
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.testdata.json
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.bmap
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.xz
    ./tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb.wic.xz.sha256sum
    ./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
    ./tmp/deploy/images/h3ulcb/r8a77950-ulcb-h3ulcb.dtb
    ./tmp/deploy/images/h3ulcb/r8a77950-ulcb.dtb
    ./tmp/deploy/images/h3ulcb/r8a77951-ulcb-h3ulcb.dtb
    ./tmp/deploy/images/h3ulcb/r8a77951-ulcb.dtb
    ./tmp/deploy/images/h3ulcb/r8a779m1-ulcb-h3ulcb.dtb
    ./tmp/deploy/images/h3ulcb/r8a779m1-ulcb.dtb
    ./tmp/deploy/images/h3ulcb/u-boot-elf-h3ulcb.srec
    ./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin
    ./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin-r8a7795_h3ulcb
    ./tmp/deploy/images/h3ulcb/u-boot-initial-env-h3ulcb-r8a7795_h3ulcb
    ./tmp/deploy/images/h3ulcb/u-boot-initial-env-r8a7795_h3ulcb
    ./tmp/deploy/images/h3ulcb/u-boot.bin
    ./tmp/deploy/images/h3ulcb/u-boot.bin-r8a7795_h3ulcb
    
    Image is a Kernel image, *.dtb is a blob file, core-image-<image_type>-<board_name>.tar.bz2 is the rootfs, modules-<board_name>.tgz are kernel modules.
  12. You can now proceed with Running Yocto images

Relationship diagram between each SK board and DTB file in Yocto v5.1.0

Board name SoC version Type Name DTB file
H3SK 2.0 RTP0RC77951SKBX010SA00 r8a77951-ulcb.dtb
H3SK 2.0 RTP0RC77951SKBX010SA01 r8a77951-ulcb.dtb
H3SK 2.0/3.0 RTP0RC77951SKBX010SA03 r8a77951-ulcb.dtb
H3e-2G SK 3.0 RTP8J779M1ASKB0SK0SA003 r8a779m1-ulcb.dtb
M3SK 1.0 RTP0RC7796SKBX0010SA09 r8a77960-ulcb.dtb
M3SK 3.0 RTP8J77961ASKB0SK0SA05A r8a77961-ulcb.dtb

Build SDK

  • After building BSP you may build SDK:
    bitbake core-image-weston -c populate_sdk
    
  • After build finished the SDK installation script may be found in following path:
    tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-*.sh
    
  • Install SDK by run the following command and follow instructions on the screen:
    ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-*.sh
    

Running Yocto images

Linux kernel can be booted from microSD card or from TFTP. Root FS can be mounted from micro SD card or via NFS.

Loading kernel via TFTP and rootfs via NFS

Follow these steps to setup working TFTP and NFS server:

  1. Setup a TFTP server.
    Install tftpd-hpa package along with tftp tools:
    sudo apt-get install tftp tftpd-hpa
    
  2. Copy Image and XXXX.dtb from $WORK/build/tmp/deploy/images/<board_name>/ to TFTP server root.
    cp $WORK/build/tmp/deploy/images/h3ulcb/Image /srv/tftp/
    cp $WORK/build/tmp/deploy/images/h3ulcb/XXXX.dtb /srv/tftp/
    
    Which version is my H3SK board?
  3. Verify that TFTP server is working.
    tftp localhost << EOS
        get Image
        quit
    EOS
    ls Image
    
  4. Setup NFS server.
    1. Install necessary packages:
      sudo apt-get install nfs-kernel-server nfs-common
      
    2. Start NFS server:
      sudo /etc/init.d/nfs-kernel-server start
      
  5. Export root FS to NFS. (Change IMAGE and MACHINE to fit your build).
    1. Unpack rootfs to a dedicated directory:
      IMAGE=weston
      MACHINE=h3ulcb|m3ulcb
      NFS_ROOT=/nfs/${MACHINE}
      sudo mkdir -p "${NFS_ROOT}"
      sudo rm -rf "${NFS_ROOT}"/*
      sudo tar -xjf "${WORK}/build/tmp/deploy/images/${MACHINE}/core-image-${IMAGE}-${MACHINE}-*.tar.bz2" -C "${NFS_ROOT}"
      sync
      
    2. Edit /etc/exports:
      sudo vi /etc/exports
      
      add
      /nfs/h3ulcb	*(rw,no_subtree_check,sync,no_root_squash,no_all_squash)
      /nfs/m3ulcb	*(rw,no_subtree_check,sync,no_root_squash,no_all_squash)
      
      Save the file and exit.
    3. Force NFS server to re-read /etc/exports
      sudo exportfs -a
      
  6. Verify that NFS is working.
    [builduser@buildmachine ~]$ showmount -e localhost
    Export list for localhost:
    /nfs/h3ulcb *
    /nfs/m3ulcb *
    
  7. Boot into U-Boot command prompt
    1. Connect to serial console over microUSB using minicom or picocom.
    2. Switch the board on or reset it. Press any key to stop U-Boot automatic countdown.
    Refer to H3SK board page, M3SK board page for more information.
  8. Configure Ethernet, TFTP, and kernel command line in U-Boot:
    setenv ipaddr <board-ip>
    setenv serverip <your-computer-ip>
    setenv dtb <your-dtb-file-name>
    setenv bootcmd 'tftp 0x48080000 <path_to_Image>/Image; tftp 0x48000000 <path_to_dtb>/${dtb}; booti 0x48080000 - 0x48000000'
    setenv bootargs 'ignore_loglevel rw root=/dev/nfs nfsroot=<your-computer-ip>:<nfs-path>,nfsvers=3 ip=<board-ip>:<your-computer-ip>::255.255.255.0:h3ulcb'
    saveenv
    
    Replace <board-ip> with the proper IP address for the board. Replace <your-computer-ip> with the IP address of your computer, where tftp and nfs servers are installed. Replace <nfs-path> with the exported path of the root FS.
    For example:
    setenv ipaddr 192.168.1.3
    setenv serverip 192.168.1.2
    setenv dtb r8a77951-ulcb.dtb
    setenv bootcmd 'tftp 0x48080000 /Image; tftp 0x48000000 /${dtb}; booti 0x48080000 - 0x48000000'
    setenv bootargs 'ignore_loglevel rw root=/dev/nfs nfsroot=${serverip}:/nfs/h3ulcb,nfsvers=3,tcp ip=${ipaddr}:${serverip}::255.255.255.0:h3ulcb'
    saveenv
    
    You can also use
    dhcp
    
    command to obtain information from DHCP server.
    Note: You can always see the environment with printenv command. Refer to U-Boot manual for details.
  9. Verify the connection over Ethernet from U-Boot:
    ping <your-computer-ip>
    
    You should see:
    => ping 192.168.1.2
    Using ethernet@e6800000 device
    host 192.168.1.2 is alive
    
  10. Reset the board by pushing reset button
    Refer to H3SK board page, M3SK board page for more information.
  11. The board should boot the kernel:
    NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.3.0.1
    NOTICE:  BL2: PRR is R-Car H3 Ver.3.0
    NOTICE:  BL2: Board is Starter Kit Premier Rev.2.1
    NOTICE:  BL2: Boot device is HyperFlash(80MHz)
    NOTICE:  BL2: LCM state is CM
    NOTICE:  AVS setting succeeded. DVFS_SetVID=0x53
    NOTICE:  BL2: DDR3200(rev.0.41)
    NOTICE:  BL2: [COLD_BOOT]
    NOTICE:  BL2: DRAM Split is 4ch(DDR f)
    NOTICE:  BL2: QoS is default setting(rev.0.11)
    NOTICE:  BL2: DRAM refresh interval 1.95 usec
    NOTICE:  BL2: Periodic Write DQ Training
    NOTICE:  BL2: CH0: 400000000 - 47fffffff, 2 GiB
    NOTICE:  BL2: CH1: 500000000 - 57fffffff, 2 GiB
    NOTICE:  BL2: CH2: 600000000 - 67fffffff, 2 GiB
    NOTICE:  BL2: CH3: 700000000 - 77fffffff, 2 GiB
    NOTICE:  BL2: Lossy Decomp areas
    NOTICE:       Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
    NOTICE:       Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
    NOTICE:       Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
    NOTICE:  BL2: FDT at 0xe63267c8
    NOTICE:  BL2: v2.3():7638cfbe6-dirty
    NOTICE:  BL2: Built : 04:47:31, May 31 2021
    NOTICE:  BL2: Normal boot
    NOTICE:  BL2: dst=0xe6326300 src=0x8180000 len=512(0x200)
    NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
    NOTICE:  rcar_file_len: len: 0x0003e000
    NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=253952(0x3e000)
    NOTICE:  rcar_file_len: len: 0x00200000
    NOTICE:  BL2: dst=0x44100000 src=0x8200000 len=2097152(0x200000)
    NOTICE:  rcar_file_len: len: 0x00100000
    NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
    NOTICE:  BL2: Booting BL31
    
    
    U-Boot 2020.10 (May 31 2021 - 04:47:42 +0000)
    
    CPU: Renesas Electronics R8A7795 rev 3.0
    Model: Renesas H3ULCB board based on r8a77950
    DRAM:  7.9 GiB
    MMC:   sd@ee100000: 0, sd@ee140000: 1
    Loading Environment from MMC... OK
    In:    serial@e6e88000
    Out:   serial@e6e88000
    Err:   serial@e6e88000
    Net:   eth0: ethernet@e6800000
    Hit any key to stop autoboot:  0
    ethernet@e6800000 Waiting for PHY auto negotiation to complete. done
    Using ethernet@e6800000 device
    TFTP from server 192.168.137.10; our IP address is 192.168.137.2
    Filename '/h3ulcb/Image'.
    Load address: 0x48080000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #############################################
             2.1 MiB/s
    done
    Bytes transferred = 33102336 (1f91a00 hex)
    Using ethernet@e6800000 device
    TFTP from server 192.168.137.10; our IP address is 192.168.137.2
    Filename '/h3ulcb/r8a77951-ulcb.dtb'.
    Load address: 0x48000000
    Loading: ######
             2.3 MiB/s
    done
    Bytes transferred = 80970 (13c4a hex)
    Moving Image from 0x48080000 to 0x48200000, end=4a220000
    ## Flattened Device Tree blob at 48000000
       Booting using the fdt blob at 0x48000000
       Loading Device Tree to 0000000053fe9000, end 0000000053fffc49 ... OK
    Overlap found: 0x500000000..0x57fffffff / 0x500000000..0x53fffffff
    Overlap found: 0x600000000..0x67fffffff / 0x600000000..0x63fffffff
    Overlap found: 0x700000000..0x77fffffff / 0x700000000..0x73fffffff
    
    Starting kernel ...
    

Loading kernel and rootfs via eMMC/SD card

This section describes steps that are necessary for preparing and booting from SD card.

Preparing eMMC/SD card

WARNING! These steps will erase the SD card completely. In short, all files will be lost.
There two methods to prepare SD card. so, please select one of them.

Manual steps

In order to prepare you SD card, follow these instructions on host machine:

  1. Partion your SD card to set 1 partition and ID=83 (Linux)
    Make sure the SD card doesn't contain any important files.
    $ fdisk /dev/mmcblk0
    -> d
    -> n
    -> p
    -> 1
    -> t
    -> 83
    
  2. Format this partition to ext3 (or ext4)
    $ mkfs.ext3 /dev/mmcblk0p1
    
  3. Mount this partition on your host to any directory and upack the core-image-*.tar.bz2 into mounted folder.
    And Copy Image and XXXX.dtb from $WORK/build/tmp/deploy/images/<board_name>/ to sd card /boot.
    $ mount /dev/mmcblk0p1 /mnt
    $ cd <your_yocto_build_directory>
    $ IMAGE=weston
    $ MACHINE=h3ulcb|m3ulcb
    $ tar xfj  build/tmp/deploy/images/${MACHINE}/core-image-${IMAGE}-${MACHINE}-*.rootfs.tar.bz2  -C /mnt
    $ cp $WORK/build/tmp/deploy/images/${MACHINE}/XXXX.dtb /mnt/boot/
    
    NOTE: probably you need to be a root user, hence use "sudo"
Using bmaptool

Install bmaptool by following command:

sudo apt install bmap-tools

ex.) case of '/dev/sdb':

sudo bmaptool copy ./core-image-weston-m3ulcb.wic.xz /dev/sdb
Note:
It requires to be located both *.wic.xz and *.wic.bmap in same directory.
It doesn't required to contain partition number(ex. /dev/sdb1, /dev/mmcblk0p1, and so on), /dev/mmcblk0 or /dev/sdb and so on are correct
Log:
bash $ sudo bmaptool copy ./core-image-weston-m3ulcb.wic.xz /dev/XXXX
bmaptool: info: discovered bmap file './core-image-weston-m3ulcb.wic.bmap'
bmaptool: info: block map format version 2.0
bmaptool: info: 199184 blocks of size 4096 (778.1 MiB), mapped 102471 blocks (400.3 MiB or 51.4%)
bmaptool: info: copying image 'core-image-weston-m3ulcb.wic.xz' to block device '/dev/XXXX' using bmap file 'core-image-weston-m3ulcb.wic.bmap'
bmaptool: info: 100% copied
bmaptool: info: synchronizing '/dev/XXXX'
bmaptool: info: copying time: 1m 6.8s, copying speed 6.0 MiB/sec

Note:

/dev/XXXX is differnet by host PC environment.
It can be checked by using 'fdisk -l'.

Configure U-Boot to boot from SD card

  • Proper U-Boot command to boot from SD:
    # setenv bootargs 'rw root=/dev/mmcblk1p1 rootwait'
    # ext2load mmc 0:1 0x48080000 /boot/Image
    # ext2load mmc 0:1 0x48000000 /boot/XXXX.dtb
    # booti 0x48080000 - 0x48000000
    
    Note from user:
    When I created my image with mkfs.ext3, and booted with rootfstype=ext3, the kernel could not find mount the filesystem.
    The kernel boot gave an error message:
    "EXT4-fs (mmcblk1p1): couldn't mount as ext3 due to feature incompatibilities".
    I switched to 'rootfstype=ext4' in my bootargs, and the kernel booted OK.
  • Example of U-Boot environment variables:
    bootargs_emmc=rw root=/dev/mmcblk0p1 rootwait
    bootargs_nfs=rw root=/dev/nfs nfsroot=192.168.1.2:/nfs/h3ulcb,tcp,v3 rootwait ip=dhcp
    bootargs_sd0=rw root=/dev/mmcblk1p1 rootwait
    bootcmd=run bootcmd_sd0
    bootcmd_emmc=setenv bootargs ${bootargs_emmc};ext2load mmc 1:1 0x48080000 /boot/Image;ext2load mmc 1:1 0x48000000 /boot/${dtb};run booti_cmd
    bootcmd_nfs=setenv bootargs ${bootargs_nfs};tftp 0x48080000 Image;tftp 0x48000000 ${dtb};run booti_cmd
    bootcmd_sd0=setenv bootargs ${bootargs_sd0};ext2load mmc 0:1 0x48080000 /boot/Image;ext2load mmc 0:1 0x48000000 /boot/${dtb};run booti_cmd
    bootdelay=3
    booti_cmd=booti 0x48080000 - 0x48000000
    dtb=r8a77951-ulcb.dtb
    ethaddr=2E:09:0A:00:BE:11
    
  • To verify the SD card, type the following in U-Boot prompt:
    => mmc dev 0
    switch to partitions #0, OK
    mmc0 is current device
    => mmc info
    Device: sd@ee100000
    Manufacturer ID: 3
    OEM: 5344
    Name: SC32G
    Bus Speed: 199999992
    Mode: UHS SDR104 (208MHz)
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 29.7 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    => ext2ls mmc 0:1 /boot
    <DIR>       4096 .
    <DIR>       4096 ..
    <SYM>         27 Image
            33102336 Image-5.10.0-yocto-standard
               82258 r8a77950-ulcb.dtb
               80970 r8a77951-ulcb.dtb
               81598 r8a779m1-ulcb.dtb
    

How to test some capabilities

SW3

$ hexdump /dev/input/event0

LED5/LED6

$ echo 1 > /sys/class/leds/led5(6)/brightness
$ echo 0 > /sys/class/leds/led5(6)/brightness

FAQ

How do access to USB memory from U-boot(Yocto v3.13.0 or later)

  1. Some USB memory may not be recognized.
    => usb start
    starting USB...
    USB0:   USB EHCI 1.10
    scanning bus 0 for devices... EHCI timed out on TD - token=0x80008d80
    
          USB device not accepting new address (error=80000000)
    1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    =>
    
  2. [How to fix] Set the "usb_pgood_delay 2000" variable
    => setenv usb_pgood_delay 2000
    => saveenv
    => reset
    => usb start
    

Known issues and limitations

  1. [SW limitation] Yocto v3.4.0 or later doesn't support RTP0RC7795SKBX0010SA00(H3 v1.1 Starter Kit).
    Please use the H3 v2.0 or v3.0 SK
  2. [Known issue] If you encounter a kernel hang-up while using Yocto v3.4.0 or later, please refer to the following pages.
    H3 SK: No.1 of R-Car/Boards/H3SK#Known_Issues
    M3 SK: No.2 of R-Car/Boards/M3SK#Known_Issues
  3. [Known issue] Optee error
    console log are displayed from WARN_ON macro while the Linux booting.
    optee: PTA_CMD_GET_DEVICES invoke function err: ffff0009
    
    It does not affect the behavior of the Linux Kernel and OP-TEE.
  4. [Known issue] SMCCC error
    This issue does not affect booting Yocto.
    [    1.675346] SMCCC: SOC_ID: ARCH_FEATURES(ARCH_SOC_ID) returned error: fffffffffffffffd
    
  5. [Known issue] The performance is not good compared to previous release.
    ex.) glmark2 score, eMMC
    It can be improved by setting cpu governor to 'performance'.
    root@h3ulcb:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    schedutil
    root@h3ulcb:~# echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    
    See also: R-Car/Default-CPUFreq-governor-from-v5-9 .
  6. [Known issue] DDR memory size issue
    On some boards U-boot and the kernel do not output the correct DDR memory size.
    Ex) R-Car M3 v3 DDR 8GiB Starter Kit (RTP8J77961ASKB0SK0SA05A)
    CPU: Renesas Electronics R8A7796 rev 3.0
    Model: Renesas M3ULCB board based on r8a77960
    DRAM:  1.9 GiB <-- here
    
    Ex) R-Car H3 v3 DDR 8GiB Starter Kit (RTP0RC77951SKBX010SA03)
    root@h3ulcb:~# cat /proc/meminfo |grep MemTotal
    MemTotal:        3840572 kB <-- here
    root@h3ulcb:~#
    
    Please see below to work around this issue.
    See "Step 4" of https://elinux.org/R-Car/Boards/Yocto-Gen3/v5.1.0#Build_using_manual_steps .


Q&A site

https://community.renesas.com/automotive/r-car-h3-m3-cockpit/

FAQ site