Difference between revisions of "R-Car/Boards/CCPF-SK/GettingStarted/Linux"

From eLinux.org
Jump to: navigation, search
(Add Category)
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Template:R-Car-Gen3-Navbox}}
 
{{Template:R-Car-Gen3-Navbox}}
 
{{TOC right}}
 
{{TOC right}}
<!--
+
 
 
[[Category:R-Car]]
 
[[Category:R-Car]]
 
[[Category:R-Car Gen3]]
 
[[Category:R-Car Gen3]]
-->
 
  
 
== Introduction ==
 
== Introduction ==
Line 20: Line 19:
 
#* phillips screwdriver, wrench, nut driver
 
#* phillips screwdriver, wrench, nut driver
 
# Host PC(Ubuntu 20.04 x64 is recommended as OS)
 
# Host PC(Ubuntu 20.04 x64 is recommended as OS)
<!--
+
#* {{Note}}: For Windows user, please refer to the [[R-Car/Boards/CCPF-SK/GettingStarted/Windows]]
#* {{Note}}: For Windows user, please refer to the [[R-Car/Boards/CCPF-SK/GettingSterted/Windows]]
 
-->
 
 
# Write down the MAC Address
 
# Write down the MAC Address
 
#: The original (board default) MAC address can be found on the label on top of RJ45 connector.
 
#: The original (board default) MAC address can be found on the label on top of RJ45 connector.
 
# Prebuilt Yocto BSP binary
 
# Prebuilt Yocto BSP binary
#* Download Yocto BSP binary and GFX/MMP package from following page: (Link is under preparing)
+
#* Download Yocto BSP binary and GFX/MMP package from following page:
<!--
+
#*: Binary: [https://www.renesas.com/node/1537916 Download for H3], [https://www.renesas.com/node/1537926 Download for M3]
#*: Binary: [https://example.org Download for H3], [https://example.org Download for M3]
+
#*: GFX/MMP: [https://www.renesas.com/node/1537911 Download for H3], [https://www.renesas.com/node/1537921 Download for M3]
#*: GFX/MMP: [https://example.org Download for H3], [https://example.org Download for M3]
+
#*: {{Note}} '''Source code is not needed for this guide'''. But, if source code is required, please refer to following:
#* {{Note}} If source code is required, please refer to following:
+
#*:: Source: [https://www.renesas.com/node/1537936 Download for H3], [https://www.renesas.com/node/1537941 Download for M3]
#*: Source: [https://example.org Download for H3], [https://example.org Download for M3]
 
-->
 
 
#* Extract downloaded files
 
#* Extract downloaded files
 
#*: ex.) R-Car Starter Kit Premier(H3)
 
#*: ex.) R-Car Starter Kit Premier(H3)

Revision as of 21:31, 7 October 2021


Introduction

This page contains how to set up CCPF-SK for the first time.

Required items

  1. CCPF-SK
  2. R-Car Starter Kit Premier(H3) or R-Car Starter Kit Pro(M3)
    See also R-Car/Boards/CCPF-SK/GettingStarted/Linux#Confirmed_Starter_Kit.
  3. Micro SD card(at least 16GB)
  4. Tools for assembly
    • phillips screwdriver, wrench, nut driver
  5. Host PC(Ubuntu 20.04 x64 is recommended as OS)
  6. Write down the MAC Address
    The original (board default) MAC address can be found on the label on top of RJ45 connector.
  7. Prebuilt Yocto BSP binary
    • Download Yocto BSP binary and GFX/MMP package from following page:
      Binary: Download for H3, Download for M3
      GFX/MMP: Download for H3, Download for M3
      Note Note: Source code is not needed for this guide. But, if source code is required, please refer to following:
      Source: Download for H3, Download for M3
    • Extract downloaded files
      ex.) R-Car Starter Kit Premier(H3)
      Unzip Yocto-v5.1.0-ccpfsk-h3-binary.zip -d <working directory>
      Unzip Yocto-v5.1.0-ccpfsk-h3-gfx_mmp.zip -d <working directory>
      Expected Directory Structure is following:
      <working directory>
          |-- binary      
          `-- gfx_mmp
      

Confirmed Starter Kit

Confirmed Board
Board SoC Confirmed
R-Car Starter Kit Premier H3 v3.0 (1rank DDR) OK
R-Car Starter Kit Premier H3 v3.0 (2rank DDR) OK
R-Car Starter Kit Premier H3 v2.0 with 8GB DDR NT
R-Car Starter Kit Premier H3 v2.0 with 4GB DDR NT
R-Car Starter Kit Pro M3 v3.0 OK
R-Car Starter Kit Pro M3 v1.0 NT
Note Note: NT='Not Tested'

See also:

HW Setup

Assemble the CCPF-SK

Video and documentation:

SW Setup

Prepare SD card

  1. Insert SD card to Host PC
  2. Install bmaptool
    sudo apt install bmap-tools
    
  3. Check SD card device file path(ex. /dev/sdb, /dev/mmcblk0 and so on)
    sudo fdisk -l
    
  4. Flash image to SD card using bmaptool
    cd <working directory>
    sudo umount /dev/sdx*
    sudo bmaptool copy ./binary/rootfs/core-image-weston-h3ulcb.wic.xz /dev/sdx
    # note: If you use m3 starter kit, please use core-image-weston-m3ulcb.wic.xz
    
  5. Copy GFX/MMP package to 2nd partition of SD card
    sudo mount /dev/sdx2 /mount
    sudo cp ./gfx_mmp/gfx_mmp.tar.bz2 -t /mount
    sudo umount /mnt
    

Flashing IPL(Firmware)

  1. Install required application
    sudo apt install minicom expect
    
  2. Power off the Boards
  3. Connect Host PC and the Board with Micro-USB cable.
  4. Set up minicom to use serial port
    Ex.) sudo minicom --setup
    1. Select "Serial port setup" and configure such as following.
      A to D items: There is no need to change anything.
      E - Bps/Par/Bits : 115200 8N1
      F - Hardware Flow Control : No
      G - Software Flow Control : No
      
    2. After finishing configure, press enter to exit "Serial port setup".
    3. Select "Save setup as dfl" to save settings.
    4. Then, select "Exit from Minicom"
  5. Interrupt autoboot on U-boot
    1. minicom -D /dev/ttyUSBx
      If following error is shown in console, please execute command "sudo gpasswd -a $USER dialout"
      cannot open /dev/ttyUSB0: Permission denied
      
      /dev/ttyUSBx is checked by using "dmesg" command
    2. Power on the board and interrupt autoboot on U-boot by pressing any key.
      If interrupting autoboot is succeeded, "=>" is shown in minicom.
    3. Quit minicom
      Press 'Ctrl-A' then press 'X'.
  6. Run the script to flash IPL(firmware)
    1. Execute following command
      cd binary/ipl
      ./renesas-bsp-rom-writer/starterkit/linux/rom_writer h3 v5.1.0 cpld /dev/ttyUSBx
      
    2. Follow the instruction shown in console.
    3. Wait for script is finished.
      If script is finished, minicom quits automatically.

Booting Yocto

  1. power off the board
  2. Insert Micro SD card to the board
  3. launch minicom
    minicom -D /dev/ttyUSBx
    
  4. Power on the board and interrupt autoboot on U-boot by pressing any key.
  5. Execute following command for set up U-boot:
    setenv ethaddr xx:x x:xx:xx:xx:xx
    setenv bootargs 'rw root=/dev/mmcblk1p1 rootwait'
    setenv dtb 'r8a77951-ulcb-ccpf-sk.dtb'
    setenv load_kernel_sd 'ext2load mmc 0:1 0x48080000 /boot/Image'
    setenv load_dtb_sd 'ext2load mmc 0:1 0x48000000 /boot/${dtb}'
    setenv bootcmd 'run load_kernel_sd; run load_dtb_sd; booti 0x48080000 - 0x48000000'
    saveenv
    
    Note:
    Input your board's mac address instead of "xx:xx:xx:xx:xx:xx ".
    dtb is changed by Starter Kit version. Please refer to following table.
    Please refer to the following page to check your Starter kit version:
  6. Execute "reset" command on U-boot to reset the board
  7. Yocto will be booted automatically
    Note:
    The board reboots automatically for the first booting Yocto.
    This is caused by installing GFX/MMP package.
    After the second boot, automatic reboot is not occurred.
Combination of the board and dtb file
R-Car Starter Kit dtb file
Premier(H3) v2.0/v3.0 r8a77951-ulcb-ccpf-sk.dtb
Pro(M3) v1.0 r8a77960-ulcb-ccpf-sk.dtb
Pro(M3) v3.0 r8a77961-ulcb-ccpf-sk.dtb

Next Step

Building and Customizing Yocto BSP

Troubleshooting

Q&A site

FAQ site

U-boot doesn't boot.

  • Please check the Dip switch(SW1=ON, SW6=All ON) on R-Car Starter Kit(Not CCPF-SK board).
See also :
  • If U-Boot doesn't boot in spite that SW1/SW6 is correct, please flash the IPL(firmware) again.
See also:
  • If U-Boot doesn't boot after following above instruction, the board may be broken.
So please try other board.