RZ-V/RZ-V2L SMARC: Difference between revisions
No edit summary |
|||
Line 18: | Line 18: | ||
= Getting Started = | = Getting Started = | ||
'''1. Linux BSP Components''' | |||
* Obtain the package '''rzv2l_linux-pkg_ver0.8.0.zip''' from the same Renesas representative that you received your board from. Unzip the contents and copy to a Linux PC. | |||
* Download the '''RZ/G2L Mali Graphic Library''' package [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-mali-graphic-library-evaluation-version (link)] to enable graphs. This package is also used for this RZ/V2L board. Copy the ZIP file to a Linux PC. | |||
'''2. Build Environment''' | |||
* To build the BSP, you will need a Linux PC running '''Ubuntu 20.04'''. Only this Host OS version was tested. | |||
* You can use a Linux PC (recommended) or a Virtual Machine. | |||
'''3. Build the BSP''' | |||
* The instructions for building the BSP are located in the '''Release Note''' document that is included in the rzv2l_linux-pkg_ver0.8.0.zip file package. | |||
* ⚠️ If you are building core-image-weston, you need to add '''Mali Graphics library''' mentioned in step 1. | |||
* A summary of the instructions located in the Release Note are below. Simple Copy/Paste the commands. | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
| Simple build instructions for BSP v0.8 | |||
|- | |||
| | |||
These instructions are a summary of what is explained in the BSP Release Note. | |||
<pre> | |||
# Extract package | |||
$ mkdir rzv2l_bsp_v0.8 | |||
$ tar -xf rzv2l_bsp_v080.tar.gz -C rzv2l_bsp_v0.8 | |||
$ cd rzv2l_bsp_v0.8 | |||
# Copy/Move the 'Mali Graphics library' Zip file (RTK0EF0045Z13001ZJ-v0.51_EN.zip) under our BSP directory. | |||
# Then, we will un-zip it and install it. | |||
$ unzip RTK0EF0045Z13001ZJ-v0.51_EN.zip | |||
$ cd RTK0EF0045Z13001ZJ-v0.51_EN/proprietary | |||
$ ./copy_gfx_mmp.sh ../../meta-rzv | |||
$ cd ../.. | |||
# Set up Yocto Environment | |||
$ source poky/oe-init-build-env | |||
$ cp ../meta-rzv/docs/template/conf/smarc-rzv2l/*.conf ./conf/ | |||
# Build | |||
$ bitbake core-image-minimal | |||
$ bitbake core-image-weston | |||
$ bitbake core-image-minimal -c populate_sdk | |||
</pre> | |||
|} | |||
'''4. Prepare an SD Card''' | |||
* The evaluation boards can be booted from SD Cards. The SD card must be formatted and loaded using a Linux PC. A helpful script has been created '''([https://github.com/renesas-rz/rzg2_bsp_scripts/tree/master/usb_sd_partition usb_sd_partition])''' that you can run on your Linux PC. | |||
* Insert your micro SD card into a '''USB-SD-Card reader''' and then plug into a Linux PC. | |||
* Use the commands below to download the formatting script and run. Please select your card and choose the default settings. | |||
<pre> | |||
$ wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/usb_sd_partition/usb_sd_partition.sh | |||
$ chmod +x usb_sd_partition.sh | |||
$ ./usb_sd_partition.sh | |||
</pre> | |||
* Use the commands below to copy the files you build with the BSP to the SD card. '''Start in the base of your Yocto BSP'''. | |||
<pre> | |||
# Change to the Yocto output directory that contains the files | |||
$ cd build/tmp/deploy/images/smarc-rzv2l | |||
# Copy the Linux kernel and Device Tree to partition 1 | |||
$ sudo cp -v Image /media/$USER/RZ_FAT | |||
$ sudo cp -v r9a07g054l2-smarc.dtb /media/$USER/RZ_FAT | |||
# Copy and expand the Root File System to partition 2 | |||
$ sudo tar -xvf core-image-weston-smarc-rzv2l.tar.gz -C /media/$USER/RZ_ext | |||
(or if NOT using graphics) | |||
$ sudo tar -xvf core-image-minimal-smarc-rzv2l.tar.gz -C /media/$USER/RZ_ext | |||
# Make sure all files are finished writing before removing the USB card reader from the PC | |||
$ sync | |||
</pre> | |||
* Safely remove your USB card reader by right clicking on the drive icon (either RZ_FAT or RZ_ext) in Ubuntu and selecting "Eject" | |||
'''5. Power the Board and Connect to the Serial Port ''' | |||
* Supply power the board using the '''USB-C connection''' on the carrier board labeled "Power Input" | |||
* On the carrier board, press the '''red button''' in order to turn on power to the board. The green LED labeled "Carrier PWR On" will be lit when power is on. | |||
* Now that the board is powered, plug a USB micro cable into the carrier board to the USB connector labeled '''"SER 3 UART"'''. Use a '''serial terminal program''' to interact as you board. With a Linux PC, we recommend using "putty" (connects to /dev/USB0), and with a Windows PC we recommend "TeraTerm" that connects to COMx. The baud rate of the Serial connection is '''115200 bps'''. | |||
* Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence. | |||
'''6. Switch settings for the CPU SOM board.''' | |||
* The SOM board contains a eMMC Flash device and a Micro SD Card socket. On the SOM board, you can only use one or the other because they are both connected to the same peripheral channel on the RZ/V2L. | |||
* Set the switches on the SOM board to what you want to use. | |||
* ⚠️ u-boot environment variables are always stored in eMMC Flash (not SPI flash). This means if you change switch SW1-2 to OFF on the SOM board, you cannot access saved u-boot environments variables and you will always get the message "*** Warning - MMC init failed, using default environment" | |||
* Note that the SD Card slot on the Carrier board will always work regardless of the setting of SW1-2 because it uses a separate peripheral channel on the RZ/V2L. | |||
* On the SOM (CPU) board, there is a little switch (SW1) near the SD card socket. | |||
<pre> | |||
SOM board uses SD Card socket SOM board uses eMMC Flash | |||
SW1-1 = ON/OFF(JTAG) SW1-1 = ON/OFF(JTAG) | |||
SW1-2 = ON SW1-2 = OFF | |||
+-----+ +-----+ | |||
| ON | | ON | | |||
| = = | | = | | |||
| | | = | | |||
| 1 2 | | 1 2 | | |||
+-----+ +-----+ | |||
</pre> | |||
'''7-1. Boot the Board using SD Card on Carrier Board (Recommended)''' | |||
* Insert the '''SD card''' into the socket on '''Carrier Board'''. | |||
<pre style="background-color:#FFFFFF; border:0px"> | |||
┌─────┬─────┬─────┐ | |||
│ │ SOM │ │ | |||
│ └─────┘ │ | |||
│ Carrier Board │ | |||
│ ┌─┐ │ | |||
└─────┴─┴─────────┘ | |||
↑ | |||
SD Card Socket | |||
</pre> | |||
* Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence. | |||
* At the u-boot prompt ( => ), enter the following commands to boot the board: | |||
<pre> | |||
# Create command macros and save them: | |||
=> setenv sd_boot_carrier1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 /r9a07g054l2-smarc.dtb' | |||
=> setenv sd_boot_carrier2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000' | |||
=> setenv bootcmd 'run sd_boot_carrier1 sd_boot_carrier2' | |||
=> saveenv | |||
# Reset the board and it will automatically boot | |||
</pre> | |||
'''7-2. Boot the Board using eMMC Flash on SOM Board''' | |||
* Set switch SW1-2 = OFF | |||
* The boot loader (u-boot) by default will try to boot from eMMC after 3 seconds. | |||
* Press the '''blue reset button''' and wait. | |||
'''7-3. Boot the Board using SD Card on SOM Board (eMMC Flash disabled)''' | |||
* Set switch SW1-2 = ON | |||
* Insert the '''SD card''' into the socket on '''SMARC SOM CPU board''' (not the carrier board). | |||
* Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence. | |||
* Note that you will get this message every time "*** Warning - MMC init failed, using default environment" because u-boot environment variables are stored in eMMC Flash (that you disabled) | |||
* At the u-boot prompt ( => ), enter the following commands to boot the board: | |||
<pre> | |||
# Manually enter the following commands to boot | |||
=> mmc dev 0 ; fatload mmc 0:1 0x48080000 Image ; fatload mmc 0:1 0x48000000 /r9a07g054l2-smarc.dtb | |||
=> setenv bootargs 'root=/dev/mmcblk0p2 rootwait' ; booti 0x48080000 - 0x48000000 | |||
</pre> | |||
'''8. Linux Login''' | |||
* The login will be "root" (no password is needed) |
Revision as of 19:15, 7 September 2021
<img height="200" style="float:right" src=> ← RZ-V
General Information
- Official RZ/V2L Website
- Please review the Documentation & Downloads section
- Board Documentation
- Since the RZ/V2L and RZ/G2L devices are pin compatible, the same evaluation board design is used for both.
- Linux Board Support Package Download
- The BSP is currently still in pre-release and must be obtained directly from your Renesas Sales representative.
Sharing of RZ/G2L Board Documentation
- Since the RZ/V2L and RZ/G2L devices are pin compatible, they share the exact same evaluation board design. Please refer to the RZ/G2L SMARC board page for reference.
- Board setup (button and switch) information
- LCD Monitors
Getting Started
1. Linux BSP Components
- Obtain the package rzv2l_linux-pkg_ver0.8.0.zip from the same Renesas representative that you received your board from. Unzip the contents and copy to a Linux PC.
- Download the RZ/G2L Mali Graphic Library package (link) to enable graphs. This package is also used for this RZ/V2L board. Copy the ZIP file to a Linux PC.
2. Build Environment
- To build the BSP, you will need a Linux PC running Ubuntu 20.04. Only this Host OS version was tested.
- You can use a Linux PC (recommended) or a Virtual Machine.
3. Build the BSP
- The instructions for building the BSP are located in the Release Note document that is included in the rzv2l_linux-pkg_ver0.8.0.zip file package.
- ⚠️ If you are building core-image-weston, you need to add Mali Graphics library mentioned in step 1.
- A summary of the instructions located in the Release Note are below. Simple Copy/Paste the commands.
Simple build instructions for BSP v0.8 |
These instructions are a summary of what is explained in the BSP Release Note. # Extract package $ mkdir rzv2l_bsp_v0.8 $ tar -xf rzv2l_bsp_v080.tar.gz -C rzv2l_bsp_v0.8 $ cd rzv2l_bsp_v0.8 # Copy/Move the 'Mali Graphics library' Zip file (RTK0EF0045Z13001ZJ-v0.51_EN.zip) under our BSP directory. # Then, we will un-zip it and install it. $ unzip RTK0EF0045Z13001ZJ-v0.51_EN.zip $ cd RTK0EF0045Z13001ZJ-v0.51_EN/proprietary $ ./copy_gfx_mmp.sh ../../meta-rzv $ cd ../.. # Set up Yocto Environment $ source poky/oe-init-build-env $ cp ../meta-rzv/docs/template/conf/smarc-rzv2l/*.conf ./conf/ # Build $ bitbake core-image-minimal $ bitbake core-image-weston $ bitbake core-image-minimal -c populate_sdk |
4. Prepare an SD Card
- The evaluation boards can be booted from SD Cards. The SD card must be formatted and loaded using a Linux PC. A helpful script has been created (usb_sd_partition) that you can run on your Linux PC.
- Insert your micro SD card into a USB-SD-Card reader and then plug into a Linux PC.
- Use the commands below to download the formatting script and run. Please select your card and choose the default settings.
$ wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/usb_sd_partition/usb_sd_partition.sh $ chmod +x usb_sd_partition.sh $ ./usb_sd_partition.sh
- Use the commands below to copy the files you build with the BSP to the SD card. Start in the base of your Yocto BSP.
# Change to the Yocto output directory that contains the files $ cd build/tmp/deploy/images/smarc-rzv2l # Copy the Linux kernel and Device Tree to partition 1 $ sudo cp -v Image /media/$USER/RZ_FAT $ sudo cp -v r9a07g054l2-smarc.dtb /media/$USER/RZ_FAT # Copy and expand the Root File System to partition 2 $ sudo tar -xvf core-image-weston-smarc-rzv2l.tar.gz -C /media/$USER/RZ_ext (or if NOT using graphics) $ sudo tar -xvf core-image-minimal-smarc-rzv2l.tar.gz -C /media/$USER/RZ_ext # Make sure all files are finished writing before removing the USB card reader from the PC $ sync
- Safely remove your USB card reader by right clicking on the drive icon (either RZ_FAT or RZ_ext) in Ubuntu and selecting "Eject"
5. Power the Board and Connect to the Serial Port
- Supply power the board using the USB-C connection on the carrier board labeled "Power Input"
- On the carrier board, press the red button in order to turn on power to the board. The green LED labeled "Carrier PWR On" will be lit when power is on.
- Now that the board is powered, plug a USB micro cable into the carrier board to the USB connector labeled "SER 3 UART". Use a serial terminal program to interact as you board. With a Linux PC, we recommend using "putty" (connects to /dev/USB0), and with a Windows PC we recommend "TeraTerm" that connects to COMx. The baud rate of the Serial connection is 115200 bps.
- Press the blue reset button, and then "u-boot" will start. Within 3 seconds, press the space bar on your keyboard in order to stop the auto-boot sequence.
6. Switch settings for the CPU SOM board.
- The SOM board contains a eMMC Flash device and a Micro SD Card socket. On the SOM board, you can only use one or the other because they are both connected to the same peripheral channel on the RZ/V2L.
- Set the switches on the SOM board to what you want to use.
- ⚠️ u-boot environment variables are always stored in eMMC Flash (not SPI flash). This means if you change switch SW1-2 to OFF on the SOM board, you cannot access saved u-boot environments variables and you will always get the message "*** Warning - MMC init failed, using default environment"
- Note that the SD Card slot on the Carrier board will always work regardless of the setting of SW1-2 because it uses a separate peripheral channel on the RZ/V2L.
- On the SOM (CPU) board, there is a little switch (SW1) near the SD card socket.
SOM board uses SD Card socket SOM board uses eMMC Flash SW1-1 = ON/OFF(JTAG) SW1-1 = ON/OFF(JTAG) SW1-2 = ON SW1-2 = OFF +-----+ +-----+ | ON | | ON | | = = | | = | | | | = | | 1 2 | | 1 2 | +-----+ +-----+
7-1. Boot the Board using SD Card on Carrier Board (Recommended)
- Insert the SD card into the socket on Carrier Board.
┌─────┬─────┬─────┐ │ │ SOM │ │ │ └─────┘ │ │ Carrier Board │ │ ┌─┐ │ └─────┴─┴─────────┘ ↑ SD Card Socket
- Press the blue reset button, and then "u-boot" will start. Within 3 seconds, press the space bar on your keyboard in order to stop the auto-boot sequence.
- At the u-boot prompt ( => ), enter the following commands to boot the board:
# Create command macros and save them: => setenv sd_boot_carrier1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 /r9a07g054l2-smarc.dtb' => setenv sd_boot_carrier2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000' => setenv bootcmd 'run sd_boot_carrier1 sd_boot_carrier2' => saveenv # Reset the board and it will automatically boot
7-2. Boot the Board using eMMC Flash on SOM Board
- Set switch SW1-2 = OFF
- The boot loader (u-boot) by default will try to boot from eMMC after 3 seconds.
- Press the blue reset button and wait.
7-3. Boot the Board using SD Card on SOM Board (eMMC Flash disabled)
- Set switch SW1-2 = ON
- Insert the SD card into the socket on SMARC SOM CPU board (not the carrier board).
- Press the blue reset button, and then "u-boot" will start. Within 3 seconds, press the space bar on your keyboard in order to stop the auto-boot sequence.
- Note that you will get this message every time "*** Warning - MMC init failed, using default environment" because u-boot environment variables are stored in eMMC Flash (that you disabled)
- At the u-boot prompt ( => ), enter the following commands to boot the board:
# Manually enter the following commands to boot => mmc dev 0 ; fatload mmc 0:1 0x48080000 Image ; fatload mmc 0:1 0x48000000 /r9a07g054l2-smarc.dtb => setenv bootargs 'root=/dev/mmcblk0p2 rootwait' ; booti 0x48080000 - 0x48000000
8. Linux Login
- The login will be "root" (no password is needed)