From eLinux.org
< RZ-G
Revision as of 11:38, 18 February 2021 by Cbrandt (talk | contribs) (Created page with "__TOC__ 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/RZG2_yocto. =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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/RZG2_yocto.

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 Debina 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