RZ/G2 BSP Information Page

From Renesas.info
Revision as of 15:16, 2 September 2021 by Seebe (talk | contribs) (→‎Downloads)
Jump to navigation Jump to search

RZ-G

Downloads

VLP64 v1.0.6 VLP64 v1.0.7-RT VLP64 v1.0.8 VLP64 v1.0.9-RT
📦 RZ/G2 Linux Package (Complete Download)
ZIP file containing Yocto BSP and all documentation
💾 (link) 💾 (link)
📦 Yocto Recipe
This is the actual BSP provided in a Yocto build package
💾 (link) 💾 (link)
📦 Release Note for Linux Package
Build instructions, start with this document
📄 (link) 📄 (link)
📦 Reference Boards Linux Start-up Guide
How to program the boot loaders into SPI flash
📄 (link) 📄 (link)
📦 Release Note for HTML5 Linux Package
Building the HTML5 browser using the BSP requires a different set of instructions
📄 (link) 📄 (link)
📦 BSP Component list
List of each package and version included in the default BSP build
📄 (link) 📄 (link)
📦 RZ/G2 Group BSP Manual Set
Detailed information about Device Drivers and Device Tree Settings
📄 (link) 📄 (link) 📄 (link) 📄 (link)


BSP v1.0 BSP v1.1
📦 RZ/G2L Linux Package
Yocto BSP
Release Note
  ○ Build instructions, start with this document
RZ/G2L Reference Board Start-up Guide
  ○ How to program the boot loaders into SPI flash
BSP Component list
  ○ List of each package and version included in the default BSP build
💾 (link) 💾 (link)
📦 RZ/G2L Mali Graphic Library
● Files to be added to the Yocto BSP to enable Graphics
💾 (link)
📦 RZ/G2L Group BSP Manual Set
● Detailed information about Device Drivers and Device Tree Settings
📄 (link)
📦 RZ/G2L Multi-OS Package (CM33)
● FreeRTOS for CM33 and OpenAMP comms between A55 and CM33
📄 (link)

This page discusses topics specific to the content and code released in the BSP. Information on using the BSP is found on other pages such as RZ-G/RZG_yocto.

BSP Differences Between renesas.com Download and Github Version

Below are the differences between BSP you download from renesas.com and what is available on public repositories.

Public Repository Clones

  • meta-gplv2/
  • meta-linaro/
  • meta-openembedded/
  • meta-qt5/
  • meta-rzg2/
  • meta-virtualization/
  • poky/

These directories are direct clones (no modifications) from public repositories. The repository URLs and commit IDs that were used are documented in the README.md file in the meta-rzg2 directory in the BSP.


Example Layers

  • meta-hmi-custom/
  • meta-userboard/

These directories do not have any functionally. They are simple example templates you can use to make your own customer layers. They are only included in the renesas.com package.


The RZ/G2 BSP

  • meta-rzg2/

Basically, all the customizations and patches are located in the directory 'meta-rzg2'.
This directory is a clone of the public repository is located here: https://github.com/renesas-rz/meta-rzg2.
There are git tags for BSP version that was release.
The only difference is that in the renesas.com version, the following lines were added to the local.conf files under docs/sample/conf

DL_DIR = "${TOPDIR}/oss_packages"
BB_NO_NETWORK = "0"

Additionally, other configuration files such as bblayers_gecko.conf and local_gecko.con are added to the renesas.com download that are not in the github version.


Non-public Patches

  • extra/

This directory is only in the package downloaded from renesas.com
It contains patches that are not included in the public the meta-rzg2 repository on github. For example, the patches to enable HDMI on the boards were not posted to github because of potential license issues.


Video and Multi-media Drivers

  • proprietary/

This directory is only in the package downloaded from renesas.com
This directory contains .zip files which are essentially the propriety closed source video and multimedia drivers. They used to be downloaded separately, but are now included when downloaded the BSP from renesas.com. When following the instructions in the "Renesas Note" that comes with the BSP, users will run the script copy_proprietary_softwares.sh which will unpack these zip files into various directories under meta-rzg2.

Fix the VLP64 v1.0.5-RT SDK Toolchain

When the V1.0.5-RT BSP was released, there was a bug when creating the SDK toolchain. When using the SDK toolchain created by the v1.0.5-RT BSP to build a user application, you may get warning and error messages that the linker cannot find library files that you know exits. For example:

real-ld: warning: libm.so.6, needed by /opt/poky/2.4.3/sysroots/aarch64-poky-linux/usr/lib64/libwayland-client.so, not found (try using -rpath or -rpath-link)

This bug came as the result of using the binutils version that we import from the Debian Buster repository as part of the CIP core. There were 2 patches that were added to teh Debian repository that do not work well with ARM64 builds under Yocto. The fix is to simply remove the code that was added by those those 2 Debian patches. You can read more about it here: https://github.com/renesas-rz/meta-rzg2/commit/2a6153c80d59

The Renesas VLP64 v1.0.6 BSP has this fix, but the v1.0.5-RT BSP does not.

Below are the instructions to fix your existing v1.0.5-RT BSP.

1. Open a terminal in your v1.05-RT Yocto directory and change into the meta-rzg2 directory.

$ cd /x/x/x/rzg2_bsp_eva_v105rt
$ cd meta-rzg2

2. Download the specific commit (as a patch file) from the meta-rzg2 repository that was added to fix this issue for the v1.0.6 BSP release.

$ wget https://github.com/renesas-rz/meta-rzg2/commit/2a6153c80d59.patch

3. Apply the patch. Between the v1.0.5-RT and v1.0.6 BSP, the directory "meta-rzg2/cip-core-buster/cip-core-buster-limited/binutils" was moved into "meta-rzg2/recipes-cip-core/buster-limited/binutils". Therefore when we apply the patch, we need to change into the subdirecotry and then strip down the path from the patch file (-p3). Also, we can ignore the whitespace warnings because we are applying a patch that creates new patch files (that will have trailing white spaces), which is a little confusing for 'git apply'.

$ cd cip-core-buster/cip-core-buster-limited
$ git apply -p3 --whitespace=nowarn ../../2a6153c80d59.patch
$ cd ../..

4. Do a complete rebuild of the binutils that is used in the SDK (binutils-cross-canadian-aarch64) and then recreate SDK itself.

$ bitbake binutils-cross-canadian-aarch64 -c clean
$ bitbake binutils-cross-canadian-aarch64 -c cleansstate
$ bitbake binutils-cross-canadian-aarch64
$ bitbake core-image-qt-sdk -c populate_sdk

5. Finally, reinstall the SDK. As always, your SDK is located in build/tmp/deploy/sdk/

$ sudo ./poky-glibc-x86_64-core-image-qt-sdk-aarch64-toolchain-2.4.3.sh

Fix RZ/G2H eMMC boot for VLP64 v1.0.5-RT and v1.0.6

For the BSP releases of v1.0.5-RT and v1.0.6, a patch in the arm-trusted-firmware code was missing for RZ/G2H that prevented it from booting from eMMC. While RZ/G2H eMMC boot support exists in v1.0.4, for the v1.0.5 code release, the base software repository changed from the R-Car repository to the official ARM repository and new "rzg" subdirectory were created. With all these changes, this eMMC boot patch was unfortunately missed.

Please apply the patch below to your arm-trusted-firmware code base if you are using a RZ/G2H and require booting from eMMC.

Note: The same patch file can be used for all variations of v1.0.5 and v1.0.6 releases

$ wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts/vlp64_patches/BSP-1.0.5-RT/arm-trusted-firmware/fix-G2H-eMMC-boot_patch/0001-hihope-rzg2h-pfc-update.patch

Fix broken links to video files for VLP64 v1.0.5-RT and v1.0.6

The Renesas.com website was recently changed, and now the links for the sample video movies for the Yocto recipes-demos have become broken.

A patch to the meta-rzg2 Yocto layer is required to fix the URL.

Note: The same patch file can be used for all variations of v1.0.5 and v1.0.6 releases.

$ rzg2_bsp_eva_v106/meta-rzg2
$ wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts/vlp64_patches/BSP-1.0.6/meta-rzg2/fix-URL-change-of-video-files/0001-recipes-demos-hmi-demo-videos-update-URLs-of-video-f.patch
$ patch -p1 -i 0001-recipes-demos*.patch

SPI Flash Driver for BSP 1.0.6

SPI flash write from Linux is not officially supported in V1.0.6 BSP. If you want SPI write enabled for BSP 1.0.6. Please follow the below steps:

1. Add kernel patches to BSP

1.a) Please get required patch files from https://github.com/seebe/rzg_stuff/tree/master/build_scripts/vlp64_patches/BSP-1.0.6-SPI-write/kernel

$ rzg2_bsp_eva_v106/recipes-kernel/linux/linux-renesas/patches
$ mkdir v1.0.6_spi_patch
$ cd v1.0.6_spi_patch #copy patch files here

1.b) Update patches.scc file:

Yocto uses .scc file to apply patches located in ~/rzg2_bsp_eva_v106/meta-rzg2/recipes-kernel/linux/linux-renesas/patches.scc. Get updated .scc file from https://github.com/seebe/rzg_stuff/tree/master/build_scripts/vlp64_patches/BSP-1.0.6-SPI-write/

$ cd ~/rzg2_bsp_eva_v106/meta-rzg2/recipes-kernel/linux/linux-renesas/
$ wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts/vlp64_patches/BSP-1.0.6-SPI-write/patches.scc

2. Configuring kernel using menuconfig

Configure the kernel to enable Renesas SPI driver and SPI memory. The following commands initialize the BitBake environment, run the do_kernel_configme task, and launch menuconfig. These commands assume the Source Directory's top-level folder is ~/rzg2_bsp_eva_v106:

$ cd rzg2_bsp_eva_v106
$ source poky/oe-init-build-env
$ bitbake linux-renesas -c kernel_configme -f
$ bitbake linux-renesas -c menuconfig

Once menuconfig comes up, configure below kernel configuration parameters.

2.a)Enable Renesa RPC-IF driver:

.config - Linux/arm64 4.19.140 Kernel Configuration
 > Device Drivers > Memory Controller drivers

2.b)Enable SPI memory (M25P80 ):

.config - Linux/arm64 4.19.140 Kernel Configuration
 > Device Drivers > Memory Technology Device (MTD) support > Self-contained MTD device drivers 

After making your changes, simply exit the tool and save your changes to create an updated version of the .config configuration file

3. Build the image using updated BSP