Difference between revisions of "R-Car/Boards/M3NSK"

From eLinux.org
Jump to: navigation, search
(Created page with "{{TOC right}} Yocto-Gen3 == Introduction == This is the Wiki for the Renesas R-Car Starter Kit Pro board(M3N). <pre> Typename: RTP0RC77965SKBX01...")
 
(Quick Start How To)
Line 12: Line 12:
 
===Build Yocto image===
 
===Build Yocto image===
  
Refer to the following for steps(step1~step11) necessary for making a Yocto image. <br/>
 
https://elinux.org/R-Car/Boards/Yocto-Gen3#Building_the_BSP_for_Renesas_H3_Starter_Kit.2C_M3_Starter_Kit
 
<br/><br/>
 
M3NULCB specific build proceedure
 
 
<ol>
 
<ol>
<li> Step2. Clone basic Yocto layers:
+
<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>
 
<pre>
<additional procedure>
+
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
 +
git clone git://github.com/renesas-rcar/meta-renesas
 
git clone git://github.com/CogentEmbedded/meta-rcar.git
 
git clone git://github.com/CogentEmbedded/meta-rcar.git
 
</pre>
 
</pre>
 
</li>
 
</li>
<li> Step3. Switch to proper branches/commits
+
 
 +
<li>
 +
Switch to proper branches/commits
 
<pre>
 
<pre>
<additional procedure>
+
cd $WORK/poky
 +
git checkout -b tmp 342fbd6a3e57021c8e28b124b3adb241936f3d9d
 +
cd $WORK/meta-openembedded
 +
git checkout -b tmp dacfa2b1920e285531bec55cd2f08743390aaf57
 +
cd $WORK/meta-linaro
 +
git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
 +
cd $WORK/meta-renesas
 +
git checkout -b tmp fd078b6ece537d986852cb827bd21e022a797b2f
 
cd $WORK/meta-rcar
 
cd $WORK/meta-rcar
 
git checkout -b v3.9.0 remotes/origin/v3.9.0
 
git checkout -b v3.9.0 remotes/origin/v3.9.0
 
</pre>
 
</pre>
 
</li>
 
</li>
<li> Step5. Download proprietary driver modules to $WORK/proprietary folder.
+
 
<pre>
+
<li>
 
Please get the proprietary package for R-Car M3N from the your company's distributer.
 
Please get the proprietary package for R-Car M3N from the your company's distributer.
</pre>
 
 
</li>
 
</li>
<li> Step6. Populate meta-renesas with proprietary software packages.
+
 
 +
<li>
 +
Populate meta-renesas with proprietary software packages.
 
<pre>
 
<pre>
 
export PKGS_DIR=$WORK/proprietary
 
export PKGS_DIR=$WORK/proprietary
Line 43: Line 61:
 
</pre>
 
</pre>
 
</li>
 
</li>
<li> Step8. Prepare default configuration files.  
+
 
 +
<li>
 +
Setup build environment
 +
<pre>
 +
cd $WORK
 +
source poky/oe-init-build-env
 +
</pre>
 +
</li>
 +
 
 +
<li>
 +
Prepare default configuration files.
 +
<li>
 
<pre>
 
<pre>
 
cp $WORK/meta-rcar/meta-rcar-gen3-adas/docs/sample/conf/m3nulcb/poky-gcc/mmp/*.conf ./conf/
 
cp $WORK/meta-rcar/meta-rcar-gen3-adas/docs/sample/conf/m3nulcb/poky-gcc/mmp/*.conf ./conf/
Line 50: Line 79:
 
</pre>
 
</pre>
 
</li>
 
</li>
<li> Step10. Edit local.conf with evaluation packages requirements:
+
 
<pre>
+
<li> Add layer meta-rcar :  
Don't need to edit.
 
</pre>
 
</li>
 
<li> <New step> Add layer meta-rcar :  
 
 
<pre>
 
<pre>
 
bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
 
bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
 
</pre>
 
</pre>
 
</li>
 
</li>
<li> Step 11. Start the build
+
 
 +
<li>
 +
Start the build <br />
 
<pre>
 
<pre>
 
bitbake core-image-weston
 
bitbake core-image-weston
</pre>  
+
</pre>
 
</li>
 
</li>
 
</ol>
 
</ol>

Revision as of 20:18, 3 October 2018

Yocto-Gen3

Introduction

This is the Wiki for the Renesas R-Car Starter Kit Pro board(M3N).

Typename: RTP0RC77965SKBX010SA00

Quick Start How To

Build Yocto 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
    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
    git clone git://github.com/renesas-rcar/meta-renesas
    git clone git://github.com/CogentEmbedded/meta-rcar.git
    
  3. Switch to proper branches/commits
    cd $WORK/poky
    git checkout -b tmp 342fbd6a3e57021c8e28b124b3adb241936f3d9d
    cd $WORK/meta-openembedded
    git checkout -b tmp dacfa2b1920e285531bec55cd2f08743390aaf57
    cd $WORK/meta-linaro
    git checkout -b tmp 75dfb67bbb14a70cd47afda9726e2e1c76731885
    cd $WORK/meta-renesas
    git checkout -b tmp fd078b6ece537d986852cb827bd21e022a797b2f
    cd $WORK/meta-rcar
    git checkout -b v3.9.0 remotes/origin/v3.9.0
    
  4. Please get the proprietary package for R-Car M3N from the your company's distributer.
  5. Populate meta-renesas with proprietary software packages.
    export PKGS_DIR=$WORK/proprietary
    cd $WORK/meta-renesas
    sh meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh $PKGS_DIR
    unset PKGS_DIR
    
  6. Setup build environment
    cd $WORK
    source poky/oe-init-build-env
    
  7. Prepare default configuration files.
  8. cp $WORK/meta-rcar/meta-rcar-gen3-adas/docs/sample/conf/m3nulcb/poky-gcc/mmp/*.conf ./conf/
    cd $WORK/build
    cp conf/local-wayland.conf conf/local.conf
    
  9. Add layer meta-rcar :
    bitbake-layers add-layer ../meta-rcar/meta-rcar-gen3-adas
    
  10. Start the build
    bitbake core-image-weston
    

Connect 5 V power supply to the board

Use 5 V power supply with a 5.5 mm barrel plug. The power supply should be able to provide 4(Min) ~ 8(Max)Amps.

Note

  • The recommended value is 8 Amps. But, user can use 4 Amps. and 6 Amps. (depends on the use case).

Booting Linux

* Kernel config: defconfig
* Kernel image: arch/arm64/boot/Image
* DTB: arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dtb

U-Boot boot command:

tftpboot 0x48080000 Image
tftpboot 0x48000000 r8a77965-m3nulcb.dtb 
booti 0x48080000 - 0x48000000

Flashing firmware

Writing data
Filename Program Top Address Flash Save Address Description
bootparam_sa0.srec 0xE6320000 0x000000 Loader(Boot parameter)
bl2-m3nulcb.srec 0xE6304000 0x040000 Loader
cert_header_sa6.srec 0xE6320000 0x180000 Loader(Certification)
bl31-m3nulcb.srec 0x44000000 0x1C0000 ARM Trusted Firmware
tee-m3nulcb.srec 0x44100000 0x200000 OP-Tee
u-boot-elf.srec 0x50000000 0x640000 U-Boot
  1. Power off the board
  2. Press SW8
    
  3. Set SW and JP as follows:
  4. SW1=OFF
    SW6[1]=ON, SW6[2]=ON, SW6[3]=OFF, SW6[4]=ON
    JP1 -> 1-2 short
    
  5. Power on the board
  6. Press SW8
    Minimonitor starts and provides prompts on console
    
  7. Change SW as follows:
  8. SW1=ON
    SW6[all]=ON
    
  9. Flash bootparam_sa0.srec. In console execute xls2 command (load program to hyper flash) and provide the following inputs:
  10. 3
    y
    e6320000
    0
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "bootparam_sa0.srec", after upload finished press any key
    y
    
  11. Flash bl2-m3nulcb.srec. In console execute xls2 command (load program to hyper flash) and provide the following inputs:
  12. 3
    y
    e6304000
    40000
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "bl2-m3nulcb.srec", after upload finished press any key
    y
    
  13. Flash cert_header_sa6.srec. In console execute xls2 command (load program to hyper flash) and provide the following inputs:
  14. 3
    y
    e6320000
    180000
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "cert_header_sa6.srec", after upload finished press any key
    y
    
  15. Flash bl31-m3nulcb.srec. In console execute xls2 command (load program to hyper flash) and provide the following inputs:
  16. 3
    y
    44000000
    1C0000
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "bl31-m3nulcb.srec", after upload finished press any key
    y
    
  17. Flash tee-m3nulcb.srec. In console execute xls2 command (load program to hyper flash) and provide the following inputs:
  18. 3
    y
    44100000
    200000
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "tee-m3nulcb.srec", after upload finished press any key
    y
    
  19. Flash u-boot-elf.srec. In console execute xls2 command (load program to hyper flash) and provide the following inputs:
  20. 3
    y
    50000000
    640000
    type "ctrl+A S" and select upload method "ascii", then choose file for uploading "u-boot-elf.srec", after upload finished press any key
    y
    
  21. Reset the board
  22. Press SW9
    

Test procedures

Audio

Ex)

amixer -c ak4613 set "DVC Out" 1%
aplay sample.wav

FAQ

http://elinux.org/Talk:R-Car/Boards/Yocto-Gen3

Known Issues