Difference between revisions of "R-Car/Boards/Kingfisher-legacy"

From eLinux.org
Jump to: navigation, search
(Created page with "{{TOC right}} == Introduction == This is the official Wiki for Kingfisher Infotainment Board. == Hardware == This section contains information about Kingfisher Board hardwa...")
 
(Change to redirect page)
(Tag: New redirect)
 
Line 1: Line 1:
{{TOC right}}
+
#REDIRECT[[R-Car/Boards/Kingfisher/Yocto-Gen3-legacy]]
 
 
== Introduction ==
 
This is the official Wiki for Kingfisher Infotainment Board.
 
 
 
== Hardware ==
 
 
 
This section contains information about Kingfisher Board hardware.
 
 
 
===Board Layout===
 
 
 
[[File:Kfisher top specs.png|802px]]
 
<br> <br>
 
[[File:Kfisher bot specs.png|802px]]
 
 
 
=== Hardware Features ===
 
* Ethernet AVB phy
 
** KSZ9031 phy
 
* MOST interface
 
** Support both 3-pin and 6-pin MLB interface
 
** Pinout compatible with Microchip evaluation boards
 
* LVDS camera interface
 
** MAX9272 deserializer
 
** 8-bit wide video bus connected to VI2 interface of R-Car M2 CPU
 
** 5V or 12V selectable supply voltage for camera with current limiting
 
* High quality 24-bit audio codec PCM3168A
 
** 8 input channels (4 stereo jacks for microphone connection)
 
** 6 line out channels (RCA connectors)
 
** 6 HP outputs (3 stereo jack connectors for direct headphones connection)
 
** 44100/48000 Hz sampling frequency
 
* Two USB 3.0 ports
 
** USB port supports host, device and OTG modes
 
* SD card slot
 
* Si4689 base AM/FM/DAB radio
 
** Digital audio interface to R-Car M2 CPU
 
** Additional flash storage for fast radio boot
 
** Supply for active DAB antennas with current limit (5 or 12 V)
 
* GPS/GLONASS receiver
 
** Serial and i2c interface to R-Car
 
* 9-axis sensor:
 
** 3D digital linear acceleration sensor
 
** 3D digital angular rate sensor
 
** 3D digital magnetic sensor
 
* WiFi/BT module Texas Instruments WL1837
 
* Power supply: 12V, 9 Amps
 
 
 
== How to build ==
 
=== Build image ===
 
<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 || exit
 
cd build
 
WORK=`pwd`
 
echo $WORK
 
</pre>
 
</li>
 
<li>Clone basic Yocto layers:
 
<pre>
 
cd $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
 
</pre>
 
</li>
 
 
 
<li>
 
Switch to proper branches/commits
 
<ol>
 
<li>
 
For BSP v2.12.0
 
<pre>
 
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
 
</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 [https://www.renesas.com/en-us/solutions/automotive/rcar-demoboard.html downloaded] proprietary driver modules to $WORK/proprietary folder.<br/>
 
You should see the following files:
 
<ol>
 
<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>
 
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>
 
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/<h3ulcb|m3ulcb>/linaro-gcc/mmp/*.conf ./conf/
 
cd $WORK/build
 
cp conf/local-wayland.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>
 
<ol>
 
<li>
 
Edit local.conf to select IO configuration (by default only H3(M3)ULCB board peripherals are enabled):
 
<pre>
 
MACHINE_FEATURES_append = " h3(m3)ulcb-kf" (use this append for Kingfisher IO configuration)
 
</pre>
 
</li>
 
</ol>
 
</li>
 
 
 
<li>
 
Edit local.conf with evaluation packages requirements:
 
<ol>
 
<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 />
 
<pre>
 
bitbake core-image-weston
 
</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-kf-v1.dtb
 
./tmp/deploy/images/h3ulcb/Image-r8a7795-h3ulcb-kf.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 proceed with running Yocto images
 
</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 ===
 
<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
 
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/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
 
echo "MACHINE_FEATURES_append = \" ulcb-kf\"" >> $WORK/build/conf/local.conf
 
 
 
bitbake core-image-weston
 
bitbake core-image-weston -c populate_sdk
 
</pre>
 

Latest revision as of 00:07, 12 June 2020