R-Car/Boards/Kingfisher-legacy

From eLinux.org
Jump to: navigation, search

Introduction

This is the official Wiki for Kingfisher Infotainment Board.

Hardware

This section contains information about Kingfisher Board hardware.

Board Layout

Kfisher top specs.png

Kfisher bot specs.png

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

  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 || exit
    cd build
    WORK=`pwd`
    echo $WORK
    
  2. Clone basic Yocto layers:
    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
    
  3. Switch to proper branches/commits
    1. For BSP 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
      
  4. 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
    
  5. Unzip downloaded proprietary driver modules to $WORK/proprietary folder.
    You should see the following files:
    1. 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
      
  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.
    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
    
  9. Edit $WORK/build/conf/local.conf to enable/disable graphics and multimedia proprietary drivers support
  10. Edit local.conf to choose machine extension variant
    1. Edit local.conf to select IO configuration (by default only H3(M3)ULCB board peripherals are enabled):
      MACHINE_FEATURES_append = " h3(m3)ulcb-kf" (use this append for Kingfisher IO configuration)
      
  11. Edit local.conf with evaluation packages requirements:
    1. For Yocto v2.12.0 (to enable EVA_ prefix during packages install)
      DISTRO_FEATURES_append = " use_eva_pkg"
      
  12. Start the build
    bitbake core-image-weston
    
  13. 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.

  14. 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-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
    

    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.

  15. You can now proceed with running Yocto images

After all these steps you can start working with boards and apps.

Build SDK

After building image run this command to build SDK

bitbake core-image-weston -c populate_sdk

After build success the SDK installation script must appears in ./tmp/deploy/sdk directory:

 tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-2.0.2.sh

To install SDK run this command and follow instructions on the screen:

./tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-toolchain-2.0.2.sh

Build scripts example

#!/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