Difference between revisions of "R-Car/Boards/Stout:View"

From eLinux.org
Jump to: navigation, search
(Quick Start)
 
(17 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
== Introduction ==
 
== Introduction ==
This is the official Wiki for Renesas R-Car Stout + Maxim Integrated Expansion Board package. <br>
+
This is the official Wiki for [https://www.renesas.com/en-eu/solutions/automotive/adas/solution-kits/adas-surround-view-kit.html Renesas R-Car H2 ADAS Surround View Kit]. <br>
 +
 
 +
 
 
Refer to [[R-Car/Boards/Stout | Stout]] page <br>
 
Refer to [[R-Car/Boards/Stout | Stout]] page <br>
  
Line 17: Line 19:
  
 
== Where to buy ==
 
== Where to buy ==
''TBD''
+
ADAS Surround View Kit could be ordered from [http://de.rs-online.com/web/p/entwicklungskits-interface/9155976/?origin=PSF_431024|acc RS Components], Renesas product id: Y-R-CAR-ADAS-VIEW-NOW, RS Components product id: 915-5976
 +
 
 +
NOTE: You would need to order ADAS Starter Kit (Stout board) separately
  
== Official Maxim Integrated R-Car H2 Expansion Board Documentation ==
+
== ADAS Surround View Kit Documentation ==
''TBD''
+
Documentation is available at Renesas [http://www.renesas.eu/applications/automotive/adas/solution_kits/adas_surround_view_kit/index.jsp page]. Start with [http://www.renesas.eu/media/applications/automotive/adas/solution_kits/adas_surround_view_kit/R20UT3577ED0100_R-Car.pdf User's Manual document]
  
 
== Tested peripherals ==
 
== Tested peripherals ==
Line 29: Line 33:
 
[[File:camm.png |100px | maxim]] Maxim OV10635 camera  <br>
 
[[File:camm.png |100px | maxim]] Maxim OV10635 camera  <br>
 
[[File:wire.png | 150px | Fakra]] Wires <br>
 
[[File:wire.png | 150px | Fakra]] Wires <br>
 +
 +
== Pin-mux configuration ==
 +
As mentioned in [[R-Car/Boards/Stout:CPLD]] VIN and AVB Ethernet pins are routed thru configurable cpld. Thus before starting surround view application you should configure either VINs 0-3 either Ethernet AVB <br>
 +
Warning! Using 4 VINs blocks sd card. <br>
 +
You should not use the SD card for the rootfs. You can use [[R-Car/Boards/Yocto#Loading_kernel_via_TFTP_and_rootfs_via_NFS | nfs]] or a USB stick instead.
 +
<ol>
 +
<li>
 +
Set new state of muxes four VINs configuration
 +
<pre>
 +
echo -n vin0_bt656_state > /sys/devices/mux.9/state
 +
echo -n vin1_bt656_state > /sys/devices/mux.10/state
 +
echo -n vin2_bt656_state > /sys/devices/mux.11/state
 +
echo -n vin3_bt656_state > /sys/devices/mux.12/state
 +
</pre>
 +
</li>
 +
<li>
 +
Set new state of muxes four AVB configuration
 +
<pre>
 +
echo -n  avb_state > /sys/devices/mux.11/state
 +
</pre>
 +
</li>
 +
</ol>
  
 
== Quick Start ==
 
== Quick Start ==
=== Buld image ===
+
=== Build image ===
First please visit [http://elinux.org/R-Car/Boards/Yocto Main R-Car Yocto Page] and peform all necessary preparation steps like cloning repositories and copy binaries and config files. </br>
+
First please visit [http://elinux.org/R-Car/Boards/Yocto Main R-Car Yocto Page] and perform all necessary preparation steps like cloning repositories and copy binaries and config files.  
 
Then:
 
Then:
 
<ol>
 
<ol>
Line 38: Line 64:
 
Clone demo layer and meta-qt5
 
Clone demo layer and meta-qt5
 
<pre>
 
<pre>
git clone ''TBD''
+
git clone https://github.com/CogentEmbedded/meta-renesas-quick-start.git
git clone https://github.com/meta-qt5/meta-qt5.git
+
git clone https://github.com/CogentEmbedded/meta-qt5.git
cd $WORK/meta-qt5
+
git clone https://github.com/CogentEmbedded/meta-clang.git
git checkout -b tmp 6d9e2a6dfc21f7d9a3a11b4bcb426b5dfe6feaeb
 
 
</pre>
 
</pre>
 
</li>
 
</li>
 
<li>
 
<li>
Edit $WORK/meta-qt5/recipes-qt/qt5/qtmultimedia_git.bb for compatibility with current bitbake version
+
Switch to proper branches/commits
 
<pre>
 
<pre>
-EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains_any('PACKAGECONFIG', 'gstreamer gstreamer010', '', 'CONFIG+=done_config_gstreamer', d)}"
+
cd $WORK/meta-qt5
+EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'gstreamer', '', 'CONFIG+=done_config_gstreamer', d)}"
+
git checkout r-car-gen2
 +
cd $WORK/meta-clang
 +
git checkout r-car-gen2
 
</pre>
 
</pre>
 
</li>
 
</li>
 
<li>
 
<li>
Add necessary layers to $WORK/build/conf/bblayers.conf
+
Update conf files in $WORK/build/conf/
 
<pre>
 
<pre>
  ${TOPDIR}/../meta-renesas-quick-start \
+
cp meta-renesas-quick-start/docs/sample/conf/stout/* $WORK/build/conf/
  ${TOPDIR}/../meta-qt5 \
 
  ${TOPDIR}/../meta-openembedded/meta-ruby \
 
 
</pre>
 
</pre>
 
</li>
 
</li>
 
<li>
 
<li>
Please download and prepare necessary binaries form ''TBD''
+
Build and install image
 +
<pre>
 +
bitbake core-image-weston
 +
</pre>
 
</li>
 
</li>
 +
</ol>
 +
=== Boot with LVDS cameras ===
 +
<ol>
 
<li>
 
<li>
Build and install image as it's described in [http://elinux.org/R-Car/Boards/Yocto]
+
Prepare SD card and copy next files to SD card root directory
 +
<pre>
 +
./tmp/deploy/images/stout/core-image-weston-ramdisk-stout.cpio.gz.u-boot
 +
./tmp/deploy/images/stout/uImage
 +
./tmp/deploy/images/stout/uImage-r8a7790-stout-view.dtb
 +
</pre>
 
</li>
 
</li>
 
<li>
 
<li>
Copy application surroundview into rootfs image
+
Edit U-Boot environment configuration:
 +
<pre>
 +
setenv loadramdisk 'ext4load mmc 0:1 0x4C000000 /core-image-weston-stout.cpio.gz.u-boot'
 +
setenv loadkernel  'ext4load mmc 0:1 0x40007fc0 /uImage; ext4load mmc 0:1 0x40f00000 /uImage-r8a7790-stout-view.dtb'
 +
setenv setcpld 'cpld write 1 0x4966'
 +
setenv bootargs 'console=ttySC0,38400 ignore_loglevel rw root=/dev/ram rootwait ip=none vmalloc=384M'
 +
setenv bootramdisk 'bootm 0x40007fc0 0x4C000000 0x40f00000'
 +
setenv bootcmd 'run loadramdisk; run loadkernel; run setcpld; run bootramdisk'
 +
setenv bootmlow  0x41000000
 +
setenv bootmsize 0x0B000000
 +
saveenv
 +
</pre>
 
</li>
 
</li>
 
</ol>
 
</ol>
After all this steps you can start working with boards and apps.
 
  
=== Start Surroundview ===
+
=== Boot with SD card and 1Gb network ===
As mentioned in [[R-Car/Boards/Stout:CPLD]] VIN and AVB Ethernet pins are routed thru configurable cpld. Thus before starting surround view application you should configure either VINs 0-3 either Ethernet AVB <br>
 
Warning! Using 4 VINs blocks sd card. <br>
 
You should not SD card for foot fs. You can use [[R-Car/Boards/Yocto#Loading_kernel_via_TFTP_and_rootfs_via_NFS | nfs]] instead.
 
 
<ol>
 
<ol>
 
<li>
 
<li>
Set new state of muxes four VINs configuration
+
Prepare SD card
 
<pre>
 
<pre>
echo -n vin0_bt656_state > /sys/devices/mux.7/state
+
sudo tar xvf ./tmp/deploy/images/stout/core-image-weston-stout.tar.bz2 -C <sdcard_mountpoint>
echo -n vin1_bt656_state > /sys/devices/mux.8/state
 
echo -n vin2_bt656_state > /sys/devices/mux.9/state
 
echo -n vin3_bt656_state > /sys/devices/mux.10/state
 
 
</pre>
 
</pre>
Set new state of muxes four AVB configuration
+
</li>
 +
<li>
 +
Edit U-Boot environment configuration:
 
<pre>
 
<pre>
echo -n avb_state > /sys/devices/mux.9/state
+
setenv loadkernel 'ext4load mmc 0:1 0x40007fc0 /boot/uImage+dtb;'
 +
setenv setcpld 'cpld write 1 0x4164'
 +
setenv bootargs 'console=ttySC0,38400 ignore_loglevel rw root=/dev/mmcblk0p1 rootwait ip=none vmalloc=384M'
 +
setenv bootcmd 'run loadkernel; run setcpld; bootm 0x40007fc0'
 +
setenv bootmlow  0x41000000
 +
setenv bootmsize 0x0B000000
 +
saveenv
 
</pre>
 
</pre>
 
</li>
 
</li>
 
<li>
 
<li>
Start surroundview
+
After successfull boot, you will be able to use eth1 1Gb interface
 
<pre>
 
<pre>
./surroundView_renesas_lvds.sh
+
ifconfig eth1 up
 
</pre>
 
</pre>
 
</li>
 
</li>
 
</ol>
 
</ol>
 +
 +
 +
=== Start Surroundview ===
 +
After board successfully booted you will be able to run SurroundView application. 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.
 +
Example of usage with LVDS cameras:
 +
<pre>
 +
cd /home/root/sv
 +
sv-utest -v /dev/video0,/dev/video1,/dev/video2,/dev/video3
 +
</pre>
 +
Example of usage with ethernet jpeg cameras ([] -- optional arguments):
 +
<pre>
 +
cd /home/root/sv
 +
sv-utest -i eth1 -m <mac1>,<mac2>,<mac3>,<mac4> -j /dev/video1 -f i420 [--proto <ethertype, default 0x88B5> --pdu_subtype <pdu subtype, default 0x2>]
 +
</pre>

Latest revision as of 16:25, 1 March 2017

Introduction

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


Refer to Stout page

Hardware

Top view
Bottom view

Hardware Features

  • Extension board is connected via 440-pin connector.
  • Extension board takes power from mother board
  • Four camera connectors routed thru max9272
  • Ethernet (1000 Mbps) KZ9031RNXCA phy
  • CAN interface connector

Where to buy

ADAS Surround View Kit could be ordered from RS Components, Renesas product id: Y-R-CAR-ADAS-VIEW-NOW, RS Components product id: 915-5976

NOTE: You would need to order ADAS Starter Kit (Stout board) separately

ADAS Surround View Kit Documentation

Documentation is available at Renesas page. Start with User's Manual document

Tested peripherals

This extension board has been tested with I2C and avb cameras

System with LVDS cameras

Cameras:
IMI IMI Gen4 minicube automotive camera (OV10635, MAX9271)
maxim Maxim OV10635 camera
Fakra Wires

Pin-mux configuration

As mentioned in R-Car/Boards/Stout:CPLD VIN and AVB Ethernet pins are routed thru configurable cpld. Thus before starting surround view application you should configure either VINs 0-3 either Ethernet AVB
Warning! Using 4 VINs blocks sd card.
You should not use the SD card for the rootfs. You can use nfs or a USB stick instead.

  1. Set new state of muxes four VINs configuration
    echo -n vin0_bt656_state > /sys/devices/mux.9/state
    echo -n vin1_bt656_state > /sys/devices/mux.10/state
    echo -n vin2_bt656_state > /sys/devices/mux.11/state
    echo -n vin3_bt656_state > /sys/devices/mux.12/state
    
  2. Set new state of muxes four AVB configuration
    echo -n  avb_state > /sys/devices/mux.11/state
    

Quick Start

Build image

First please visit Main R-Car Yocto Page and perform all necessary preparation steps like cloning repositories and copy binaries and config files. Then:

  1. Clone demo layer and meta-qt5
    git clone https://github.com/CogentEmbedded/meta-renesas-quick-start.git
    git clone https://github.com/CogentEmbedded/meta-qt5.git
    git clone https://github.com/CogentEmbedded/meta-clang.git
    
  2. Switch to proper branches/commits
    cd $WORK/meta-qt5
    git checkout r-car-gen2
    cd $WORK/meta-clang
    git checkout r-car-gen2
    
  3. Update conf files in $WORK/build/conf/
    cp meta-renesas-quick-start/docs/sample/conf/stout/* $WORK/build/conf/
    
  4. Build and install image
    bitbake core-image-weston
    

Boot with LVDS cameras

  1. Prepare SD card and copy next files to SD card root directory
    ./tmp/deploy/images/stout/core-image-weston-ramdisk-stout.cpio.gz.u-boot
    ./tmp/deploy/images/stout/uImage
    ./tmp/deploy/images/stout/uImage-r8a7790-stout-view.dtb
    
  2. Edit U-Boot environment configuration:
    setenv loadramdisk 'ext4load mmc 0:1 0x4C000000 /core-image-weston-stout.cpio.gz.u-boot'
    setenv loadkernel  'ext4load mmc 0:1 0x40007fc0 /uImage; ext4load mmc 0:1 0x40f00000 /uImage-r8a7790-stout-view.dtb'
    setenv setcpld 'cpld write 1 0x4966'
    setenv bootargs 'console=ttySC0,38400 ignore_loglevel rw root=/dev/ram rootwait ip=none vmalloc=384M'
    setenv bootramdisk 'bootm 0x40007fc0 0x4C000000 0x40f00000'
    setenv bootcmd 'run loadramdisk; run loadkernel; run setcpld; run bootramdisk'
    setenv bootmlow  0x41000000
    setenv bootmsize 0x0B000000
    saveenv
    

Boot with SD card and 1Gb network

  1. Prepare SD card
    sudo tar xvf ./tmp/deploy/images/stout/core-image-weston-stout.tar.bz2 -C <sdcard_mountpoint>
    
  2. Edit U-Boot environment configuration:
    setenv loadkernel  'ext4load mmc 0:1 0x40007fc0 /boot/uImage+dtb;'
    setenv setcpld 'cpld write 1 0x4164'
    setenv bootargs 'console=ttySC0,38400 ignore_loglevel rw root=/dev/mmcblk0p1 rootwait ip=none vmalloc=384M'
    setenv bootcmd 'run loadkernel; run setcpld; bootm 0x40007fc0'
    setenv bootmlow  0x41000000
    setenv bootmsize 0x0B000000
    saveenv
    
  3. After successfull boot, you will be able to use eth1 1Gb interface
    ifconfig eth1 up
    


Start Surroundview

After board successfully booted you will be able to run SurroundView application. See the manual for instructions R-Car Surround View manual on how to run and use SurroundView application. Example of usage with LVDS cameras:

cd /home/root/sv
sv-utest -v /dev/video0,/dev/video1,/dev/video2,/dev/video3

Example of usage with ethernet jpeg cameras ([] -- optional arguments):

cd /home/root/sv
sv-utest -i eth1 -m <mac1>,<mac2>,<mac3>,<mac4> -j /dev/video1 -f i420 [--proto <ethertype, default 0x88B5> --pdu_subtype <pdu subtype, default 0x2>]