Difference between revisions of "RZ-G/RZG2 BSP"

From eLinux.org
Jump to: navigation, search
(moved some content from page RZ-G/RZG2_yocto)
(Replaced content with "this page can be deleted")
(Tag: Replaced)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__TOC__
+
this page can be deleted
 
 
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]].
 
 
 
= 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'''<br>
 
* 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 [https://github.com/renesas-rz/meta-rzg2/blob/master/README.md README.md] file in the meta-rzg2 directory in the BSP.
 
 
 
 
 
'''Example Layers'''<br>
 
* 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'''<br>
 
* meta-rzg2/
 
Basically, all the customizations and patches are located in the directory 'meta-rzg2'.<br>
 
This directory is a clone of the public repository is located here: https://github.com/renesas-rz/meta-rzg2.<br>
 
There are git tags for BSP version that was release.<br>
 
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'''<br>
 
* extra/
 
This directory is only in the package downloaded from renesa.com<br>
 
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'''<br>
 
* proprietary/
 
This directory is only in the package downloaded from renesa.com<br>
 
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:
 
<pre>
 
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)
 
</pre>
 
 
 
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.
 
<pre>
 
$ cd /x/x/x/rzg2_bsp_eva_v105rt
 
$ cd meta-rzg2
 
</pre>
 
 
 
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.
 
<pre>
 
$ wget https://github.com/renesas-rz/meta-rzg2/commit/2a6153c80d59.patch
 
</pre>
 
 
 
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'.
 
<pre>
 
$ cd cip-core-buster/cip-core-buster-limited
 
$ git apply -p3 --whitespace=nowarn ../../2a6153c80d59.patch
 
$ cd ../..
 
</pre>
 
 
 
4. Do a complete rebuild of the binutils that is used in the SDK (binutils-cross-canadian-aarch64) and then recreate SDK itself.
 
<pre>
 
$ 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
 
</pre>
 
 
 
5. Finally, reinstall the SDK. As always, your SDK is located in build/tmp/deploy/sdk/
 
<pre>
 
$ sudo ./poky-glibc-x86_64-core-image-qt-sdk-aarch64-toolchain-2.4.3.sh
 
</pre>
 
 
 
= 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
 
<pre>
 
$ 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
 
</pre>
 

Latest revision as of 13:33, 23 July 2021

this page can be deleted