Difference between revisions of "R-Car/Boards/ADAS-View-Solution-Kit"

From eLinux.org
Jump to: navigation, search
(SuroundView IMR version)
(Legacy BSP)
 
(35 intermediate revisions by the same user not shown)
Line 18: Line 18:
  
 
== Quick Start ==
 
== Quick Start ==
=== Build image ===
+
=== Build BSP images ===
First please visit [[R-Car/Boards/Yocto-Gen3 | R-Car Yocto Gen3]] and perform necessary preparation steps 1-12.
+
Please follow these instruction to build BSP http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Building_the_BSP_for_Renesas_ADAS_boards:
Then:
 
<ol>
 
<li>
 
Clone demo layer to allow support of ADAS applications
 
<pre>
 
git clone https://github.com/CogentEmbedded/meta-renesas-quick-start.git
 
git checkout -b bsp_v212
 
</pre>
 
</li>
 
<li>
 
Add necessary layers to $WORK/build/conf/bblayers.conf
 
<pre>
 
  ${TOPDIR}/../meta-openembedded/meta-networking \
 
  ${TOPDIR}/../meta-openembedded/meta-multimedia \
 
  ${TOPDIR}/../meta-renesas-quick-start \
 
</pre>
 
</li>
 
<li>
 
Add necessary features to $WORK/build/conf/local.conf
 
<pre>
 
DISTRO_FEATURES_append = " surroundview "
 
DISTRO_FEATURES_append = " opencv-sdk "
 
DISTRO_FEATURES_append = " wayland"
 
  
</pre>
+
At step 8 use h3ulcb target name <br/>
</li>
+
At step 16 use images for View ADAS Starter Kit board.
<li>
 
Build and install image as it's described in [http://elinux.org/R-Car/Boards/Yocto-Gen3] steps 13-16.
 
<pre>
 
bitbake core-image-weston
 
</pre>
 
</li>
 
</ol>
 
After all these steps you can start working with boards and apps.
 
=== Build SDK ===
 
After building image run this command to build SDK
 
<pre>
 
bitbake core-image-weston -c populate_sdk
 
</pre>
 
After build success the SDK installation script must appears in ./tmp/deploy/sdk directory:
 
<pre>
 
tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-2.0.2.sh
 
</pre>
 
To install SDK run this command and follow instructions on the screen:
 
<pre>
 
./tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-2.0.2.sh
 
</pre>
 
  
=== Build scripts example ===
+
NOTE: you can refer to http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Build_scripts_examples section and use scripts as is.
<pre>
 
#!/bin/sh
 
  
mkdir build || exit
+
=== Build SDK ===
cd build
+
Please follow these instruction to build SDK http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Build_SDK
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
 
git clone git://github.com/CogentEmbedded/meta-renesas-quick-start.git meta-renesas-quick-start -b bsp_v212
 
 
 
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
 
 
 
cd $WORK/
 
 
 
source poky/oe-init-build-env
 
 
 
 
 
#cp $WORK/meta-renesas-quick-start/docs/sample/conf/m3ulcb/*.conf ./conf/.
 
#cp $WORK/meta-renesas-quick-start/docs/sample/conf/salvator-x/*.conf ./conf/.
 
#cp $WORK/meta-renesas-quick-start/docs/sample/conf/ttardrive/*.conf ./conf/.
 
cp $WORK/meta-renesas-quick-start/docs/sample/conf/h3ulcb/*.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 -c populate_sdk
 
</pre>
 
  
 
=== Flashing firmware ===
 
=== Flashing firmware ===
In case you have absolutely new R-Car H3 or M3 board, you need to update firmware.  
+
Please follow these instruction to flashing firmware http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Flashing_firmware (optional step)
Please refer to page [[R-Car/Boards/H3SK |R-Car H3SK]] or [[R-Car/Boards/M3SK |R-Car M3SK]] for the instructions
 
on flashing firmware.
 
  
 
=== U-Boot Environment ===
 
=== U-Boot Environment ===
For using view board you need to use *-view.dtb file. The example of setting U-Boot environment for booting from SD card:
+
 
 +
Please follow these instruction to  boot from SD card http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Configure_U-Boot_to_boot_from_SD_card <br/>
 +
For View board you must use one of the following dtb files:  
 
<pre>
 
<pre>
# In U-Boot prompt
+
Image-es1-r8a7795-h3ulcb-view.dtb
setenv bootargs 'console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait consoleblank log_buf_len=1M'
+
Image-r8a7795-h3ulcb-view.dtb
setenv bootcmd 'ext4load mmc 0 48080000 /boot/Image; ext4load mmc 0 48000000 /boot/r8a7795-h3ulcb-view.dtb; booti 48080000 - 48000000'
 
saveenv
 
 
</pre>
 
</pre>
  
 
=== ADAS test applications ===
 
=== ADAS test applications ===
==== SurroundView GPU version ====
+
Please follow these instruction to build and use ADAS tests http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#ADAS_test_applications
<ol>
 
<li>
 
Clone and build sv-utest application (see the README.md file as well):
 
<pre>
 
git clone https://github.com/CogentEmbedded/sv-utest.git
 
cd sv-utest
 
. <SDK_INSTALL_PATH>/environment-setup-aarch64-poky-linux
 
mkdir build
 
cd build
 
cmake -DSV_TARGET_PLATFORM=GEN3 ../
 
make
 
</pre>
 
</li>
 
<li>
 
Copy the resulted binaries on rootfs. As example, for SD card:
 
<pre>
 
mkdir <mountpoint>/home/root/sv
 
sudo cp sv-utest/bin/sv-utest <mountpoint>/usr/bin/
 
sudo cp sv-utest/libs/gen3/libsv.so <mountpoint>/usr/lib/
 
sudo cp -r sv-utest/resources/* <mountpoint>/home/root/sv/
 
</pre>
 
</li>
 
<li>
 
See the manual for instructions [https://github.com/CogentEmbedded/sv-utest/blob/master/docs/cogente_sv_manual_public.pdf R-Car Surround View manual] on how to run and use SurroundView application. In short:
 
<pre>
 
cd /home/root/sv
 
sv-utest -v /dev/video0,/dev/video1,/dev/video2,/dev/video3
 
</pre>
 
</li>
 
</ol>
 
 
 
==== SuroundView IMR version ====
 
<ol>
 
<li>
 
Save mesh object file from the GPU SurroundView: after calibartion and sphere adjusting are done, press S on the main 3d view to save mesh file.
 
Mesh object file name is "meshFull.obj" in the current working directory of SurroundView.
 
</li>
 
<li>
 
Clone and build imr-sv-utest application (see the README.md file as well):
 
<pre>
 
git clone https://github.com/CogentEmbedded/imr-sv-utest.git
 
cd imr-sv-utest
 
. <SDK_INSTALL_PATH>/environment-setup-aarch64-poky-linux
 
mkdir build
 
cd build
 
cmake -DIMR_TARGET_PLATFORM=GEN3 ../
 
make
 
</pre>
 
IMR SuroundView executable stored ../bin directory.
 
</li>
 
<li>
 
It's need to generate png files with car model images before running IMR SurroundView. Copy executable "gen" from "prebuilt/GEN3" directory
 
to the H3 board.
 
Example of generation png files with car (avalaible only for Gen3):
 
<pre>
 
./gen -w <width> -h <height> -c <color> -o <path to store> -s <positions> -m <car object> \
 
-l <car length> -S <shadow rectangle> -d <debug>
 
./gen -w 1920 -h 1080  -c 0x404040FF -o ./data/model -s 8:32:8 -m Car.obj -l 1.0  -S -0.2:-0.10:0.2:0.10
 
</pre>
 
</li>
 
<li>
 
Run the IMR SurroundView with the generated png files:
 
<pre>
 
./imr-wl -f uyvy -v /dev/video0,/dev/video1,/dev/video2,/dev/video3 -w 1280 -h 800 -W 1920 -H 1080 \
 
-r /dev/video4,/dev/video5,/dev/video6,/dev/video7,/dev/video4,/dev/video5,/dev/video6,/dev/video7 -m ./data/model \
 
      -M meshFull.obj -X 1920 -Y 1080 -S -0.30:-0.10:0.30:0.10 -g 1.0 -s 8:32:8
 
</pre>
 
Run "./imr-wl -h" for options explanation.
 
</li>
 
  
==== 8 Camera Demo (GPU + IMR version) ====
+
=== Legacy BSP ===
TBD
+
Legacy BSP instruction can be found here [[R-Car/Boards/ADAS-View-Solution-Kit-legacy | ADAS View Solution Kit legacy]]

Latest revision as of 00:00, 14 September 2017

Introduction

This is the official Wiki for Renesas R-Car ADAS View Solution Kit.


Refer to R-Car Starter Kit Pro page
Refer to R-Car Starter Kit Premier page

Where to buy

TBD

ADAS View Solution Kit Documentation

TBD

System with LVDS cameras

TBD

Quick Start

Build BSP images

Please follow these instruction to build BSP http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Building_the_BSP_for_Renesas_ADAS_boards:

At step 8 use h3ulcb target name
At step 16 use images for View ADAS Starter Kit board.

NOTE: you can refer to http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Build_scripts_examples section and use scripts as is.

Build SDK

Please follow these instruction to build SDK http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Build_SDK

Flashing firmware

Please follow these instruction to flashing firmware http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Flashing_firmware (optional step)

U-Boot Environment

Please follow these instruction to boot from SD card http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Configure_U-Boot_to_boot_from_SD_card
For View board you must use one of the following dtb files:

Image-es1-r8a7795-h3ulcb-view.dtb
Image-r8a7795-h3ulcb-view.dtb

ADAS test applications

Please follow these instruction to build and use ADAS tests http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#ADAS_test_applications

Legacy BSP

Legacy BSP instruction can be found here ADAS View Solution Kit legacy