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

From eLinux.org
Jump to: navigation, search
(Blanked the page)
Line 1: Line 1:
 +
{{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/H3ULCB | Renesas R-Car-H3 H3ULCB]], [[R-Car/Boards/H3ULCB-View | Renesas R-Car-H3 H3ULCB.View]] and [[R-Car/Boards/H3ULCB-HAD | Renesas R-Car-H3 H3ULCB.HAD]], [[R-Car/Boards/M3ULCB | Renesas R-Car-M3 M3ULCB]], [[R-Car/Boards/M3ULCB-View | Renesas R-Car-M3 M3ULCB.View]] boards.
  
 +
== Yocto versions ==
 +
[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.
 +
 +
== Preliminary steps ==
 +
<ol>
 +
<li>Download evaluation version of proprietary graphics and multimedia drivers from Renesas.<br/>
 +
<br/>
 +
To download Multimedia and Graphics library, please use the following link:<br/>
 +
https://www.renesas.com/en-us/software/D6000290.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/>
 +
Graphic drivers are required for X11 and Wayland. Multimedia drivers are optional.<br/>
 +
<br/>
 +
</li>
 +
 +
<li> Install required packages
 +
===== Ubuntu and Debian =====
 +
<pre>
 +
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 +
    build-essential chrpath socat libsdl1.2-dev xterm python-crypto
 +
</pre>
 +
===== Fedora =====
 +
<pre>
 +
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
 +
</pre>
 +
Refer to [http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#packages Yocto Project Quick Start] for more information.
 +
</li>
 +
</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 ==
 +
<ol>
 +
<li>Create a directory and switch to it <br/>
 +
Warning! Yocto builds require a lot of disk space (up to 100 GB). Make sure you have got enough before starting the build.
 +
<pre>
 +
mkdir build
 +
cd build
 +
export WORK=`pwd`
 +
</pre>
 +
</li>
 +
<li>Clone basic Yocto layers:
 +
<pre>
 +
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
 +
</pre>
 +
</li>
 +
 +
<li>
 +
Switch to proper branches/commits
 +
<ol>
 +
<li>
 +
For Yocto v2.9.0
 +
<pre>
 +
cd $WORK/poky
 +
git checkout -b tmp 65306b0bfc1afd0de9b1d470fd78c8c69f55f791
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp cb7e68f2a39fa6f24add48fc7b8d38fb7291bb44
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp acf4f1f701e07670ec88435897a74f88dbe8ba87
 +
</pre>
 +
</li>
 +
<li>
 +
For Yocto v2.12.0
 +
<pre>
 +
cd $WORK/poky
 +
git checkout -b tmp 40376446904ae3529be41737fed9a0b650ed167d
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp 8ab04afbffb4bc5184cfe0655049de6f44269990
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 9b1fd178309544dff1f7453e796a9437125bc0d9
 +
</pre>
 +
</li>
 +
</ol>
 +
Another versions are not tested for compatibility.
 +
</li>
 +
 +
<li>
 +
Clone Renesas BSP layer and switch to the proper branch:
 +
<ol>
 +
<li>
 +
For Yocto v2.9.0
 +
<pre>
 +
cd $WORK
 +
git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.9.0
 +
</pre>
 +
</li>
 +
<li>
 +
For Yocto v2.12.0
 +
<pre>
 +
cd $WORK
 +
git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.12.0
 +
</pre>
 +
</li>
 +
</ol>
 +
</li>
 +
 +
<li>
 +
Apply Linaro-GCC patch file:
 +
<pre>
 +
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
 +
</pre>
 +
</li>
 +
<li>
 +
Unzip downloaded proprietary driver modules to $WORK/proprietary folder.<br/>
 +
You should see the following files:
 +
<ol>
 +
<li>
 +
For Yocto v2.9.0
 +
<pre>
 +
$ ls -1 $WORK/proprietary
 +
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20160526.tar.gz
 +
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160526.tar.gz
 +
</pre>
 +
</li>
 +
<li>
 +
For Yocto v2.12.0
 +
<pre>
 +
$ ls -1 $WORK/proprietary
 +
R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20160906.tar.gz
 +
R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160906.tar.gz
 +
</pre>
 +
</li>
 +
</ol>
 +
</li>
 +
 +
<li>
 +
Populate meta-renesas with proprietary software packages.
 +
<pre>
 +
PKGS_DIR=$WORK/proprietary
 +
cd $WORK/meta-renesas
 +
sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
 +
</pre>
 +
</li>
 +
 +
<li>
 +
Setup build environment
 +
<pre>
 +
cd $WORK
 +
source poky/oe-init-build-env
 +
</pre>
 +
</li>
 +
 +
<li>
 +
Prepare default configuration files.
 +
<pre>
 +
cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<salvator-x|h3ulcb|m3ulcb>/linaro-gcc/mmp/*.conf ./conf/
 +
</pre>
 +
For weston/wayland:
 +
<pre>
 +
cd $WORK/build
 +
cp conf/local-wayland.conf conf/local.conf
 +
</pre>
 +
For X11:
 +
<pre>
 +
cd $WORK/build
 +
cp conf/local-x11.conf conf/local.conf
 +
</pre>
 +
 +
<li>
 +
Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support
 +
</li>
 +
 +
<li>
 +
Edit local.conf to choose machine extension variant
 +
</li>
 +
 +
'''For H3ULCB board only:'''<br />
 +
 +
<ol>
 +
<li>
 +
Edit local.conf to select IO configuration (by default only H3ULCB board peripherals are enabled):
 +
<pre>
 +
MACHINE_FEATURES_append = " h3ulcb-view" (use this append for View IO configuration)
 +
</pre>
 +
or
 +
<pre>
 +
MACHINE_FEATURES_append = " h3ulcb-had" (use this append for HAD IO configuration)
 +
</pre>
 +
</li>
 +
</ol>
 +
 +
'''For Salvator-X board only:'''<br />
 +
 +
<ol>
 +
<li>
 +
Edit local.conf to select IO configuration (by default only Salvator-X board peripherals are enabled):
 +
<pre>
 +
MACHINE_FEATURES_append = " salvator-x-view" (use this append for View IO configuration)
 +
SOC_FAMILY = "r8a7796" (make this change only for M3 Salvator-X, since the default is H3 Salvator-X)
 +
</pre>
 +
</li>
 +
</ol>
 +
 +
</li>
 +
 +
'''For M3ULCB board only:'''<br />
 +
 +
<ol>
 +
<li>
 +
Edit local.conf to select IO configuration (by default only M3ULCB board peripherals are enabled):
 +
<pre>
 +
MACHINE_FEATURES_append = " m3ulcb-view" (use this append for View IO configuration)
 +
</pre>
 +
</li>
 +
</ol>
 +
 +
 +
</li>
 +
 +
<li>
 +
Edit local.conf to enable multicluster boot (enable both CA57 and CA53 clusters):
 +
<pre>
 +
CA57CA53BOOT = "1"
 +
</pre>
 +
</li>
 +
 +
<li>
 +
Edit local.conf with evaluation packages requirements:
 +
<ol>
 +
<li>
 +
For Yocto v2.9.0 (to build only lib64, since evaluation packages do not include lib32 support)
 +
<pre>
 +
IMAGE_INSTALL_remove += " lib32-weston lib32-packagegroup-multimedia-libs lib32-omx-user-module lib32-libdrm lib32-libdrm-kms lib32-gles-user-module"
 +
</pre>
 +
</li>
 +
<li>
 +
For Yocto v2.12.0 (to enable EVA_ prefix during packages install)
 +
<pre>
 +
DISTRO_FEATURES_append = " use_eva_pkg"
 +
</pre>
 +
</li>
 +
</ol>
 +
</li>
 +
 +
<li>
 +
Start the build <br />
 +
For weston/wayland:
 +
<pre>
 +
bitbake core-image-weston
 +
</pre>
 +
For X11:
 +
<pre>
 +
bitbake core-image-x11
 +
</pre>
 +
</li>
 +
 +
<li>
 +
Building image can take upto a few hours depending on your host system performance.<br>
 +
After the build has been completed successfuly, you should see the output similar to:
 +
<pre class="bash">
 +
NOTE: Tasks Summary: Attempted 4704 tasks of which 31 didn't need to be rerun and all succeeded.
 +
</pre>
 +
and the command prompt should return.
 +
</li>
 +
 +
<li>
 +
Bitbake has generated all the necessary files in ./tmp/deploy/images directory. <br/>
 +
You can verify its content:
 +
<pre class="bash">
 +
$ 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-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/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
 +
</pre>
 +
'''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.
 +
</li>
 +
<li>
 +
You can now [[R-Car/Boards/H3ULCB#Booting over TFTP from U-Boot|boot R-Car H3 H3ULCB board over TFTP and NFS]]
 +
</li>
 +
</ol>
 +
 +
== Build scripts examples ==
 +
<ol>
 +
 +
<li> Build preparation
 +
<ol>
 +
<li> For Yocto v2.9.0
 +
<pre>
 +
#!/bin/sh
 +
 +
mkdir build || exit
 +
cd build
 +
WORK=`pwd`
 +
echo $WORK
 +
 +
git clone git://git.yoctoproject.org/poky
 +
git clone git://git.linaro.org/openembedded/meta-linaro.git
 +
git clone git://git.openembedded.org/meta-openembedded
 +
git clone git://github.com/CogentEmbedded/meta-rcat.git meta-renesas -b v2.9.0
 +
 +
cd $WORK/poky
 +
git checkout -b tmp 65306b0bfc1afd0de9b1d470fd78c8c69f55f791
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp acf4f1f701e07670ec88435897a74f88dbe8ba87
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp cb7e68f2a39fa6f24add48fc7b8d38fb7291bb44
 +
 +
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
 +
 +
cd $WORK/
 +
PKGS_DIR=$WORK/../proprietary
 +
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 $PKGS_DIR
 +
</pre>
 +
</li>
 +
<li> For Yocto v2.12.0
 +
<pre>
 +
#!/bin/sh
 +
 +
mkdir build || exit
 +
cd build
 +
WORK=`pwd`
 +
echo $WORK
 +
 +
git clone git://git.yoctoproject.org/poky
 +
git clone git://git.linaro.org/openembedded/meta-linaro.git
 +
git clone git://git.openembedded.org/meta-openembedded
 +
git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.12.0
 +
 +
cd $WORK/poky
 +
git checkout -b tmp 40376446904ae3529be41737fed9a0b650ed167d
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 9b1fd178309544dff1f7453e796a9437125bc0d9
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp 8ab04afbffb4bc5184cfe0655049de6f44269990
 +
 +
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
 +
 +
cd $WORK/
 +
PKGS_DIR=$WORK/../proprietary
 +
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 $PKGS_DIR
 +
</pre>
 +
</li>
 +
</ol>
 +
</li>
 +
 +
<li> Building yocto for H3ULCB.View board
 +
<ol>
 +
<li> For Yocto v2.9.0
 +
<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/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 "IMAGE_INSTALL_remove += \" lib32-weston lib32-packagegroup-multimedia-libs lib32-omx-user-module lib32-libdrm lib32-libdrm-kms lib32-gles-user-module\"" >> $WORK/build/conf/local.conf
 +
 +
echo "MACHINE_FEATURES_append = \" h3ulcb-view\"" >> $WORK/build/conf/local.conf
 +
#echo "LVDSCAMERA_ONE = \"1\"" >> $WORK/build/conf/local.conf
 +
#echo "CA57CA53BOOT = \"1\"" >> $WORK/build/conf/local.conf
 +
 +
bitbake core-image-weston
 +
</pre>
 +
</li>
 +
<li> For Yocto v2.12.0
 +
<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/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
 +
 +
echo "MACHINE_FEATURES_append = \" h3ulcb-view\"" >> $WORK/build/conf/local.conf
 +
#echo "LVDSCAMERA_ONE = \"1\"" >> $WORK/build/conf/local.conf
 +
#echo "CA57CA53BOOT = \"1\"" >> $WORK/build/conf/local.conf
 +
 +
bitbake core-image-weston
 +
</pre>
 +
</li>
 +
 +
</ol>
 +
</li>
 +
 +
</ol>
 +
 +
== Known issues and limitations ==
 +
TBD

Revision as of 18:42, 20 October 2016

This page contains information on building and running Yocto on Renesas R-Car-H3/M3 Salvator-X, Renesas R-Car-H3/M3 Salvator-X.View, Renesas R-Car-H3 H3ULCB, Renesas R-Car-H3 H3ULCB.View and Renesas R-Car-H3 H3ULCB.HAD, Renesas R-Car-M3 M3ULCB, Renesas R-Car-M3 M3ULCB.View boards.

Yocto versions

Poky-2.0.1 is supported. Specific commit of meta-openembedded is required.

Preliminary steps

  1. Download evaluation version of proprietary graphics and multimedia drivers from Renesas.

    To download Multimedia and Graphics library, please use the following link:
    https://www.renesas.com/en-us/software/D6000290.html
    To download related Linux drivers, please use the following link:
    https://www.renesas.com/en-us/media/secret/solutions/automotive/rcar-demoboard/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160906.zip

    Graphic drivers are required for X11 and 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
    
    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
    

    Refer to Yocto Project Quick Start for more information.

Building the BSP for Renesas R-Car Salvator-X H3/M3, Salvator-X.View H3/M3, H3ULCB, H3ULCB.View, H3ULCB.HAD, M3ULCB, M3ULCB.View

  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
    
  3. Switch to proper branches/commits
    1. For Yocto v2.9.0
      cd $WORK/poky
      git checkout -b tmp 65306b0bfc1afd0de9b1d470fd78c8c69f55f791
      cd $WORK/meta-openembedded
      git checkout -b tmp cb7e68f2a39fa6f24add48fc7b8d38fb7291bb44
      cd $WORK/meta-linaro
      git checkout -b tmp acf4f1f701e07670ec88435897a74f88dbe8ba87
      
    2. For Yocto v2.12.0
      cd $WORK/poky
      git checkout -b tmp 40376446904ae3529be41737fed9a0b650ed167d
      cd $WORK/meta-openembedded
      git checkout -b tmp 8ab04afbffb4bc5184cfe0655049de6f44269990
      cd $WORK/meta-linaro
      git checkout -b tmp 9b1fd178309544dff1f7453e796a9437125bc0d9
      

    Another versions are not tested for compatibility.

  4. Clone Renesas BSP layer and switch to the proper branch:
    1. For Yocto v2.9.0
      cd $WORK
      git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.9.0
      
    2. For Yocto v2.12.0
      cd $WORK
      git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.12.0
      
  5. Apply Linaro-GCC patch file:
    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
    
  6. Unzip downloaded proprietary driver modules to $WORK/proprietary folder.
    You should see the following files:
    1. For Yocto v2.9.0
      $ ls -1 $WORK/proprietary
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20160526.tar.gz
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160526.tar.gz
      
    2. For Yocto v2.12.0
      $ ls -1 $WORK/proprietary
      R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20160906.tar.gz
      R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20160906.tar.gz
      
  7. Populate meta-renesas with proprietary software packages.
    PKGS_DIR=$WORK/proprietary
    cd $WORK/meta-renesas
    sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
    
  8. Setup build environment
    cd $WORK
    source poky/oe-init-build-env
    
  9. Prepare default configuration files.
    cp $WORK/meta-renesas/meta-rcar-gen3/docs/sample/conf/<salvator-x|h3ulcb|m3ulcb>/linaro-gcc/mmp/*.conf ./conf/
    

    For weston/wayland:

    cd $WORK/build
    cp conf/local-wayland.conf conf/local.conf
    

    For X11:

    cd $WORK/build
    cp conf/local-x11.conf conf/local.conf
    
  10. Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support
  11. Edit local.conf to choose machine extension variant
  12. For H3ULCB board only:

    1. Edit local.conf to select IO configuration (by default only H3ULCB board peripherals are enabled):
      MACHINE_FEATURES_append = " h3ulcb-view" (use this append for View IO configuration)
      

      or

      MACHINE_FEATURES_append = " h3ulcb-had" (use this append for HAD IO configuration)
      

    For Salvator-X board only:

    1. Edit local.conf to select IO configuration (by default only Salvator-X board peripherals are enabled):
      MACHINE_FEATURES_append = " salvator-x-view" (use this append for View IO configuration)
      SOC_FAMILY = "r8a7796" (make this change only for M3 Salvator-X, since the default is H3 Salvator-X)
      

    For M3ULCB board only:

    1. Edit local.conf to select IO configuration (by default only M3ULCB board peripherals are enabled):
      MACHINE_FEATURES_append = " m3ulcb-view" (use this append for View IO configuration)
      


  13. Edit local.conf to enable multicluster boot (enable both CA57 and CA53 clusters):
    CA57CA53BOOT = "1"
    
  14. Edit local.conf with evaluation packages requirements:
    1. For Yocto v2.9.0 (to build only lib64, since evaluation packages do not include lib32 support)
      IMAGE_INSTALL_remove += " lib32-weston lib32-packagegroup-multimedia-libs lib32-omx-user-module lib32-libdrm lib32-libdrm-kms lib32-gles-user-module"
      
    2. For Yocto v2.12.0 (to enable EVA_ prefix during packages install)
      DISTRO_FEATURES_append = " use_eva_pkg"
      
  15. Start the build
    For weston/wayland:
    bitbake core-image-weston
    

    For X11:

    bitbake core-image-x11
    
  16. Building image can take upto a few hours depending on your host system performance.
    After the build has been completed successfuly, 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.

  17. 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-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/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.

  18. You can now boot R-Car H3 H3ULCB board over TFTP and NFS

Build scripts examples

  1. Build preparation
    1. For Yocto v2.9.0
      #!/bin/sh
      
      mkdir build || exit
      cd build
      WORK=`pwd`
      echo $WORK
      
      git clone git://git.yoctoproject.org/poky
      git clone git://git.linaro.org/openembedded/meta-linaro.git
      git clone git://git.openembedded.org/meta-openembedded
      git clone git://github.com/CogentEmbedded/meta-rcat.git meta-renesas -b v2.9.0
      
      cd $WORK/poky
      git checkout -b tmp 65306b0bfc1afd0de9b1d470fd78c8c69f55f791
      cd $WORK/meta-linaro
      git checkout -b tmp acf4f1f701e07670ec88435897a74f88dbe8ba87
      cd $WORK/meta-openembedded
      git checkout -b tmp cb7e68f2a39fa6f24add48fc7b8d38fb7291bb44
      
      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
      
      cd $WORK/
      PKGS_DIR=$WORK/../proprietary
      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 $PKGS_DIR
      
    2. For Yocto v2.12.0
      #!/bin/sh
      
      mkdir build || exit
      cd build
      WORK=`pwd`
      echo $WORK
      
      git clone git://git.yoctoproject.org/poky
      git clone git://git.linaro.org/openembedded/meta-linaro.git
      git clone git://git.openembedded.org/meta-openembedded
      git clone git://github.com/CogentEmbedded/meta-rcar.git meta-renesas -b v2.12.0
      
      cd $WORK/poky
      git checkout -b tmp 40376446904ae3529be41737fed9a0b650ed167d
      cd $WORK/meta-linaro
      git checkout -b tmp 9b1fd178309544dff1f7453e796a9437125bc0d9
      cd $WORK/meta-openembedded
      git checkout -b tmp 8ab04afbffb4bc5184cfe0655049de6f44269990
      
      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
      
      cd $WORK/
      PKGS_DIR=$WORK/../proprietary
      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 $PKGS_DIR
      
  2. Building yocto for H3ULCB.View board
    1. For Yocto v2.9.0
      #!/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 "IMAGE_INSTALL_remove += \" lib32-weston lib32-packagegroup-multimedia-libs lib32-omx-user-module lib32-libdrm lib32-libdrm-kms lib32-gles-user-module\"" >> $WORK/build/conf/local.conf
      
      echo "MACHINE_FEATURES_append = \" h3ulcb-view\"" >> $WORK/build/conf/local.conf
      #echo "LVDSCAMERA_ONE = \"1\"" >> $WORK/build/conf/local.conf
      #echo "CA57CA53BOOT = \"1\"" >> $WORK/build/conf/local.conf
      
      bitbake core-image-weston
      
    2. For Yocto v2.12.0
      #!/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
      
      echo "MACHINE_FEATURES_append = \" h3ulcb-view\"" >> $WORK/build/conf/local.conf
      #echo "LVDSCAMERA_ONE = \"1\"" >> $WORK/build/conf/local.conf
      #echo "CA57CA53BOOT = \"1\"" >> $WORK/build/conf/local.conf
      
      bitbake core-image-weston
      

Known issues and limitations

TBD