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

From eLinux.org
Jump to: navigation, search
(Building the BSP for Renesas H3 Starter Kit, M3 Starter Kit)
 
(119 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{TOC right}}
 
{{TOC right}}
This page contains information on building and running Yocto on [[R-Car/Boards/Salvator-X | Renesas R-Car-H3/M3 Salvator-X]], [[R-Car/Boards/Salvator-X-View | Renesas R-Car-H3/M3 Salvator-X.View]], [[R-Car/Boards/H3SK | Renesas R-Car-H3 Starter Kit Premier]], [[R-Car/Boards/H3SK-View | Renesas R-Car-H3 H3ULCB.View]] and [[R-Car/Boards/H3SK-HAD | Renesas R-Car-H3 H3ULCB.HAD]], [[R-Car/Boards/M3SK | Renesas R-Car-M3 Starter Kit Pro]], [[R-Car/Boards/M3SK-View | Renesas R-Car-M3 M3ULCB.View]] boards.
+
This page contains information on building and running Yocto on:
 +
* [[R-Car/Boards/H3SK | Renesas R-Car-H3 Starter Kit Premier]] (unofficial name - H3ULCB), https://www.renesas.com/us/en/solutions/automotive/adas/solution-kits/r-car-starter-kit.html
 +
* [[R-Car/Boards/M3SK | Renesas R-Car-M3 Starter Kit Pro]] (unofficial name - M3ULCB), https://www.renesas.com/us/en/solutions/automotive/adas/solution-kits/r-car-starter-kit.html
 +
'''NOTE: USE OFFICIAL DOCUMENTATION provided with R-Car BSPs FOR H3SK/M3SK boards'''
 +
<br/><br/>
 +
* [[R-Car/Boards/Kingfisher | Infotainment Carrier Board For R-Car Starter Kit(Kingfisher)]]
  
<br/>
+
== Yocto versions ==
R-Car Starter Kit Premier is an official name of H3ULCB board
+
[http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-2.1.3 Poky-2.1.3] is supported with Yocto v2.23.1. <br/>
<br/>
+
[http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-2.4.2 Poky-2.4.2] is supported with Yocto v3.9.0. <br/>
R-Car Starter Kit Pro is an official name of M3ULCB board
+
[http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-2.4.3 Poky-2.4.3] is supported with Yocto v3.13.0, v3.15.0, v3.19.0, v3.21.0. <br/>
 +
Specific commit of meta-openembedded is required.
  
== Yocto versions ==
+
== Host PC ==
[http://git.yoctoproject.org/cgit/cgit.cgi/poky/tag/?id=yocto-2.0.1 Poky-2.0.1] is supported. Specific commit of meta-openembedded is required.
+
Yocto v2.x.y(Ex Yocto v2.23.1) : Ubuntu 14.04 LTS (64bit) is recommended as OS. 32bit version is not supported. <br/>
 +
Yocto v3.x.y(Ex Yocto v3.21.0) : Ubuntu 16.04 LTS (64bit) is recommended as OS. 32bit version is not supported.  
  
 
== Preliminary steps ==
 
== Preliminary steps ==
Line 14: Line 21:
 
<li>Download evaluation version of proprietary graphics and multimedia drivers from Renesas.<br/>
 
<li>Download evaluation version of proprietary graphics and multimedia drivers from Renesas.<br/>
 
<br/>
 
<br/>
To download Multimedia and Graphics library, please use the following link:<br/>
+
To download Multimedia and Graphics library and related Linux drivers, please use the following link:<br/>
https://www.renesas.com/en-us/software/D6000290.html<br/>
+
https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard.html<br/>
To download related Linux drivers, please use the following link:<br/>
 
https://www.renesas.com/en-us/media/secret/solutions/automotive/rcar-demoboard/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160906.zip<br/>
 
 
<br/>
 
<br/>
Graphic drivers are required for X11 and Wayland. Multimedia drivers are optional.<br/>
+
Graphic drivers are required for Wayland. Multimedia drivers are optional.<br/>
 
<br/>
 
<br/>
 
</li>
 
</li>
Line 27: Line 32:
 
<pre>
 
<pre>
 
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
+
     build-essential chrpath socat libsdl1.2-dev xterm python-crypto cpio python python3 \
 +
    python3-pip python3-pexpect xz-utils debianutils iputils-ping libssl-dev
 
</pre>
 
</pre>
 +
 
===== Fedora =====
 
===== Fedora =====
 
<pre>
 
<pre>
Line 34: Line 41:
 
     diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
 
     diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
 
     ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \
 
     ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \
     SDL-devel xterm
+
     SDL-devel xterm python-crypto cpio python python3 python3-pip python3-pexpect \
 +
    ghc-lzma-conduit iputils openssl
 
</pre>
 
</pre>
 
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 40: Line 48:
 
</ol>
 
</ol>
  
== Building the BSP for Renesas R-Car Salvator-X H3/M3, Salvator-X.View H3/M3, H3ULCB, H3ULCB.View, H3ULCB.HAD, M3ULCB, M3ULCB.View ==
+
== 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/Boards/Yocto-Gen3-ADAS | R-Car Yocto Gen3 ADAS]]
 
<ol>
 
<ol>
 
<li>Create a directory and switch to it <br/>
 
<li>Create a directory and switch to it <br/>
Line 56: Line 65:
 
git clone git://git.openembedded.org/meta-openembedded
 
git clone git://git.openembedded.org/meta-openembedded
 
git clone git://git.linaro.org/openembedded/meta-linaro.git
 
git clone git://git.linaro.org/openembedded/meta-linaro.git
 +
git clone git://github.com/renesas-rcar/meta-renesas
 
</pre>
 
</pre>
 
</li>
 
</li>
Line 63: Line 73:
 
<ol>
 
<ol>
 
<li>
 
<li>
For Yocto v2.12.0
+
For Yocto v2.23.1
 
<pre>
 
<pre>
 
cd $WORK/poky
 
cd $WORK/poky
git checkout -b tmp 40376446904ae3529be41737fed9a0b650ed167d
+
git checkout -b tmp yocto-2.1.3
 
cd $WORK/meta-openembedded
 
cd $WORK/meta-openembedded
git checkout -b tmp 8ab04afbffb4bc5184cfe0655049de6f44269990
+
git checkout -b tmp 55c8a76da5dc099a7bc3838495c672140cedb78e
 
cd $WORK/meta-linaro
 
cd $WORK/meta-linaro
git checkout -b tmp 9b1fd178309544dff1f7453e796a9437125bc0d9
+
git checkout -b tmp 2f51d38048599d9878f149d6d15539fb97603f8f
 +
cd $WORK/meta-renesas
 +
git checkout -b tmp 7acbf5e2f99c59478adbc73c6a40d314589a3009
 
</pre>
 
</pre>
 
</li>
 
</li>
</ol>
+
<li>
Another versions are not tested for compatibility.
+
For Yocto v3.9.0
 +
<pre>
 +
cd $WORK/poky
 +
git checkout -b tmp 342fbd6a3e57021c8e28b124b3adb241936f3d9d
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp dacfa2b1920e285531bec55cd2f08743390aaf57
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
 +
cd $WORK/meta-renesas
 +
git checkout -b tmp fd078b6ece537d986852cb827bd21e022a797b2f
 +
</pre>
 +
</li>
 +
<li>
 +
For Yocto v3.13.0 (Note: https://elinux.org/R-Car/Boards/Yocto-Gen3#Known_issues_and_limitations (No.3))
 +
<pre>
 +
cd $WORK/poky
 +
git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
 +
cd $WORK/meta-renesas
 +
git checkout -b tmp 00f70f062aace04c051fa92d3cd7b887718fc313
 +
</pre>
 +
</li>
 +
<li>
 +
For Yocto v3.15.0 (Note: https://elinux.org/R-Car/Boards/Yocto-Gen3#Known_issues_and_limitations (No.4))
 +
<pre>
 +
cd $WORK/poky
 +
git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
 +
cd $WORK/meta-renesas
 +
git checkout -b tmp 8af0b7d6e445b532088a068dc012757001be3a1f
 +
</pre>
 
</li>
 
</li>
 
 
<li>
 
<li>
Clone Renesas BSP layer and switch to the proper branch:
+
For Yocto v3.19.0
<ol>
+
<pre>
 +
cd $WORK/poky
 +
git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
 +
cd $WORK/meta-renesas
 +
git checkout -b tmp 20fcc94a8d05eda80250f27e87aaa3cfc3275300
 +
</pre>
 +
</li>
 
<li>
 
<li>
For Yocto v2.12.0
+
For Yocto v3.21.0 <span style="color:#ff0000">(2020/02/20 updated)</span>
 
<pre>
 
<pre>
cd $WORK
+
cd $WORK/poky
git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.12.0
+
git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
 +
cd $WORK/meta-renesas
 +
git checkout -b tmp 59e8d5674348e2b3d14ac4552231809ab10ab84e <- updated
 
</pre>
 
</pre>
 
</li>
 
</li>
 
</ol>
 
</ol>
 +
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]]
 
</li>
 
</li>
  
 
<li>
 
<li>
 
Apply Linaro-GCC patch file:
 
Apply Linaro-GCC patch file:
 +
<ol>
 +
<li>
 +
For Yocto v2.23.1
 
<pre>
 
<pre>
 
cd $WORK/meta-renesas
 
cd $WORK/meta-renesas
Line 98: Line 166:
 
unset PATCH_DIR
 
unset PATCH_DIR
 
</pre>
 
</pre>
 +
</li>
 +
</ol>
 
</li>
 
</li>
 
<li>
 
<li>
Unzip downloaded proprietary driver modules to $WORK/proprietary folder.<br/>
+
Download proprietary driver modules to $WORK/proprietary folder.<br/>
 
You should see the following files:
 
You should see the following files:
 
<ol>
 
<ol>
 
<li>
 
<li>
For Yocto v2.12.0
+
For Yocto v2.23.1
 
<pre>
 
<pre>
$ ls -1 $WORK/proprietary
+
$ ls -1 $WORK/proprietary/*.zip
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20160906.tar.gz
+
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20170828.zip
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160906.tar.gz
+
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170828.zip
 
</pre>
 
</pre>
 
</li>
 
</li>
</ol>
 
</li>
 
 
 
<li>
 
<li>
Populate meta-renesas with proprietary software packages.
+
For Yocto v3.9.0
 
<pre>
 
<pre>
export PKGS_DIR=$WORK/proprietary
+
$ ls -1 $WORK/proprietary/*.zip
cd $WORK/meta-renesas
+
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180627.zip
sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
+
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180627.zip
unset PKGS_DIR
 
 
</pre>
 
</pre>
 
</li>
 
</li>
 
 
<li>
 
<li>
Setup build environment
+
For Yocto v3.13.0
 
<pre>
 
<pre>
cd $WORK
+
$ ls -1 $WORK/proprietary/*.zip
source poky/oe-init-build-env
+
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20181029.zip
 +
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20181029.zip
 
</pre>
 
</pre>
 
</li>
 
</li>
 
 
<li>
 
<li>
Prepare default configuration files.
+
For Yocto v3.15.0
 
<pre>
 
<pre>
cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<salvator-x|h3ulcb|m3ulcb>/linaro-gcc/mmp/*.conf ./conf/
+
$ ls -1 $WORK/proprietary/*.zip
 +
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20181225.zip
 +
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20181225.zip
 
</pre>
 
</pre>
For weston/wayland:
+
</li><li>
 +
For Yocto v3.19.0
 
<pre>
 
<pre>
cd $WORK/build
+
$ ls -1 $WORK/proprietary/*.zip
cp conf/local-wayland.conf conf/local.conf
+
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20190507.zip
 +
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20190507.zip
 
</pre>
 
</pre>
For X11:
+
</li><li>
 +
For Yocto v3.21.0
 
<pre>
 
<pre>
cd $WORK/build
+
$ ls -1 $WORK/proprietary/*.zip
cp conf/local-x11.conf conf/local.conf
+
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20190722.zip
 +
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20190722.zip
 
</pre>
 
</pre>
 +
</li>
  
<li>
+
</ol>
Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support
 
 
</li>
 
</li>
 
 
<li>
 
<li>
Edit local.conf to choose machine extension variant
+
Populate meta-renesas with proprietary software packages.
 +
<pre>
 +
export PKGS_DIR=$WORK/proprietary
 +
cd $WORK/meta-renesas
 +
sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
 +
unset PKGS_DIR
 +
</pre>
 
</li>
 
</li>
  
'''For H3ULCB board only:'''<br />
 
 
<ol>
 
 
<li>
 
<li>
Edit local.conf to select IO configuration (by default only H3ULCB board peripherals are enabled):
+
Setup build environment
 
<pre>
 
<pre>
MACHINE_FEATURES_append = " h3ulcb-view" (use this append for View IO configuration)
+
cd $WORK
</pre>
+
source poky/oe-init-build-env
or
 
<pre>
 
MACHINE_FEATURES_append = " h3ulcb-had" (use this append for HAD IO configuration)
 
 
</pre>
 
</pre>
 
</li>
 
</li>
</ol>
 
 
'''For Salvator-X board only:'''<br />
 
  
 +
<li>
 +
Prepare default configuration files.
 
<ol>
 
<ol>
 
<li>
 
<li>
Edit local.conf to select IO configuration (by default only Salvator-X board peripherals are enabled):
+
For Yocto v2.23.1
 
<pre>
 
<pre>
MACHINE_FEATURES_append = " salvator-x-view" (use this append for View IO configuration)
+
cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<h3ulcb|m3ulcb>/linaro-gcc/mmp/*.conf ./conf/
SOC_FAMILY = "r8a7796" (make this change only for M3 Salvator-X, since the default is H3 Salvator-X)
+
cd $WORK/build
 +
cp conf/local-wayland.conf conf/local.conf
 
</pre>
 
</pre>
 
</li>
 
</li>
</ol>
 
 
</li>
 
 
'''For M3ULCB board only:'''<br />
 
 
<ol>
 
 
<li>
 
<li>
Edit local.conf to select IO configuration (by default only M3ULCB board peripherals are enabled):
+
For Yocto v3.9.0 or later
 
<pre>
 
<pre>
MACHINE_FEATURES_append = " m3ulcb-view" (use this append for View IO configuration)
+
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
 
</pre>
 
</pre>
 
</li>
 
</li>
 
</ol>
 
</ol>
 
 
</li>
 
  
 
<li>
 
<li>
Edit local.conf to enable multicluster boot (enable both CA57 and CA53 clusters):
+
(Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support)
<pre>
 
CA57CA53BOOT = "1"
 
</pre>
 
 
</li>
 
</li>
  
Line 210: Line 269:
 
<ol>
 
<ol>
 
<li>
 
<li>
For Yocto v2.12.0 (to enable EVA_ prefix during packages install)
+
For Yocto v2.23.1 or later (to enable EVA_ prefix during packages install)
 
<pre>
 
<pre>
 
DISTRO_FEATURES_append = " use_eva_pkg"
 
DISTRO_FEATURES_append = " use_eva_pkg"
Line 220: Line 279:
 
<li>
 
<li>
 
Start the build <br />
 
Start the build <br />
For weston/wayland:
 
 
<pre>
 
<pre>
 
bitbake core-image-weston
 
bitbake core-image-weston
</pre>
 
For X11:
 
<pre>
 
bitbake core-image-x11
 
 
</pre>
 
</pre>
 
</li>
 
</li>
  
 
<li>
 
<li>
Building image can take upto a few hours depending on your host system performance.<br>
+
Building image can take up to a few hours depending on your host system performance.<br>
After the build has been completed successfuly, you should see the output similar to:
+
After the build has been completed successfully, you should see the output similar to:
 
<pre class="bash">
 
<pre class="bash">
 
NOTE: Tasks Summary: Attempted 4704 tasks of which 31 didn't need to be rerun and all succeeded.
 
NOTE: Tasks Summary: Attempted 4704 tasks of which 31 didn't need to be rerun and all succeeded.
Line 250: Line 304:
 
./tmp/deploy/images/h3ulcb/Image
 
./tmp/deploy/images/h3ulcb/Image
 
./tmp/deploy/images/h3ulcb/Image-h3ulcb.bin
 
./tmp/deploy/images/h3ulcb/Image-h3ulcb.bin
 +
./tmp/deploy/images/h3ulcb/Image-r8a7795-es1-h3ulcb.dtb
 +
./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-4x2g.dtb
 
./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb.dtb
 
./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb.dtb
./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-had.dtb
 
./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-view.dtb
 
 
./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
 
./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
 
./tmp/deploy/images/h3ulcb/u-boot.bin
 
./tmp/deploy/images/h3ulcb/u-boot.bin
Line 262: Line 316:
 
</li>
 
</li>
 
<li>
 
<li>
You can now [[/R-Car/Boards/H3SK#Booting over TFTP from U-Boot|boot R-Car H3 SKH3 board over TFTP and NFS]]
+
You can now proceed with running Yocto images
 
</li>
 
</li>
 
</ol>
 
</ol>
  
== Running Yocto image ==
+
==OpenCL support==
 +
The following page describes how to enable OpenCL and Caffe support:
 +
[[R-Car/Boards/Yocto-Gen3/OpenCL]]
 +
 
 +
== Build SDK ==
 +
After building BSP you may build SDK:
 +
<pre>
 +
bitbake core-image-weston -c populate_sdk
 +
</pre>
 +
After build finished the SDK installation script may be found in following path:
 +
<pre>
 +
tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-*.sh
 +
</pre>
 +
Install SDK by run the following command and follow instructions on the screen:
 +
<pre>
 +
./tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-*.sh
 +
</pre>
 +
 
 +
== 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.
 
Linux kernel can be booted from microSD card or from TFTP. Root FS can be mounted from micro SD card or via NFS.
  
Line 308: Line 380:
  
 
<li>
 
<li>
Copy '''uImage''' and '''uImage-r8a7794-silk.dtb''' from $WORK/build/tmp/deploy/images/silk/ to TFTP server root.
+
Copy '''Image''' and '''Image-r8a7795-h3ulcb.dtb''' (for ws2.0 silicon) and/or '''Image-r8a7795-h3ulcb-4x2g.dtb''' (for RTP0RC77951SKBX010SA03(DDR 8GiB)) and/or '''Image-r8a7795-es1-h3ulcb.dtb''' (for ws1.1) from $WORK/build/tmp/deploy/images/h3ulcb/ to TFTP server root.
 
==== Ubuntu ====
 
==== Ubuntu ====
 
<pre>
 
<pre>
cp $WORK/build/tmp/deploy/images/silk/uImage /srv/tftp/
+
cp $WORK/build/tmp/deploy/images/h3ulcb/Image /srv/tftp/
cp $WORK/build/tmp/deploy/images/silk/uImage-r8a7794-silk.dtb /srv/tftp/
+
cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-es1-h3ulcb.dtb /srv/tftp/
 +
cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb.dtb /srv/tftp/
 +
cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-4x2g.dtb /srv/tftp/
 
</pre>
 
</pre>
  
 
==== Fedora ====
 
==== Fedora ====
 
<pre>
 
<pre>
cp $WORK/build/tmp/deploy/images/silk/uImage /var/lib/tftpboot/
+
cp $WORK/build/tmp/deploy/images/h3ulcb/Image /var/lib/tftpboot/
cp $WORK/build/tmp/deploy/images/silk/uImage-r8a7794-silk.dtb /var/lib/tftpboot/
+
cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-es1-h3ulcb.dtb /var/lib/tftpboot/
 +
cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb.dtb /var/lib/tftpboot/
 +
cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-4x2g.dtb /var/lib/tftpboot/
 
</pre>
 
</pre>
 +
[http://elinux.org/R-Car/Boards/H3SK#H3SK_has_two_kinds_of_boards/ Which is my H3SK board WS2.0 or WS1.1?]
 
</li>
 
</li>
  
Line 325: Line 402:
 
Verify that TFTP server is working.
 
Verify that TFTP server is working.
 
<pre>
 
<pre>
tftp localhost -c get uImage && ls uImage
+
tftp localhost -c get Image && ls Image
 
</pre>
 
</pre>
 
</li>
 
</li>
Line 377: Line 454:
 
Unpack rootfs to a dedicated directory:
 
Unpack rootfs to a dedicated directory:
 
<pre>
 
<pre>
IMAGE=weston|x11|sato|directfb
+
IMAGE=weston
MACHINE=silk|porter
+
MACHINE=h3ulcb|m3ulcb
 
NFS_ROOT=/nfs/${MACHINE}
 
NFS_ROOT=/nfs/${MACHINE}
 
sudo mkdir -p "${NFS_ROOT}"
 
sudo mkdir -p "${NFS_ROOT}"
 
sudo rm -rf "${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}"
+
sudo tar -xjf "${WORK}/build/tmp/deploy/images/${MACHINE}/core-image-${IMAGE}-${MACHINE}-*.tar.bz2" -C "${NFS_ROOT}"
 
sync
 
sync
 
</pre>
 
</pre>
Line 393: Line 470:
 
add
 
add
 
<pre>
 
<pre>
/nfs/silk *(rw,no_subtree_check,sync,no_root_squash,no_all_squash)
+
/nfs/h3ulcb *(rw,no_subtree_check,sync,no_root_squash,no_all_squash)
/nfs/porter *(rw,no_subtree_check,sync,no_root_squash,no_all_squash)
+
/nfs/m3ulcb *(rw,no_subtree_check,sync,no_root_squash,no_all_squash)
 
</pre>
 
</pre>
 
Save the file and exit.
 
Save the file and exit.
Line 409: Line 486:
 
[builduser@buildmachine ~]$ showmount -e localhost
 
[builduser@buildmachine ~]$ showmount -e localhost
 
Export list for localhost:
 
Export list for localhost:
/nfs/silk *
+
/nfs/h3ulcb *
/nfs/porter *
+
/nfs/m3ulcb *
 
</pre>
 
</pre>
 
</li>
 
</li>
  
 
<li><span id="Boot into U-Boot command prompt">Boot into U-Boot command prompt</span>
 
<li><span id="Boot into U-Boot command prompt">Boot into U-Boot command prompt</span>
===== For [[R-Car/Boards/SILK|SILK board]] =====
+
 
 
<ol>
 
<ol>
<li>
 
Make sure SW9 is on pin 1 side. <br/>
 
[[File:SILKSwitch.png|100px|Switch pin layout]]
 
</li>
 
 
<li>
 
<li>
 
Connect to serial console over microUSB using minicom or picocom.
 
Connect to serial console over microUSB using minicom or picocom.
Line 428: Line 501:
 
</li>
 
</li>
 
</ol>
 
</ol>
Refer to [[R-Car/Boards/SILK#Power on the board and go to U-Boot prompt|SILK board page]] for more information.
+
Refer to [[R-Car/Boards/H3SK#Power_on_the_board_and_go_to_U-Boot_prompt|H3SK board page]], [[R-Car/Boards/M3SK#Power_on_the_board_and_go_to_U-Boot_prompt|M3SK board page]] for more information.
===== For [[R-Car/Boards/Porter|Porter board]] =====
 
<ol>
 
<li>
 
TBD
 
</li>
 
</ol>
 
NOTE: [[R-Car/Boards/Stout|Stout board]] does not have extra switches to select boot device (e.g. primary and secondary/backup QSPI Flash)
 
 
 
 
</li>
 
</li>
  
Line 447: Line 512:
 
setenv ipaddr <board-ip>
 
setenv ipaddr <board-ip>
 
setenv serverip <your-computer-ip>
 
setenv serverip <your-computer-ip>
setenv bootcmd 'tftp 0x40007fc0 uImage; tftp 0x40f00000 uImage-r8a7794-silk.dtb; bootm 0x40007fc0 - 0x40f00000'
+
setenv bootcmd 'tftp 0x48080000 Image; tftp 0x48000000 Image-r8a7795-h3ulcb.dtb; booti 0x48080000 - 0x48000000'
setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=<your-computer-ip>:<nfs-path>,nfsvers=3 ip=<board-ip>:<your-computer-ip>::255.255.255.0:silk vmalloc=384M'
+
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
 
</pre>
 
</pre>
Line 455: Line 520:
 
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 bootcmd 'tftp 0x40007fc0 uImage; tftp 0x40f00000 uImage-r8a7794-silk.dtb; bootm 0x40007fc0 - 0x40f00000'
+
setenv bootcmd 'tftp 0x48080000 Image; tftp 0x48000000 Image-r8a7795-h3ulcb.dtb; booti 0x48080000 - 0x48000000'
setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=192.168.1.2:/nfs/silk,nfsvers=3 ip=192.168.1.3:192.168.1.2::255.255.255.0:silk vmalloc=384M'
+
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'
 
saveenv
 
saveenv
</pre>
 
The last command writes the configuration to SPI flash.
 
<pre>
 
=> saveenv                                                                                                                                 
 
Saving Environment to SPI Flash...                                                                                                         
 
SF: Detected S25FL512S with page size 256 KiB, total 64 MiB                                                                               
 
Erasing SPI flash...Writing to SPI flash...done
 
 
</pre>
 
</pre>
 
You can also use
 
You can also use
Line 481: Line 539:
 
You should see:
 
You should see:
 
<pre>
 
<pre>
=> ping 192.168.1.2                                                                                                              
+
=> ping 192.168.1.2  
sh_eth Waiting for PHY auto negotiation to complete... done
+
ravb:0 is connected to ravb.  Reconnecting to ravb
sh_eth: 100Base/Full
+
ravb Waiting for PHY auto negotiation to complete.. done
Using sh_eth device
+
ravb: 100Base/Full
 +
Using ravb device
 
host 192.168.1.2 is alive
 
host 192.168.1.2 is alive
 
</pre>
 
</pre>
Line 490: Line 549:
  
 
<li>
 
<li>
Reset the board by pushing [[R-Car/Boards/SILK:Hardware#Switches and Buttons|SW5 "Reset"]].
+
Reset the board by pushing reset button
 +
<br/>
 +
Refer to [[R-Car/Boards/H3SK#Power_on_the_board_and_go_to_U-Boot_prompt|H3SK board page]], [[R-Car/Boards/M3SK#Power_on_the_board_and_go_to_U-Boot_prompt|M3SK board page]] for more information.
 
</li>
 
</li>
  
Line 496: Line 557:
 
The board should boot the kernel:
 
The board should boot the kernel:
 
<pre>
 
<pre>
SILK SPI_LOADER V0.07c 2014.10.20                                                                                                         
+
NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.10
DEVICE S25FL512                                                                                                                           
+
NOTICE:  BL2: PRR is R-Car H3 ES1.0
                                                                                                                                           
+
NOTICE:  BL2: Boot device is HyperFlash(80MHz)
                                                                                                                                           
+
NOTICE: BL2: LCM state is CM
U-Boot 2013.01.01-g74b16ba-dirty (Dec 23 2014 - 15:31:50)                                                                                 
+
NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x52
                                                                                                                                           
+
NOTICE:  BL2: DDR1600(rev.0.10)
CPU: Renesas Electronics R8A7794 rev 1.0                                                                                                  
+
NOTICE:  BL2: DRAM Split is 4ch
Board: Silk Board                                                                                                                         
+
NOTICE:  BL2: QoS is default setting(rev.0.32)
                                                                                                                                           
+
NOTICEBL2: Lossy Decomp areas
DRAM1 GiB                                                                                                                               
+
NOTICE:       Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
MMC:  sh_mmcif: 0, sh-sdhi: 1                                                                                                             
+
NOTICE:       Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
SF: Detected S25FL512S with page size 256 KiB, total 64 MiB                                                                               
+
NOTICE:       Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
In:   serial                                                                                                                             
+
NOTICE: BL2: v1.1(release):c2f9fc9
Out:   serial                                                                                                                             
+
NOTICEBL2: Built : 00:36:25, Nov 20 2016
Err:   serial                                                                                                                             
+
NOTICE:  BL2: Normal boot
Net:   sh_eth                                                                                                                             
+
NOTICE: BL2: dst=0xe631a1a8 src=0x8180000 len=512(0x200)
Hit any key to stop autoboot: 0                                                                                                           
+
NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
sh_eth Waiting for PHY auto negotiation to complete... done                                                                               
+
NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
sh_eth: 100Base/Full                                                                                                                       
+
NOTICE: BL2: dst=0x44100000 src=0x8200000 len=524288(0x80000)
Using sh_eth device                                                                                                                       
+
NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
TFTP from server 192.168.1.2; our IP address is 192.168.1.3                                                                           
 
Filename 'uImage'.                                                                                                                         
 
Load address: 0x40007fc0                                                                                                                   
 
Loading: #################################################################                                                                 
 
        #################################################################                                                                 
 
        #################################################################                                                                 
 
        ##############################################                                                                                   
 
        3.5 MiB/s                                                                                                                         
 
done                                                                                                                                       
 
Bytes transferred = 3525472 (35cb60 hex)                                                                                                  
 
sh_eth:1 is connected to sh_eth. Reconnecting to sh_eth                                                                                   
 
sh_eth Waiting for PHY auto negotiation to complete... done                                                                               
 
sh_eth: 100Base/Full                                                                                                                       
 
Using sh_eth device                                                                                                                       
 
TFTP from server 192.168.1.2; our IP address is 192.168.1.3                                                                           
 
Filename 'uImage-r8a7794-silk.dtb'.                                                                                                       
 
Load address: 0x40f00000                                                                                                                   
 
Loading: ##                                                                                                                               
 
        3 MiB/s                                                                                                                           
 
done                                                                                                                                       
 
Bytes transferred = 24859 (611b hex)                                                                                                      
 
## Booting kernel from Legacy Image at 40007fc0 ...                                                                                       
 
  Image Name:   Linux-3.10.31-ltsi                                                                                                       
 
  Image Type:   ARM Linux Kernel Image (uncompressed)                                                                                    
 
  Data Size:   3525408 Bytes = 3.4 MiB                                                                                                   
 
  Load Address: 40008000                                                                                                                 
 
  Entry Point: 40008000                                                                                                                 
 
  Verifying Checksum ... OK                                                                                                               
 
## Flattened Device Tree blob at 40f00000                                                                                                 
 
  Booting using the fdt blob at 0x40f00000                                                                                               
 
  XIP Kernel Image ... OK                                                                                                                 
 
OK                                                                                                                                         
 
  Loading Device Tree to 40ef6000, end 40eff11a ... OK                                                                                   
 
                                                                                                                                           
 
Starting kernel ...                                                                                                                       
 
</pre>
 
</li>
 
</ol>
 
 
 
=== Loading kernel and rootfs from microSD card ===
 
Both kernel and root FS can be loaded from a microSD card. The approach requires only a console cable. No Ethernet connection is needed.
 
<ol>
 
<li>
 
Find a reliable microSD card with an adapter to fit your computer. 4 GB should be enough for the task.
 
</li>
 
 
 
<li>
 
Plug the SD card into you computer. Locate the proper device for it, typically '''/dev/mmcblk0'''. Use
 
<pre>
 
dmesg | tail
 
</pre>
 
to print latest messages if in doubt.<br/>
 
<span style="color:#ff0000">'''WARNING!''' Be very careful. Do not select you root partition or any other device with important information.  It may be destroyed!</span><br/>
 
Double-check that device name is correct by mounting and examining it's content.
 
</li>
 
  
<li>
 
Make sure the SD card doesn't contain any important files.<br/>
 
<span style="color:#ff0000">'''WARNING!''' Next step may erase the SD card completely. All files my be lost.</span>
 
</li>
 
  
<li>
+
U-Boot 2015.04 (Nov 20 2016 - 00:54:11)
Format the card with one partition with EXT3 file system.<br/>
 
''TBD Update this page with a script which formats the card''
 
</li>
 
  
<li>
+
CPU: Renesas Electronics R8A7795 rev 1.0
Copy root fs to the sd card:
+
Board: H3ULCB
<pre>
+
I2C:  ready
SD=<path-to-your-device-partition>
+
DRAM:  3.9 GiB
SD_ROOT=/tmp/sd-tool
+
MMC:  sh-sdhi: 0, sh-sdhi: 1
sudo umount "${SD}"
+
In:    serial
sudo mkdir -p "${SD_ROOT}"
+
Out:  serial
sudo mount "${SD}" "${SD_ROOT}"
+
Err:  serial
sudo rm -rf "${SD_ROOT}"/*
+
Net:  ravb
sudo cp "${BUILDDIR}/tmp/deploy/images/${MACHINE}/uImage+dtb" "${SD_ROOT}/boot/"
+
Hit any key to stop autoboot:  0
sudo tar -xjf "${BUILDDIR}/tmp/deploy/images/${MACHINE}/core-image-${IMAGE}-${MACHINE}.tar.bz2" -C "${SD_ROOT}"
+
ravb Waiting for PHY auto negotiation to complete.. done
sudo umount "${SD}"
+
ravb: 100Base/Full
</pre>
+
BOOTP broadcast 1
</li>
+
BOOTP broadcast 2
 +
BOOTP broadcast 3
 +
DHCP client bound to address 192.166.10.31 (1287 ms)
 +
Using ravb device
 +
TFTP from server 192.166.10.1; our IP address is 192.166.10.31
 +
Filename 'Image'.
 +
Load address: 0x48080000
 +
Loading: #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        ####################################################
 +
        627 KiB/s
 +
done
 +
Bytes transferred = 13905920 (d43000 hex)
 +
ravb:0 is connected to ravb.  Reconnecting to ravb
 +
ravb Waiting for PHY auto negotiation to complete. done
 +
ravb: 100Base/Full
 +
Using ravb device
 +
TFTP from server 192.166.10.1; our IP address is 192.166.10.31
 +
Filename 'Image-r8a7795-h3ulcb.dtb'.
 +
Load address: 0x48000000
 +
Loading: #############
 +
        12.7 KiB/s
 +
done
 +
Bytes transferred = 66470 (103a6 hex)
 +
## Flattened Device Tree blob at 48000000
 +
  Booting using the fdt blob at 0x48000000
 +
  Using Device Tree in place at 0000000048000000, end 00000000480133a5
  
<li>
+
Starting kernel ...                                                                                                                        
Insert the SD card into microSD slot on the board.
 
</li>
 
 
 
<li> Boot the board into U-Boot command prompt. Refer to section [[R-Car/Boards/Yocto#Boot into U-Boot command prompt|Boot into U-Boot command prompt]]
 
</li>
 
 
 
<li>
 
Configure kernel command line in U-Boot:<br/>
 
(For Silk board)
 
<pre>
 
setenv bootcmd 'ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb; bootm 0x40007fc0'
 
setenv bootargs 'console=ttySC10,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M'
 
saveenv
 
</pre>
 
(For Porter board)
 
<pre>
 
setenv bootcmd 'ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb; bootm 0x40007fc0'
 
setenv bootargs 'console=ttySC6,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M'
 
saveenv
 
</pre>
 
(For Stout board)
 
<pre>
 
setenv bootcmd 'ext4load mmc 0:1 0x40007fc0 /boot/uImage+dtb; bootm 0x40007fc0'
 
setenv bootargs 'console=ttySC0,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M video=HDMI-A-1:1024x768-32@60'
 
saveenv
 
</pre>
 
The last command writes the configuration to SPI flash.
 
<pre>
 
=> saveenv                                                                                                                                 
 
Saving Environment to SPI Flash...                                                                                                         
 
SF: Detected S25FL512S with page size 256 KiB, total 64 MiB                                                                               
 
Erasing SPI flash...Writing to SPI flash...done
 
</pre>
 
</li>
 
 
 
<li>
 
Reset the board by pushing [[R-Car/Boards/SILK:Hardware#Switches and Buttons|SW5 "Reset" on SILK]], [[R-Car/Boards/Porter:Hardware#Switches and Buttons|SWTBD "Reset" on Porter]] or [[R-Car/Boards/Stout:Hardware#Switches and Buttons|SW2 "Reset" on Stout]]
 
</li>
 
 
 
<li>
 
The board should boot the kernel:
 
<pre>
 
SILK SPI_LOADER V0.07c 2014.10.20                                                                                                         
 
DEVICE S25FL512                                                                                                                           
 
                                                                                                                                           
 
                                                                                                                                           
 
U-Boot 2013.01.01-g74b16ba-dirty (Dec 23 2014 - 15:31:50)                                                                                 
 
                                                                                                                                           
 
CPU: Renesas Electronics R8A7794 rev 1.0                                                                                                   
 
Board: Silk Board                                                                                                                         
 
                                                                                                                                           
 
DRAM:  1 GiB                                                                                                                               
 
MMC:  sh_mmcif: 0, sh-sdhi: 1                                                                                                             
 
SF: Detected S25FL512S with page size 256 KiB, total 64 MiB                                                                               
 
In:    serial                                                                                                                             
 
Out:  serial                                                                                                                             
 
Err:  serial                                                                                                                             
 
Net:  sh_eth                                                                                                                             
 
Hit any key to stop autoboot:  0                                                                                                           
 
3534603 bytes read in 498 ms (6.8 MiB/s)                                                                                                   
 
## Booting kernel from Legacy Image at 40007fc0 ...                                                                                       
 
  Image Name:  'Linux-3.10.31-ltsi'                                                                                                     
 
  Image Type:  ARM Linux Kernel Image (uncompressed)                                                                                     
 
  Data Size:    3534539 Bytes = 3.4 MiB                                                                                                   
 
  Load Address: 40008000                                                                                                                 
 
  Entry Point:  40008000                                                                                                                 
 
  Verifying Checksum ... OK                                                                                                               
 
  XIP Kernel Image ... OK                                                                                                                 
 
OK                                                                                                                                         
 
                                                                                                                                           
 
Starting kernel ...    
 
 
</pre>
 
</pre>
 
</li>
 
</li>
 
</ol>
 
 
=== Multiboot ===
 
U-Boot allows multiboot configurations. U-Boot can try different boot commands one by one until find the first working command. Use command line interface to configure u-boot.
 
Dual source (MMC and NFS) boot configuration for Silk:
 
<pre>
 
setenv mkBootcmdMMC 'setenv bootcmd ext4load mmc 1:1 0x40007fc0 /boot/uImage+dtb\; bootm 0x40007fc0'
 
setenv mkBootargsMMC 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw rootfstype=ext3 root=/dev/mmcblk0p1 rootwait vmalloc=384M'
 
setenv mkBootcmdTFTP 'setenv bootcmd tftp 0x40007fc0 uImage+dtb.silk\; bootm 0x40007fc0'
 
setenv mkBootargsNFS 'setenv bootargs console=ttySC10,38400 ignore_loglevel rw root=/dev/nfs nfsroot=192.168.1.27:/nfs/silk,nfsvers=3 ip=192.168.1.107:192.168.1.27::255.255.255.0:silk vmalloc=384M'
 
setenv bootMMC 'run mkBootargsMMC; run mkBootcmdMMC; run bootcmd'
 
setenv bootNET 'run mkBootargsNFS; run mkBootcmdTFTP; run bootcmd'
 
setenv bootcmd 'run bootMMC; run bootNET'
 
</pre>
 
For Porter and Stout mkBootcmdMMC, mkBootargsMMC, mkBootcmdTFTP and mkBootargsNFS should be correctly changed according to their bootcmds and bootargs
 
 
</ol>
 
</ol>
  
Line 694: Line 671:
  
 
===Preparing eMMC/SD card===
 
===Preparing eMMC/SD card===
In order to prepare you SD card, follow these instructions:  
+
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)  
+
1. Partion your SD card to set 1 partition and ID=83 (Linux)  
 +
<br/>
 +
Make sure the SD card doesn't contain any important files.
 +
<br/>
 +
<span style="color:#ff0000">'''WARNING!''' These steps may erase the SD card completely. All files my be lost.</span>
  
 
  $ fdisk /dev/mmcblk0
 
  $ fdisk /dev/mmcblk0
Line 706: Line 687:
 
  -> 83
 
  -> 83
  
2.Format this partition to ext3 (or ext4)
+
2. Format this partition to ext3 (or ext4)
  
 
  $ mkfs.ext3 /dev/mmcblk0p1
 
  $ mkfs.ext3 /dev/mmcblk0p1
  
3.Mount this partition on your host to any directory and upack the core-image-weston-XXXX.tar.bz2 into mounted folder.
+
3. Mount this partition on your host to any directory and upack the core-image-weston-*.tar.bz2 into mounted folder. And Copy Image and Image-r8a7795-h3ulcb.dtb (for ws2.0 silicon) and/or Image-r8a7795-h3ulcb-4x2g.dtb (for RTP0RC77951SKBX010SA03(DDR 8GiB)) and/or Image-r8a7795-es1-h3ulcb.dtb (for ws1.1) from $WORK/build/tmp/deploy/images/h3ulcb/ to sd card /boot.  In case of m3ulcb copy dtb from $WORK/build/tmp/deploy/images/m3ulcb/.
  
 
  $ mount /dev/mmcblk0p1 /mnt
 
  $ mount /dev/mmcblk0p1 /mnt
 
  $ cd <your_yocto_build_directory>
 
  $ cd <your_yocto_build_directory>
  $ tar xfj  build/tmp/deploy/images/salvator-x/core-image-weston-salvator-x-20160927181256.rootfs.tar.bz2  -C /mnt
+
  $ tar xfj  build/tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb-*.rootfs.tar.bz2  -C /mnt
 +
$ cp $WORK/build/tmp/deploy/images/h3ulcb/XXXX.dtb /mnt/boot/
  
 
NOTE: probably you need to be a root user, hence use "sudo"
 
NOTE: probably you need to be a root user, hence use "sudo"
Line 721: Line 703:
  
 
Proper U-Boot command to boot from SD:
 
Proper U-Boot command to boot from SD:
  # setenv bootargs 'rw root=/dev/mmcblk1p1 rootfstype=ext3 rootwait'
+
  # setenv bootargs 'rw root=/dev/mmcblk1p1 rootwait'
 
  # ext2load mmc 0:1 0x48080000 /boot/Image
 
  # ext2load mmc 0:1 0x48080000 /boot/Image
  # ext2load mmc 0:1 0x48000000 /boot/Image-r8a7795-salvator-x.dtb
+
  # ext2load mmc 0:1 0x48000000 /boot/Image-r8a7795-h3ulcb.dtb
  # booti 0x48080000 - 0x48000000'
+
  # 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 vairables:
+
Example of U-Boot environment variables:
 
  baudrate=115200
 
  baudrate=115200
  bootargs_emmc=rw root=/dev/mmcblk0p1 rootfstype=ext3 rootwait
+
  bootargs_emmc=rw root=/dev/mmcblk0p1 rootwait
 
  bootargs_nfs=rw root=/dev/nfs rootwait ip=dhcp
 
  bootargs_nfs=rw root=/dev/nfs rootwait ip=dhcp
  bootargs_sd0=rw root=/dev/mmcblk1p1 rootfstype=ext3 rootwait
+
  bootargs_sd0=rw root=/dev/mmcblk1p1 rootwait
bootargs_sd2=rw root=/dev/mmcblk2p1 rootfstype=ext3 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=set 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=set bootargs ${bootargs_nfs};bootp 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=set bootargs ${bootargs_sd0};ext2load mmc 0:1 0x48080000 /boot/Image;ext2load mmc 0:1 0x48000000 /boot/${dtb};run booti_cmd
bootcmd_sd2=set bootargs ${bootargs_sd2};ext2load mmc 2:1 0x48080000 /boot/Image;ext2load mmc 2:1 0x48000000 /boot/${dtb};run booti_cmd
 
 
  bootdelay=3
 
  bootdelay=3
 
  booti_cmd=booti 0x48080000 - 0x48000000
 
  booti_cmd=booti 0x48080000 - 0x48000000
  dtb=Image-r8a7795-salvator-x.dtb
+
  dtb=Image-r8a7795-h3ulcb.dtb
 
  ethact=ravb
 
  ethact=ravb
 
  ethaddr=2E:09:0A:00:BE:11
 
  ethaddr=2E:09:0A:00:BE:11
Line 770: Line 755:
 
  <DIR>      4096 ..
 
  <DIR>      4096 ..
 
  <SYM>        32 Image
 
  <SYM>        32 Image
         14039040 Image-4.6.0-yocto-standard
+
         14039040 Image-4.9.0-yocto-standard
             69584 Image-r8a7795-salvator-x.dtb
+
             69584 Image-r8a7795-h3ulcb.dtb
  
 
== Build scripts examples ==
 
== Build scripts examples ==
Line 777: Line 762:
  
 
<li> Build preparation
 
<li> Build preparation
<ol>
+
<br />
<li> For Yocto v2.12.0
+
YOCTO_VERSION and META_VERSION must be changed depending your Yocto version.
 
<pre>
 
<pre>
 
#!/bin/sh
 
#!/bin/sh
  
mkdir build || exit
+
# Create a directory and switch to it
 +
mkdir build
 
cd build
 
cd build
 
WORK=`pwd`
 
WORK=`pwd`
 
echo $WORK
 
echo $WORK
  
git clone git://git.yoctoproject.org/poky
+
# For Yocto v2.23.1
git clone git://git.linaro.org/openembedded/meta-linaro.git
+
YOCTO_VERSION=yocto-2.1.3
git clone git://git.openembedded.org/meta-openembedded
+
META_VERSION=krogoth
git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.12.0
+
 
 +
# For Yocto v3.9.0
 +
#YOCTO_VERSION=yocto-2.4.2
 +
#META_VERSION=rocko
 +
 
 +
# For Yocto v3.13.0, v3.15.0, v3.19.0, v3.21.0
 +
#YOCTO_VERSION=yocto-2.4.3
 +
#META_VERSION=rocko
 +
 
 +
# Clone basic Yocto layers in parallel
 +
git clone -b $YOCTO_VERSION --depth 1 git://git.yoctoproject.org/poky &
 +
git clone -b $META_VERSION --depth 1 git://git.linaro.org/openembedded/meta-linaro.git &
 +
git clone -b $META_VERSION --depth 1 git://git.openembedded.org/meta-openembedded &
 +
git clone -b $META_VERSION --depth 1 git://github.com/renesas-rcar/meta-renesas &
  
cd $WORK/poky
+
# Wait for all clone operations
git checkout -b tmp 40376446904ae3529be41737fed9a0b650ed167d
+
wait
cd $WORK/meta-linaro
 
git checkout -b tmp 9b1fd178309544dff1f7453e796a9437125bc0d9
 
cd $WORK/meta-openembedded
 
git checkout -b tmp 8ab04afbffb4bc5184cfe0655049de6f44269990
 
  
 +
# Apply Linaro-GCC patch file (The patch only adds README.linaro)
 
cd $WORK/meta-renesas
 
cd $WORK/meta-renesas
 
export PATCH_DIR=meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc
 
export PATCH_DIR=meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc
Line 804: Line 800:
 
unset PATCH_DIR
 
unset PATCH_DIR
  
cd $WORK/
+
# Make sure proprietary driver modules are downloaded to $WORK/proprietary folder
PKGS_DIR=$WORK/../proprietary
+
# If the modules are not downloaded, copy_evaproprietary_softwares.sh warns it
 +
# See https://www.renesas.com/en-us/solutions/automotive/rcar-demoboard.html (need to login!)
 +
# $ ls -1 $WORK/proprietary/*.zip
 +
# R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20170828.zip
 +
# R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170828.zip
 +
 
 +
# Populate meta-renesas with proprietary software packages
 
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_evaproprietary_softwares.sh -f $WORK/proprietary
sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
 
 
</pre>
 
</pre>
</li>
 
</ol>
 
 
</li>
 
</li>
  
<li> Building yocto for H3ULCB.View board
+
<li> Building yocto for H3ULCB board
 
<ol>
 
<ol>
<li> For Yocto v2.12.0
+
<li> For Yocto v2.23.1
 
<pre>
 
<pre>
 
#!/bin/sh
 
#!/bin/sh
Line 835: Line 834:
 
echo "DISTRO_FEATURES_append = \" use_eva_pkg\"" >> $WORK/build/conf/local.conf
 
echo "DISTRO_FEATURES_append = \" use_eva_pkg\"" >> $WORK/build/conf/local.conf
  
echo "MACHINE_FEATURES_append = \" h3ulcb-view\"" >> $WORK/build/conf/local.conf
+
bitbake core-image-weston
#echo "LVDSCAMERA_ONE = \"1\"" >> $WORK/build/conf/local.conf
+
</pre>
#echo "CA57CA53BOOT = \"1\"" >> $WORK/build/conf/local.conf
+
</li>
 +
</ol>
 +
<ol>
 +
<li> For Yocto v3.9.0 or later
 +
<pre>
 +
#!/bin/sh
 +
 
 +
cd build
 +
WORK=`pwd`
 +
echo $WORK
 +
 
 +
cd $WORK
 +
source poky/oe-init-build-env
 +
 
 +
#cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/*.conf ./conf/.
 +
#cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/*.conf ./conf/.
 +
cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/*.conf ./conf/.
 +
 
 +
cd $WORK/build
 +
cp conf/local-wayland.conf conf/local.conf
 +
echo "DISTRO_FEATURES_append = \" use_eva_pkg\"" >> $WORK/build/conf/local.conf
  
 
bitbake core-image-weston
 
bitbake core-image-weston
 
</pre>
 
</pre>
 +
</li>
 +
</ol>
 
</li>
 
</li>
  
 
</ol>
 
</ol>
 +
 +
== FAQ ==
 +
=== Discussion site ===
 +
http://elinux.org/Talk:R-Car/Boards/Yocto-Gen3
 +
 +
=== How do I increase USB bandwidth ===
 +
<ol>
 +
 +
<li> Download:<br>
 +
M3SK [[File:M3v10_usb20_iso_mode.zip]]<br>
 +
H3SK WS1.1 (RTP0RC7795SKBX0010SA00) [[File:H3v11_usb20_iso_mode.zip]]<br>
 +
H3SK WS2.0 (RTP0RC77951SKBX010SA00) [[File:H3v20_usb20_iso_mode.zip]]<br>
 +
</li>
 +
 +
<li> Setting
 +
<pre>
 +
<Install Driver>
 +
$ modprobe qos
 +
<Change directory to csv path>
 +
$ cd /path_to_csv
 +
<Store QoS parameters to QoS SRAM>
 +
$ qos_tp setall file.csv
 +
<Reflect Qos SRAM to QoS controller>
 +
$ qos_tp switch
 +
</pre>
 
</li>
 
</li>
 +
</ol>
 +
=== How do access to USB memory from U-boot(Yocto v3.13.0 or later)===
 +
<ol>
 +
<li>Some USB memory may not be recognized.
 +
<pre>
 +
=> 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
 +
=>
 +
</pre>
 +
</li>
 +
<li>[How to fix] Set the "usb_pgood_delay 2000" variable
 +
<pre>
 +
=> setenv usb_pgood_delay 2000
 +
=> saveenv
 +
=> reset
 +
=> usb start
 +
</pre>
 +
</li>
 
</ol>
 
</ol>
  
 
== Known issues and limitations ==
 
== Known issues and limitations ==
TBD
+
<ol>
 +
<li> [SW limitation] Yocto v3.4 or later doesn't support RTP0RC7795SKBX0010SA00(H3 v1.1 Starter Kit).<br/>
 +
Please use the H3 v2.0 SK<br/>
 +
<br/>
 +
<li> [Known issue]
 +
If you encounter a kernel hang-up while using Yocto v3.4.0 or later, please refer to the following pages.<br>
 +
H3 SK: No.1 of https://elinux.org/R-Car/Boards/H3SK#Known_Issues<br>
 +
M3 SK: No.2 of https://elinux.org/R-Car/Boards/M3SK#Known_Issues
 +
</li>
 +
<br/>
 +
<li> [SW limitations] Yocto v3.13.0<br/>
 +
<ol>
 +
<li>[U-boot]Reading environment variables from eMMC may fail.
 +
<pre>
 +
Loading Environment from MMC... *** Warning - No block device, using default environment
 +
</pre>
 +
</li>
 +
<li>[U-boot]SD SDR50/104 card may not be recognized.
 +
<pre>
 +
Ex)
 +
=> ext4ls mmc 0
 +
timeout during DMA
 +
timeout during DMA
 +
timeout during DMA
 +
timeout during DMA
 +
timeout during DMA
 +
error during DMA
 +
** Unrecognized filesystem type **
 +
=>
 +
</pre>
 +
</li>
 +
<!--
 +
<li>[U-boot]Some USB memory may not be recognized.
 +
<pre>
 +
=> 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
 +
=>
 +
</pre>
 +
[How to fix] Set the "usb_pgood_delay 2000" variable
 +
<pre>
 +
=> setenv usb_pgood_delay 2000
 +
=> saveenv
 +
=> reset
 +
=> usb start
 +
</pre>
 +
</li>
 +
-->
 +
<li>[Kernel] When using GStreamer, once playing audio at specific sampling rate, the audio with a different sampling rate cannot be played back. And some movie files cannot be played back.
 +
<pre>
 +
Ex)
 +
root@m3ulcb:~# gst-launch-1.0 filesrc location=sample.wav ! wavparse ! audioconvert ! alsasink
 +
Setting pipeline to PAUSED ...
 +
Pipeline is PREROLLING ...
 +
[  273.920848] rcar_sound ec500000.sound: SSI parent/child should use same rate
 +
[  273.927930] rcar_sound ec500000.sound: ssi[0] : prepare error -22
 +
[  273.934055] rcar_sound ec500000.sound: ASoC: cpu DAI prepare error: -22
 +
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not get/set sett
 +
ings from/on resource.
 +
Additional debug info:
 +
../../../gst-plugins-base-1.12.2/ext/alsa/gstalsasink.c(617): set_hwparams (): /GstPipel
 +
ine:pipeline0/GstAlsaSink:alsasink0:
 +
Unable to set hw params for playback: Invalid argument
 +
ERROR: pipeline doesn't want to preroll.
 +
Setting pipeline to NULL ...
 +
Freeing pipeline ...
 +
root@m3ulcb:~#
 +
</pre>
 +
</li>
 +
</ol>
 +
</li>
 +
<li> [SW limitations] Yocto v3.15.0<br/>
 +
<ol>
 +
<li>[U-boot]Reading environment variables from eMMC on M3 Starter Kit may fail.
 +
<pre>
 +
communication out of sync
 +
</pre>
 +
</li>
 +
<li> [U-boot]Reading environment variables from eMMC on H3 v2 Starter Kit may fail.
 +
<pre>
 +
  Loading Environment from MMC... timeout during DMA
 +
  *** Warning - !read failed, using default environment
 +
</pre>
 +
Workaround patch: https://github.com/u-boot/u-boot/commit/f58d6771a2afad71594c1264aadde461210a4675<br>
 +
U-boot binary [[File:u-boot-elf-h3ulcb-WA.zip]]<br><br>
 +
</li>
 +
</ol>
 +
</li>
 +
</ol>

Latest revision as of 22:07, 19 February 2020

This page contains information on building and running Yocto on:

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

Yocto versions

Poky-2.1.3 is supported with Yocto v2.23.1.
Poky-2.4.2 is supported with Yocto v3.9.0.
Poky-2.4.3 is supported with Yocto v3.13.0, v3.15.0, v3.19.0, v3.21.0.
Specific commit of meta-openembedded is required.

Host PC

Yocto v2.x.y(Ex Yocto v2.23.1) : Ubuntu 14.04 LTS (64bit) is recommended as OS. 32bit version is not supported.
Yocto v3.x.y(Ex Yocto v3.21.0) : Ubuntu 16.04 LTS (64bit) is recommended as OS. 32bit version is not supported.

Preliminary steps

  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:
    https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard.html

    Graphic drivers are required for Wayland. Multimedia drivers are optional.

  2. Install required packages
    Ubuntu and Debian
    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 \
         python3-pip python3-pexpect xz-utils debianutils iputils-ping libssl-dev
    
    Fedora
    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
    

    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

  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 git://git.linaro.org/openembedded/meta-linaro.git
    git clone git://github.com/renesas-rcar/meta-renesas
    
  3. Switch to proper branches/commits
    1. For Yocto v2.23.1
      cd $WORK/poky
      git checkout -b tmp yocto-2.1.3
      cd $WORK/meta-openembedded
      git checkout -b tmp 55c8a76da5dc099a7bc3838495c672140cedb78e
      cd $WORK/meta-linaro
      git checkout -b tmp 2f51d38048599d9878f149d6d15539fb97603f8f
      cd $WORK/meta-renesas
      git checkout -b tmp 7acbf5e2f99c59478adbc73c6a40d314589a3009
      
    2. For Yocto v3.9.0
      cd $WORK/poky
      git checkout -b tmp 342fbd6a3e57021c8e28b124b3adb241936f3d9d
      cd $WORK/meta-openembedded
      git checkout -b tmp dacfa2b1920e285531bec55cd2f08743390aaf57
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp fd078b6ece537d986852cb827bd21e022a797b2f
      
    3. For Yocto v3.13.0 (Note: https://elinux.org/R-Car/Boards/Yocto-Gen3#Known_issues_and_limitations (No.3))
      cd $WORK/poky
      git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
      cd $WORK/meta-openembedded
      git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp 00f70f062aace04c051fa92d3cd7b887718fc313
      
    4. For Yocto v3.15.0 (Note: https://elinux.org/R-Car/Boards/Yocto-Gen3#Known_issues_and_limitations (No.4))
      cd $WORK/poky
      git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
      cd $WORK/meta-openembedded
      git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp 8af0b7d6e445b532088a068dc012757001be3a1f
      
    5. For Yocto v3.19.0
      cd $WORK/poky
      git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
      cd $WORK/meta-openembedded
      git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp 20fcc94a8d05eda80250f27e87aaa3cfc3275300
      
    6. For Yocto v3.21.0 (2020/02/20 updated)
      cd $WORK/poky
      git checkout -b tmp 7e7ee662f5dea4d090293045f7498093322802cc
      cd $WORK/meta-openembedded
      git checkout -b tmp 352531015014d1957d6444d114f4451e241c4d23
      cd $WORK/meta-linaro
      git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
      cd $WORK/meta-renesas
      git checkout -b tmp 59e8d5674348e2b3d14ac4552231809ab10ab84e <- updated
      

    Another versions are not tested for compatibility. Legacy BSP instruction can be found here R-Car Yocto Gen3 legacy

  4. Apply Linaro-GCC patch file:
    1. For Yocto v2.23.1
      cd $WORK/meta-renesas
      export PATCH_DIR=meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc
      patch -p1 < ${PATCH_DIR}/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch
      unset PATCH_DIR
      
  5. Download proprietary driver modules to $WORK/proprietary folder.
    You should see the following files:
    1. For Yocto v2.23.1
      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20170828.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170828.zip
      
    2. For Yocto v3.9.0
      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180627.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180627.zip
      
    3. For Yocto v3.13.0
      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20181029.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20181029.zip
      
    4. For Yocto v3.15.0
      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20181225.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20181225.zip
      
    5. For Yocto v3.19.0

      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20190507.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20190507.zip
      
    6. For Yocto v3.21.0

      $ ls -1 $WORK/proprietary/*.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20190722.zip
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20190722.zip
      
  6. Populate meta-renesas with proprietary software packages.
    export PKGS_DIR=$WORK/proprietary
    cd $WORK/meta-renesas
    sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
    unset PKGS_DIR
    
  7. Setup build environment
    cd $WORK
    source poky/oe-init-build-env
    
  8. Prepare default configuration files.
    1. For Yocto v2.23.1
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<h3ulcb|m3ulcb>/linaro-gcc/mmp/*.conf ./conf/
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      
    2. For Yocto v3.9.0 or later
      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. (Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support)
  10. Edit local.conf with evaluation packages requirements:
    1. For Yocto v2.23.1 or later (to enable EVA_ prefix during packages install)
      DISTRO_FEATURES_append = " use_eva_pkg"
      
  11. Start the build
    bitbake core-image-weston
    
  12. 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.

  13. 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/core-image-weston-h3ulcb.cpio.gz
    ./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/Image
    ./tmp/deploy/images/h3ulcb/Image-h3ulcb.bin
    ./tmp/deploy/images/h3ulcb/Image-r8a7795-es1-h3ulcb.dtb
    ./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-4x2g.dtb
    ./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb.dtb
    ./tmp/deploy/images/h3ulcb/modules-h3ulcb.tgz
    ./tmp/deploy/images/h3ulcb/u-boot.bin
    ./tmp/deploy/images/h3ulcb/u-boot-elf-h3ulcb.srec
    ./tmp/deploy/images/h3ulcb/u-boot-elf.srec
    ./tmp/deploy/images/h3ulcb/u-boot-h3ulcb.bin
    

    Image is a Kernel image, *.dtb is a blob file, core-image-weston-h3ulcb.tar.bz2 is the rootfs, modules-h3ulcb.tgz are kernel modules.

  14. You can now proceed with running Yocto images

OpenCL support

The following page describes how to enable OpenCL and Caffe support: R-Car/Boards/Yocto-Gen3/OpenCL

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.

    Ubuntu

    Install tftpd-hpa package along with tftp tools:

    sudo apt-get install tftp tftpd-hpa
    

    Fedora

    1. Install necessary packages:
      sudo yum install tftp-server tftp
      

      tftp-server is a part of xinetd. See Fedora manual for more information.

    2. Enable TFTP server:
      sudo vi /etc/xinetd.d/tftp 
      
      Set
      disable = no
      Save file and exit.
    3. Start xinetd:
      sudo systemctl start xinetd.service
      sudo systemctl enable xinetd.service
      
  2. Copy Image and Image-r8a7795-h3ulcb.dtb (for ws2.0 silicon) and/or Image-r8a7795-h3ulcb-4x2g.dtb (for RTP0RC77951SKBX010SA03(DDR 8GiB)) and/or Image-r8a7795-es1-h3ulcb.dtb (for ws1.1) from $WORK/build/tmp/deploy/images/h3ulcb/ to TFTP server root.

    Ubuntu

    cp $WORK/build/tmp/deploy/images/h3ulcb/Image /srv/tftp/
    cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-es1-h3ulcb.dtb /srv/tftp/
    cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb.dtb /srv/tftp/
    cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-4x2g.dtb /srv/tftp/
    

    Fedora

    cp $WORK/build/tmp/deploy/images/h3ulcb/Image /var/lib/tftpboot/
    cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-es1-h3ulcb.dtb /var/lib/tftpboot/
    cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb.dtb /var/lib/tftpboot/
    cp $WORK/build/tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-4x2g.dtb /var/lib/tftpboot/
    

    Which is my H3SK board WS2.0 or WS1.1?

  3. Verify that TFTP server is working.
    tftp localhost -c get Image && ls Image
    
  4. Setup NFS server.

    Debian/Ubuntu

    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
      

    Fedora

    1. Install necessary packages:
      sudo yum install nfs-utils
      
    2. Enable and start nfs server:
      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
      
  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 bootcmd 'tftp 0x48080000 Image; tftp 0x48000000 Image-r8a7795-h3ulcb.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 bootcmd 'tftp 0x48080000 Image; tftp 0x48000000 Image-r8a7795-h3ulcb.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'
    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    
    ravb:0 is connected to ravb.  Reconnecting to ravb
    ravb Waiting for PHY auto negotiation to complete.. done
    ravb: 100Base/Full
    Using ravb 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.1.0.10
    NOTICE:  BL2: PRR is R-Car H3 ES1.0
    NOTICE:  BL2: Boot device is HyperFlash(80MHz)
    NOTICE:  BL2: LCM state is CM
    NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x52
    NOTICE:  BL2: DDR1600(rev.0.10)
    NOTICE:  BL2: DRAM Split is 4ch
    NOTICE:  BL2: QoS is default setting(rev.0.32)
    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: v1.1(release):c2f9fc9
    NOTICE:  BL2: Built : 00:36:25, Nov 20 2016
    NOTICE:  BL2: Normal boot
    NOTICE:  BL2: dst=0xe631a1a8 src=0x8180000 len=512(0x200)
    NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
    NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
    NOTICE:  BL2: dst=0x44100000 src=0x8200000 len=524288(0x80000)
    NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
    
    
    U-Boot 2015.04 (Nov 20 2016 - 00:54:11)
    
    CPU: Renesas Electronics R8A7795 rev 1.0
    Board: H3ULCB
    I2C:   ready
    DRAM:  3.9 GiB
    MMC:   sh-sdhi: 0, sh-sdhi: 1
    In:    serial
    Out:   serial
    Err:   serial
    Net:   ravb
    Hit any key to stop autoboot:  0 
    ravb Waiting for PHY auto negotiation to complete.. done
    ravb: 100Base/Full
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 192.166.10.31 (1287 ms)
    Using ravb device
    TFTP from server 192.166.10.1; our IP address is 192.166.10.31
    Filename 'Image'.
    Load address: 0x48080000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ####################################################
             627 KiB/s
    done
    Bytes transferred = 13905920 (d43000 hex)
    ravb:0 is connected to ravb.  Reconnecting to ravb
    ravb Waiting for PHY auto negotiation to complete. done
    ravb: 100Base/Full
    Using ravb device
    TFTP from server 192.166.10.1; our IP address is 192.166.10.31
    Filename 'Image-r8a7795-h3ulcb.dtb'.
    Load address: 0x48000000
    Loading: #############
             12.7 KiB/s
    done
    Bytes transferred = 66470 (103a6 hex)
    ## Flattened Device Tree blob at 48000000
       Booting using the fdt blob at 0x48000000
       Using Device Tree in place at 0000000048000000, end 00000000480133a5
    
    Starting kernel ...                                                                                                                         
    

How to prepare and boot from eMMC/SD card

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

Preparing eMMC/SD card

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.
WARNING! These steps may erase the SD card completely. All files my be lost.

$ 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-weston-*.tar.bz2 into mounted folder. And Copy Image and Image-r8a7795-h3ulcb.dtb (for ws2.0 silicon) and/or Image-r8a7795-h3ulcb-4x2g.dtb (for RTP0RC77951SKBX010SA03(DDR 8GiB)) and/or Image-r8a7795-es1-h3ulcb.dtb (for ws1.1) from $WORK/build/tmp/deploy/images/h3ulcb/ to sd card /boot. In case of m3ulcb copy dtb from $WORK/build/tmp/deploy/images/m3ulcb/.

$ mount /dev/mmcblk0p1 /mnt
$ cd <your_yocto_build_directory>
$ tar xfj  build/tmp/deploy/images/h3ulcb/core-image-weston-h3ulcb-*.rootfs.tar.bz2  -C /mnt
$ cp $WORK/build/tmp/deploy/images/h3ulcb/XXXX.dtb /mnt/boot/

NOTE: probably you need to be a root user, hence use "sudo"

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/Image-r8a7795-h3ulcb.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:

baudrate=115200
bootargs_emmc=rw root=/dev/mmcblk0p1 rootwait
bootargs_nfs=rw root=/dev/nfs rootwait ip=dhcp
bootargs_sd0=rw root=/dev/mmcblk1p1 rootwait
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_nfs=set bootargs ${bootargs_nfs};bootp 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
bootdelay=3
booti_cmd=booti 0x48080000 - 0x48000000
dtb=Image-r8a7795-h3ulcb.dtb
ethact=ravb
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)
Environment size: 1092/131068 bytes

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: sh-sdhi
Manufacturer ID: 3
OEM: 5344
Name: SL64G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 59.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> ext2ls mmc 0:1 /boot
<DIR>       4096 .
<DIR>       4096 ..
<SYM>         32 Image
        14039040 Image-4.9.0-yocto-standard
           69584 Image-r8a7795-h3ulcb.dtb

Build scripts examples

  1. Build preparation
    YOCTO_VERSION and META_VERSION must be changed depending your Yocto version.
    #!/bin/sh
    
    # Create a directory and switch to it
    mkdir build
    cd build
    WORK=`pwd`
    echo $WORK
    
    # For Yocto v2.23.1
    YOCTO_VERSION=yocto-2.1.3
    META_VERSION=krogoth
    
    # For Yocto v3.9.0
    #YOCTO_VERSION=yocto-2.4.2
    #META_VERSION=rocko
    
    # For Yocto v3.13.0, v3.15.0, v3.19.0, v3.21.0
    #YOCTO_VERSION=yocto-2.4.3
    #META_VERSION=rocko
    
    # Clone basic Yocto layers in parallel
    git clone -b $YOCTO_VERSION --depth 1 git://git.yoctoproject.org/poky &
    git clone -b $META_VERSION --depth 1 git://git.linaro.org/openembedded/meta-linaro.git &
    git clone -b $META_VERSION --depth 1 git://git.openembedded.org/meta-openembedded &
    git clone -b $META_VERSION --depth 1 git://github.com/renesas-rcar/meta-renesas &
    
    # Wait for all clone operations
    wait
    
    # Apply Linaro-GCC patch file (The patch only adds README.linaro)
    cd $WORK/meta-renesas
    export PATCH_DIR=meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc
    patch -p1 < ${PATCH_DIR}/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch
    unset PATCH_DIR
    
    # Make sure proprietary driver modules are downloaded to $WORK/proprietary folder
    # If the modules are not downloaded, copy_evaproprietary_softwares.sh warns it
    # See https://www.renesas.com/en-us/solutions/automotive/rcar-demoboard.html (need to login!)
    # $ ls -1 $WORK/proprietary/*.zip
    # R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20170828.zip
    # R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170828.zip
    
    # Populate meta-renesas with proprietary software packages
    cd $WORK/meta-renesas
    sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $WORK/proprietary
    
  2. Building yocto for H3ULCB board
    1. For Yocto v2.23.1
      #!/bin/sh
      
      cd build
      WORK=`pwd`
      echo $WORK
      
      cd $WORK
      source poky/oe-init-build-env
      
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/*.conf ./conf/.
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/*.conf ./conf/.
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/*.conf ./conf/.
      
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      echo "DISTRO_FEATURES_append = \" use_eva_pkg\"" >> $WORK/build/conf/local.conf
      
      bitbake core-image-weston
      
    1. For Yocto v3.9.0 or later
      #!/bin/sh
      
      cd build
      WORK=`pwd`
      echo $WORK
      
      cd $WORK
      source poky/oe-init-build-env
      
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/*.conf ./conf/.
      #cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/*.conf ./conf/.
      cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/*.conf ./conf/.
      
      cd $WORK/build
      cp conf/local-wayland.conf conf/local.conf
      echo "DISTRO_FEATURES_append = \" use_eva_pkg\"" >> $WORK/build/conf/local.conf
      
      bitbake core-image-weston
      

FAQ

Discussion site

http://elinux.org/Talk:R-Car/Boards/Yocto-Gen3

How do I increase USB bandwidth

  1. Download:
    M3SK File:M3v10 usb20 iso mode.zip
    H3SK WS1.1 (RTP0RC7795SKBX0010SA00) File:H3v11 usb20 iso mode.zip
    H3SK WS2.0 (RTP0RC77951SKBX010SA00) File:H3v20 usb20 iso mode.zip
  2. Setting
    <Install Driver>
    $ modprobe qos
    <Change directory to csv path>
    $ cd /path_to_csv
    <Store QoS parameters to QoS SRAM>
    $ qos_tp setall file.csv
    <Reflect Qos SRAM to QoS controller>
    $ qos_tp switch
    

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 or later doesn't support RTP0RC7795SKBX0010SA00(H3 v1.1 Starter Kit).
    Please use the H3 v2.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 https://elinux.org/R-Car/Boards/H3SK#Known_Issues
    M3 SK: No.2 of https://elinux.org/R-Car/Boards/M3SK#Known_Issues

  3. [SW limitations] Yocto v3.13.0
    1. [U-boot]Reading environment variables from eMMC may fail.
      Loading Environment from MMC... *** Warning - No block device, using default environment
      
    2. [U-boot]SD SDR50/104 card may not be recognized.
      Ex)
      => ext4ls mmc 0
      timeout during DMA
      timeout during DMA
      timeout during DMA
      timeout during DMA
      timeout during DMA
      error during DMA
      ** Unrecognized filesystem type **
      =>
      
    3. [Kernel] When using GStreamer, once playing audio at specific sampling rate, the audio with a different sampling rate cannot be played back. And some movie files cannot be played back.
      Ex)
      root@m3ulcb:~# gst-launch-1.0 filesrc location=sample.wav ! wavparse ! audioconvert ! alsasink
      Setting pipeline to PAUSED ...
      Pipeline is PREROLLING ...
      [  273.920848] rcar_sound ec500000.sound: SSI parent/child should use same rate
      [  273.927930] rcar_sound ec500000.sound: ssi[0] : prepare error -22
      [  273.934055] rcar_sound ec500000.sound: ASoC: cpu DAI prepare error: -22
      ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not get/set sett
      ings from/on resource.
      Additional debug info:
      ../../../gst-plugins-base-1.12.2/ext/alsa/gstalsasink.c(617): set_hwparams (): /GstPipel
      ine:pipeline0/GstAlsaSink:alsasink0:
      Unable to set hw params for playback: Invalid argument
      ERROR: pipeline doesn't want to preroll.
      Setting pipeline to NULL ...
      Freeing pipeline ...
      root@m3ulcb:~# 
      
  4. [SW limitations] Yocto v3.15.0
    1. [U-boot]Reading environment variables from eMMC on M3 Starter Kit may fail.
      communication out of sync
      
    2. [U-boot]Reading environment variables from eMMC on H3 v2 Starter Kit may fail.
        Loading Environment from MMC... timeout during DMA
        *** Warning - !read failed, using default environment
      

      Workaround patch: https://github.com/u-boot/u-boot/commit/f58d6771a2afad71594c1264aadde461210a4675
      U-boot binary File:U-boot-elf-h3ulcb-WA.zip