https://renesas.info/w/api.php?action=feedcontributions&user=Eiclg&feedformat=atom
Renesas.info - User contributions [en]
2024-03-29T12:07:46Z
User contributions
MediaWiki 1.39.5
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Debian&diff=2750
RZ-G/RZ-G2 BSP Porting Debian
2024-01-12T03:10:00Z
<p>Eiclg: </p>
<hr />
<div>← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
==SoC: All==<br />
==Specification==<br />
This guide describes how to make Debian rootfs to work on RZ/G2L serial products.<br />
<br />
(Notes: GPU and Codec were not incluided yet, will update later)<br />
<br />
'''Target Debian OS Version:''' bullseye11.0<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
==Debian Filesystem Building==<br />
<br />
===Install QEMU===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''<code>sudo apt-get install qemu qemu-user-static</code>''' <br />
<br />
===Download Required Files===<br />
'''<code>sudo apt-get install binfmt-support debootstrap</code>'''<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Download debian package&emsp;<br />
|-<br />
|$ sudo su - root<br />
<br />
<nowiki>#</nowiki> mkdir ./debian<br />
<br />
<nowiki>#</nowiki> cd ./debian<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign bullseye root <nowiki>http://deb.debian.org/debian/</nowiki><br />
<br />
<nowiki>###</nowiki> Notes: If you want to build Debian 10, you can use below command<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign buster root <nowiki>http://deb.debian.org/debian/</nowiki><br />
|}This step requires network connection, if failed, please try more times.<br />
<br />
If this step is successful, you can see below messages<br />
<br />
[[File:debian package download.png|frameless|Debian package download]]<br />
<br />
=== Rootfs configuration ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initialize rootfs&emsp;<br />
|-<br />
|# cp /usr/bin/qemu-arm-static ./root/usr/bin<br />
<br />
<nowiki>#</nowiki> DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot root debootstrap/debootstrap --second-stage<br />
|}<br />
If this step is successful, you can see below contents<br />
<br />
[[File:debian init.png|frameless|debian init]]<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Additional Configuration<br />
|-<br />
|# cp -rf /etc/ssl root/etc ###copy certification from ubuntu pc to debian<br />
<br />
<nowiki>#</nowiki> chroot root<br />
<br />
<nowiki>#</nowiki><br />
<br />
<nowiki>#</nowiki> apt-get update<br />
<br />
<nowiki>#</nowiki> apt-get install vim openssh-server<br />
<br />
<nowiki>#</nowiki> apt install net-tools iputils-ping bash bzip2<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
change<br />
<br />
<nowiki>#</nowiki>PermitRootLogin prohibit-password<br />
<br />
to<br />
<br />
PermitRootLogin yes<br />
<br />
<nowiki>#</nowiki> adduser user ### input password according to the hint<br />
<br />
<nowiki>#</nowiki> passwd root ### change root password<br />
<br />
<nowiki>#</nowiki> echo "auto eth0" > /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> echo "iface eth0 inet dhcp" >> /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
<nowiki>#</nowiki> exit<br />
|}<br />
Compress rootfs<br />
{| class="wikitable"<br />
|+<br />
|# cd root<br />
<nowiki>#</nowiki> tar -cjf debian_bullseye_rootfs.tar.bz2 ./*<br />
|}<br />
Use debian_bullseye_rootfs.tar.bz2 to make sd card image (ignore)<br />
<br />
This rootfs should be able to work on any VLP kernel<br />
<br />
[[File:Debian11.png|frameless|Debian11]]</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting&diff=2703
RZ-G/RZ-G2 BSP Porting
2024-01-09T06:55:41Z
<p>Eiclg: link to debian rootfs build guide</p>
<hr />
<div>{{DISPLAYTITLE:RZ/G and RZ/V BSP Porting}}<br />
<br />
This page is to highlight important things to consider when porting the Renesas BSP to your own custom board.<br />
<br />
== Overview ==<br />
<br />
There is s a '''RZ/G2 Group Linux BSP Porting Guide''' document posted on Renesas.com.<br />
* https://www.renesas.com/us/en/document/mas/rzg2-group-linux-bsp-porting-guide<br />
This document contains information such as:<br />
* How to add a new build configuration for a new board to a Yocto<br />
* How to add a new build configuration for a new board to a u-boot<br />
* Information about configuring pins and GPIO<br />
* Information about Device Tree files for the kernel<br />
* The code references are for the VLP64 v1.0.x releases *(the older Linux-4.19 BSP)<br />
* The code refences are for the RZ/G2H,M,N,E devices.<br />
<br />
<br><br />
<br />
One preliminary point to underline is that you may NOT want to use Yocto at the beginning, rather clone the repositories, modify the code and build it using a cross toolchain.<br />
<br />
The paragraph order in this page is intentional. They represent the steps you normally do when you want to port the Renesas BSP, i.e. you absolutely want to start from [https://github.com/renesas-rz/rzg2_flash_writer Flash Writer]. When you get your first custom board samples the non-volatile memories are virgin and the first goals is to program them with bootloaders. One of the first thing you need to do is to adjust the DDR configuration to your own. Debugging DDR may be tricky but have it working is a major step toward success. You can test the DDR using some hidden [[RZ-G/RZG hardware#DDR test routines|Flash Writer commands]]. After that you may need to change the SPI configuration. <br />
<br />
Finally you can use Flash Writer to program the bootloaders: [https://github.com/renesas-rz/rzg_trusted-firmware-a Arm Trusted Firmware] (ATF) BL2 (aka IPL, Initial Program Loader), BL31 (Secure Monitor) and [https://github.com/renesas-rz/renesas-u-boot-cip u-boot] (BL33). BL32 is not strictly needed at the beginning, since it is the Trusted OS (optional). Bootloaders can be programmed into QSPI FLASH or eMMC, then of course the boot mode of the SoC shall be adjusted accordingly. ATF may also need to be configured depending on the non-volatile memory type. You may need to program separately (e.g. different files for each BL) or you can have a BL2 file and a FIP (Firmware Image Package) that includes all BL3x. <br />
<br />
You do not normally need to modify many things in ATF and in any case only what is in the "plat/renesas/rz" folder. One of the first things ATF BL2 does is to configure the DDR. You would need to use the same (working) configuration used with Flash Writer, so there should be no surprise here, if the DDR works with Flash Writer then it will work with ATF as well.<br />
<br />
<br />
<br />
[[File:sci-usb boot.png|frameless]]-------------------------------[[File:boot2.png|alt=|682x682px]]<br />
<br />
<br />
<br />
Then ATF loads BL31(image id=3), BL32 (again optionally, image id=4) and BL33 (u-boot, image id=5) from either QSPI or eMMC. Assuming everything goes fine u-boot prompt is finally reachable. The table below summarizes where the different actors in the boot process are '''typically''' stored and executed from.<br />
{| class="wikitable"<br />
!Item<br />
!Stored into<br />
!Executed out of<br />
|-<br />
|Boot ROM<br />
|Internal SOC ROM<br />
|XIP (eXecuted In Place)<br />
|-<br />
|BL2<br />
|QSPI/eMMC boot part/SD card<br />
|Internal SRAM<br />
|-<br />
|BL31-BL32<br />
|QSPI/eMMC boot part/SD card<br />
|DDR (secured by TrustZone)<br />
|-<br />
|BL33 (u-boot)<br />
|QSPI/eMMC boot part/SD card<br />
|DDR<br />
|-<br />
|Linux kernel<br />
|eMMC/SD card<br />
|DDR<br />
|-<br />
|GNU OS (rootfs)<br />
|eMMC/SD card<br />
|DDR<br />
|}<br />
The next step is to port the [https://github.com/renesas-rz/rz_linux-cip Linux CIP Kernel], by "porting" we mainly mean that the reference board device tree gets modified to reflect the HW available on the custom board.<br />
<br />
Finally you can use Yocto to generate the root file system including all the bits and bobs you need to run your custom application.<br />
<br />
=Flash Writer=<br />
* [[RZ-G/RZ-G2_BSP_Porting_FlashWriter]]<br />
<br />
= Arm Trusted Firmware =<br />
* [[RZ-G/RZ-G2_BSP_Porting_ATF]]<br />
<br />
= u-boot =<br />
* [[RZ-G/RZ-G2_BSP_Porting_uboot]]<br />
<br />
= Linux Kernel =<br />
* [[RZ-G/RZ-G2_BSP_Porting_kernel]]<br />
<br />
=Yocto=<br />
* [[RZ-G/RZ-G2_BSP_Porting_Yocto]]<br />
<br />
= Ubuntu =<br />
<br />
* [[RZ-G/RZ-G2 BSP_Porting_Ubuntu]]<br />
<br />
= Debian =<br />
* [[RZ-G/RZ-G2 BSP Porting Debian]]<br />
=Memory Map=<br />
* This section explains how DDR Memory is divided and configured.<br />
* [[RZ-G/RZ-G2_BSP_MemoryMap]]<br />
<br />
=Github Repositories=<br />
* These are the repositories where Renesas publishes the RZ code to.<br />
** https://github.com/renesas-rz/rz_linux-cip<br />
** https://github.com/renesas-rz/renesas-u-boot-cip<br />
** https://github.com/renesas-rz/rzg2_flash_writer<br />
** https://github.com/renesas-rz/rzg_trusted-firmware-a<br />
* Information on each '''branch''' is located in the wiki section<br />
** https://github.com/renesas-rz/rz_linux-cip/wiki<br />
** https://github.com/renesas-rz/renesas-u-boot-cip/wiki<br />
** https://github.com/renesas-rz/rzg2_flash_writer/wiki<br />
** https://github.com/renesas-rz/rzg_trusted-firmware-a/wiki</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Debian&diff=2702
RZ-G/RZ-G2 BSP Porting Debian
2024-01-09T06:51:34Z
<p>Eiclg: </p>
<hr />
<div>← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
==SoC: All==<br />
==Specification==<br />
This guide describes how to make Debian rootfs to work on RZ/G2L serial products.<br />
<br />
'''Target Debian OS Version:''' bullseye11.0<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
==Debian Filesystem Building==<br />
<br />
===Install QEMU===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''<code>sudo apt-get install qemu qemu-user-static</code>''' <br />
<br />
===Download Required Files===<br />
'''<code>sudo apt-get install binfmt-support debootstrap</code>'''<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Download debian package&emsp;<br />
|-<br />
|$ sudo su - root<br />
<br />
<nowiki>#</nowiki> mkdir ./debian<br />
<br />
<nowiki>#</nowiki> cd ./debian<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign bullseye root <nowiki>http://deb.debian.org/debian/</nowiki><br />
<br />
<nowiki>###</nowiki> Notes: If you want to build Debian 10, you can use below command<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign buster root <nowiki>http://deb.debian.org/debian/</nowiki><br />
|}This step requires network connection, if failed, please try more times.<br />
<br />
If this step is successful, you can see below messages<br />
<br />
[[File:debian package download.png|frameless|Debian package download]]<br />
<br />
=== Rootfs configuration ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initialize rootfs&emsp;<br />
|-<br />
|# cp /usr/bin/qemu-arm-static ./root/usr/bin<br />
<br />
<nowiki>#</nowiki> DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot root debootstrap/debootstrap --second-stage<br />
|}<br />
If this step is successful, you can see below contents<br />
<br />
[[File:debian init.png|frameless|debian init]]<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Additional Configuration<br />
|-<br />
|# cp -rf /etc/ssl root/etc ###copy certification from ubuntu pc to debian<br />
<br />
<nowiki>#</nowiki> chroot root<br />
<br />
<nowiki>#</nowiki><br />
<br />
<nowiki>#</nowiki> apt-get update<br />
<br />
<nowiki>#</nowiki> apt-get install vim openssh-server<br />
<br />
<nowiki>#</nowiki> apt install net-tools iputils-ping bash bzip2<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
change<br />
<br />
<nowiki>#</nowiki>PermitRootLogin prohibit-password<br />
<br />
to<br />
<br />
PermitRootLogin yes<br />
<br />
<nowiki>#</nowiki> adduser user ### input password according to the hint<br />
<br />
<nowiki>#</nowiki> passwd root ### change root password<br />
<br />
<nowiki>#</nowiki> echo "auto eth0" > /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> echo "iface eth0 inet dhcp" >> /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
<nowiki>#</nowiki> exit<br />
|}<br />
Compress rootfs<br />
{| class="wikitable"<br />
|+<br />
|# cd root<br />
<nowiki>#</nowiki> tar -cjf debian_bullseye_rootfs.tar.bz2 ./*<br />
|}<br />
Use debian_bullseye_rootfs.tar.bz2 to make sd card image (ignore)<br />
<br />
This rootfs should be able to work on any VLP kernel<br />
<br />
[[File:Debian11.png|frameless|Debian11]]</div>
Eiclg
https://renesas.info/w/index.php?title=File:Debian11.png&diff=2701
File:Debian11.png
2024-01-09T06:50:23Z
<p>Eiclg: </p>
<hr />
<div>Debian11</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Debian&diff=2654
RZ-G/RZ-G2 BSP Porting Debian
2024-01-08T09:03:41Z
<p>Eiclg: </p>
<hr />
<div>← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
==SoC: All==<br />
==Specification==<br />
This guide describes how to make Debian rootfs to work on RZ/G2L serial products.<br />
<br />
'''Target Debian OS Version:''' bullseye11.0<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
==Debian Filesystem Building==<br />
<br />
===Install QEMU===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''<code>sudo apt-get install qemu qemu-user-static</code>''' <br />
<br />
===Download Required Files===<br />
'''<code>sudo apt-get install binfmt-support debootstrap</code>'''<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Download debian package&emsp;<br />
|-<br />
|$ sudo su - root<br />
<br />
<nowiki>#</nowiki> mkdir ./debian<br />
<br />
<nowiki>#</nowiki> cd ./debian<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign bullseye root <nowiki>http://deb.debian.org/debian/</nowiki><br />
<br />
<nowiki>###</nowiki> Notes: If you want to build Debian 10, you can use below command<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign buster root <nowiki>http://deb.debian.org/debian/</nowiki><br />
|}This step requires network connection, if failed, please try more times.<br />
<br />
If this step is successful, you can see below messages<br />
<br />
[[File:debian package download.png|frameless|Debian package download]]<br />
<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initialize rootfs&emsp;<br />
|-<br />
|# cp /usr/bin/qemu-arm-static ./root/usr/bin<br />
<br />
<nowiki>#</nowiki> DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot root debootstrap/debootstrap --second-stage<br />
|}<br />
If this step is successful, you can see below contents<br />
<br />
[[File:debian init.png|frameless|debian init]]<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Additional Configuration<br />
|-<br />
|# cp -rf /etc/ssl root/etc ###copy certification from ubuntu pc to debian<br />
<br />
<nowiki>#</nowiki> chroot root<br />
<br />
<nowiki>#</nowiki><br />
<br />
<nowiki>#</nowiki> apt-get update<br />
<br />
<nowiki>#</nowiki> apt-get install vim openssh-server<br />
<br />
<nowiki>#</nowiki> apt install net-tools iputils-ping bash bzip2<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
change<br />
<br />
<nowiki>#</nowiki>PermitRootLogin prohibit-password<br />
<br />
to<br />
<br />
PermitRootLogin yes<br />
<br />
<nowiki>#</nowiki> adduser user ### input password according to the hint<br />
<br />
<nowiki>#</nowiki> passwd root ### change root password<br />
<br />
<nowiki>#</nowiki> echo "auto eth0" > /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> echo "iface eth0 inet dhcp" >> /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
<nowiki>#</nowiki> exit<br />
|}<br />
Compress rootfs<br />
{| class="wikitable"<br />
|+<br />
!# tar -cjf debian_bullseye_rootfs.tar.bz2 ./root/*<br />
|}<br />
Use debian_bullseye_rootfs.tar.bz2 to make sd card image (ignore)<br />
<br />
This rootfs should be able to work on any VLP kernel</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Debian&diff=2653
RZ-G/RZ-G2 BSP Porting Debian
2024-01-08T08:56:34Z
<p>Eiclg: </p>
<hr />
<div>← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
==SoC: All==<br />
==Specification==<br />
This guide describes how to make Debian rootfs to work on RZ/G2L serial products.<br />
<br />
'''Target Debian OS Version:''' bullseye11.0<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
==Debian Filesystem Building==<br />
<br />
===Install QEMU===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''<code>sudo apt-get install qemu qemu-user-static</code>''' <br />
<br />
===Download Required Files===<br />
'''<code>sudo apt-get install binfmt-support debootstrap</code>'''<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Download debian package&emsp;<br />
|-<br />
|$ sudo su - root<br />
<br />
<nowiki>#</nowiki> mkdir ./debian<br />
<br />
<nowiki>#</nowiki> cd ./debian<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign bullseye root <nowiki>http://deb.debian.org/debian/</nowiki><br />
<br />
<nowiki>###</nowiki> Notes: If you want to build Debian 10, you can use below command<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign buster root <nowiki>http://deb.debian.org/debian/</nowiki><br />
|}This step requires network connection, if failed, please try more times.<br />
<br />
If this step is successful, you can see below messages<br />
<br />
[[File:debian package download.png|frameless|Debian package download]]<br />
<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initialize rootfs&emsp;<br />
|-<br />
|# cp /usr/bin/qemu-arm-static ./root/usr/bin<br />
<br />
<nowiki>#</nowiki> DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot root debootstrap/debootstrap --second-stage<br />
|}<br />
If this step is successful, you can see below contents<br />
<br />
[[File:debian init.png|frameless|debian init]]<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Additional Configuration<br />
|-<br />
|# cp -rf /etc/ssl root/etc ###copy certification from ubuntu pc to debian<br />
<br />
<nowiki>#</nowiki> chroot root<br />
<br />
<nowiki>#</nowiki><br />
<br />
<nowiki>#</nowiki> apt-get update<br />
<br />
<nowiki>#</nowiki> apt-get install vim openssh-server<br />
<br />
<nowiki>#</nowiki> apt install net-tools iputils-ping bash bzip2<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
change<br />
<br />
<nowiki>#</nowiki>PermitRootLogin prohibit-password<br />
<br />
to<br />
<br />
PermitRootLogin yes<br />
<br />
<nowiki>#</nowiki> adduser user ### input password according to the hint<br />
<br />
<nowiki>#</nowiki> passwd root ### change root password<br />
<br />
<nowiki>#</nowiki> echo "auto eth0" > /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> echo "iface eth0 inet dhcp" >> /etc/network/interfaces.d/eth0<br />
<br />
<nowiki>#</nowiki> vi /etc/ssh/sshd_config<br />
<br />
<nowiki>#</nowiki> exit<br />
|}</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Debian&diff=2649
RZ-G/RZ-G2 BSP Porting Debian
2024-01-08T08:40:53Z
<p>Eiclg: </p>
<hr />
<div>← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
==SoC: All==<br />
==Specification==<br />
This guide describes how to make Debian rootfs to work on RZ/G2L serial products.<br />
<br />
'''Target Debian OS Version:''' bullseye11.0<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
==Debian Filesystem Building==<br />
<br />
===Install QEMU===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''<code>sudo apt-get install qemu qemu-user-static</code>''' <br />
<br />
===Download Required Files===<br />
'''<code>sudo apt-get install binfmt-support debootstrap</code>'''<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Download debian package&emsp;<br />
|-<br />
|$ sudo su - root<br />
<br />
<nowiki>#</nowiki> mkdir ./debian<br />
<br />
<nowiki>#</nowiki> cd ./debian<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign bullseye root <nowiki>http://deb.debian.org/debian/</nowiki><br />
<br />
<nowiki>###</nowiki> Notes: If you want to build Debian 10, you can use below command<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign buster root <nowiki>http://deb.debian.org/debian/</nowiki><br />
|}This step requires network connection, if failed, please try more times.<br />
<br />
If this step is successful, you can see below messages<br />
<br />
[[File:debian package download.png|frameless|Debian package download]]<br />
<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initialize rootfs&emsp;<br />
|-<br />
|# cp /usr/bin/qemu-arm-static ./root/usr/bin<br />
<br />
<nowiki>#</nowiki> DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot root debootstrap/debootstrap --second-stage<br />
|}<br />
If this step is successful, you can see below contents<br />
<br />
[[File:debian init.png|frameless|debian init]]</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Debian&diff=2648
RZ-G/RZ-G2 BSP Porting Debian
2024-01-08T08:37:08Z
<p>Eiclg: Add new page to describe how to build debian rootfs (not finished)</p>
<hr />
<div>← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
==SoC: All==<br />
==Specification==<br />
This guide describes how to make Debian rootfs to work on RZ/G2L serial products.<br />
<br />
'''Target Debian OS Version:''' bullseye11.0<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
==Debian Filesystem Building==<br />
<br />
===Install QEMU===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''<code>sudo apt-get install qemu qemu-user-static</code>''' <br />
<br />
===Download Required Files===<br />
'''<code>sudo apt-get install binfmt-support debootstrap</code>'''<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Download debian package&emsp;<br />
|-<br />
|$ sudo su - root<br />
<br />
<nowiki>#</nowiki> mkdir ./debian<br />
<br />
<nowiki>#</nowiki> cd ./debian<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign bullseye root <nowiki>http://deb.debian.org/debian/</nowiki><br />
<br />
<nowiki>###</nowiki> Notes: If you want to build Debian 10, you can use below command<br />
<br />
<nowiki>#</nowiki> debootstrap --arch=arm64 --foreign buster root <nowiki>http://deb.debian.org/debian/</nowiki><br />
|}This step requires network connection, if failed, please try more times.<br />
<br />
If this step is successful, you can see below messages<br />
[[File:debian package download.png|thumb|Debian package download]]<br />
<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initialize rootfs&emsp;<br />
|-<br />
|# cp /usr/bin/qemu-arm-static ./root/usr/bin<br />
<br />
<nowiki>#</nowiki> DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot root debootstrap/debootstrap --second-stage<br />
|}<br />
If this step is successful, you can see below contents<br />
[[File:debian init.png|thumb|debian init]]</div>
Eiclg
https://renesas.info/w/index.php?title=File:debian_init.png&diff=2647
File:debian init.png
2024-01-08T08:35:02Z
<p>Eiclg: </p>
<hr />
<div>Initialize debian rootfs</div>
Eiclg
https://renesas.info/w/index.php?title=File:debian_package_download.png&diff=2640
File:debian package download.png
2024-01-08T08:08:09Z
<p>Eiclg: </p>
<hr />
<div>Successfully downloaded debian packages</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting&diff=2335
RZ-G/RZ-G2 BSP Porting
2023-05-25T01:07:00Z
<p>Eiclg: /* Ubuntu */</p>
<hr />
<div>{{DISPLAYTITLE:RZ/G and RZ/V BSP Porting}}<br />
<br />
This page is to highlight important things to consider when porting the Renesas BSP to your own custom board.<br />
<br />
== Overview ==<br />
<br />
There is s a '''RZ/G2 Group Linux BSP Porting Guide''' document posted on Renesas.com.<br />
* https://www.renesas.com/us/en/document/mas/rzg2-group-linux-bsp-porting-guide<br />
This document contains information such as:<br />
* How to add a new build configuration for a new board to a Yocto<br />
* How to add a new build configuration for a new board to a u-boot<br />
* Information about configuring pins and GPIO<br />
* Information about Device Tree files for the kernel<br />
* The code references are for the VLP64 v1.0.x releases *(the older Linux-4.19 BSP)<br />
* The code refences are for the RZ/G2H,M,N,E devices.<br />
<br />
<br><br />
<br />
One preliminary point to underline is that you may NOT want to use Yocto at the beginning, rather clone the repositories, modify the code and build it using a cross toolchain.<br />
<br />
The paragraph order in this page is intentional. They represent the steps you normally do when you want to port the Renesas BSP, i.e. you absolutely want to start from [https://github.com/renesas-rz/rzg2_flash_writer Flash Writer]. When you get your first custom board samples the non-volatile memories are virgin and the first goals is to program them with bootloaders. One of the first thing you need to do is to adjust the DDR configuration to your own. Debugging DDR may be tricky but have it working is a major step toward success. You can test the DDR using some hidden [[RZ-G/RZG hardware#DDR test routines|Flash Writer commands]]. After that you may need to change the SPI configuration. <br />
<br />
Finally you can use Flash Writer to program the bootloaders: [https://github.com/renesas-rz/rzg_trusted-firmware-a Arm Trusted Firmware] (ATF) BL2 (aka IPL, Initial Program Loader), BL31 (Secure Monitor) and [https://github.com/renesas-rz/renesas-u-boot-cip u-boot] (BL33). BL32 is not strictly needed at the beginning, since it is the Trusted OS (optional). Bootloaders can be programmed into QSPI FLASH or eMMC, then of course the boot mode of the SoC shall be adjusted accordingly. ATF may also need to be configured depending on the non-volatile memory type. You may need to program separately (e.g. different files for each BL) or you can have a BL2 file and a FIP (Firmware Image Package) that includes all BL3x. <br />
<br />
You do not normally need to modify many things in ATF and in any case only what is in the "plat/renesas/rz" folder. One of the first things ATF BL2 does is to configure the DDR. You would need to use the same (working) configuration used with Flash Writer, so there should be no surprise here, if the DDR works with Flash Writer then it will work with ATF as well.<br />
<br />
<br />
<br />
[[File:sci-usb boot.png|frameless]]-------------------------------[[File:boot2.png|alt=|682x682px]]<br />
<br />
<br />
<br />
Then ATF loads BL31(image id=3), BL32 (again optionally, image id=4) and BL33 (u-boot, image id=5) from either QSPI or eMMC. Assuming everything goes fine u-boot prompt is finally reachable. The table below summarizes where the different actors in the boot process are '''typically''' stored and executed from.<br />
{| class="wikitable"<br />
!Item<br />
!Stored into<br />
!Executed out of<br />
|-<br />
|Boot ROM<br />
|Internal SOC ROM<br />
|XIP (eXecuted In Place)<br />
|-<br />
|BL2<br />
|QSPI/eMMC boot part0/SD card<br />
|Internal SRAM<br />
|-<br />
|BL31-BL32<br />
|QSPI/eMMC boot part/SD card<br />
|DDR (secured by TrustZone)<br />
|-<br />
|BL33 (u-boot)<br />
|QSPI/eMMC boot part/SD card<br />
|DDR<br />
|-<br />
|Linux kernel<br />
|eMMC/SD card<br />
|DDR<br />
|-<br />
|GNU OS (rootfs)<br />
|eMMC/SD card<br />
|DDR<br />
|}<br />
The next step is to port the [https://github.com/renesas-rz/rz_linux-cip Linux CIP Kernel], by "porting" we mainly mean that the reference board device tree gets modified to reflect the HW available on the custom board.<br />
<br />
Finally you can use Yocto to generate the root file system including all the bits and bobs you need to run your custom application.<br />
<br />
=Flash Writer=<br />
* [[RZ-G/RZ-G2_BSP_Porting_FlashWriter]]<br />
<br />
= Arm Trusted Firmware =<br />
* [[RZ-G/RZ-G2_BSP_Porting_ATF]]<br />
<br />
= u-boot =<br />
* [[RZ-G/RZ-G2_BSP_Porting_uboot]]<br />
<br />
= Linux Kernel =<br />
* [[RZ-G/RZ-G2_BSP_Porting_kernel]]<br />
<br />
=Yocto=<br />
* [[RZ-G/RZ-G2_BSP_Porting_Yocto]]<br />
<br />
= Ubuntu =<br />
<br />
* [[RZ-G/RZ-G2 BSP_Porting_Ubuntu]]<br />
<br />
=Memory Map=<br />
* This section explains how DDR Memory is divided and configured.<br />
* [[RZ-G/RZ-G2_BSP_MemoryMap]]<br />
<br />
=Github Repositories=<br />
* These are the repositories where Renesas publishes the RZ code to.<br />
** https://github.com/renesas-rz/rz_linux-cip<br />
** https://github.com/renesas-rz/renesas-u-boot-cip<br />
** https://github.com/renesas-rz/rzg2_flash_writer<br />
** https://github.com/renesas-rz/rzg_trusted-firmware-a<br />
* Information on each '''branch''' is located in the wiki section<br />
** https://github.com/renesas-rz/rz_linux-cip/wiki<br />
** https://github.com/renesas-rz/renesas-u-boot-cip/wiki<br />
** https://github.com/renesas-rz/rzg2_flash_writer/wiki<br />
** https://github.com/renesas-rz/rzg_trusted-firmware-a/wiki</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2332
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-23T03:06:50Z
<p>Eiclg: /* Port from VLP */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Plesae replace the <'''''<u>name</u>'''''> with your user name<br />
|-<br />
|useradd -s '/bin/bash' -m -G adm,sudo <'''''<u>name</u>'''''> <br />
passwd <'''''<u>name</u>'''''> <br />
<br />
passwd root<br />
<br />
chown -R root:root /bin/su<br />
<br />
chmod u+s /bin/su <br />
|}<br />
==== Configure UART====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|vim /etc/init.d/ttyS0.conf <br />
|-<br />
|start on stopped rc or RUNLEVEL=[12345]<br />
stop on RUNLEVEL [!12345]<br />
<br />
respawn exec /sbin/getty -L 115200 ttyLP0 vt102 <br />
|}<br />
====Exit FileSystem====<br />
exit<br />
./ch-mount.sh -u<br />
<br />
==== packaged FileSystem ====<br />
cd root<br />
tar -cjf rootfs.tar.bz2 ./*<br />
<br />
== Deploy FileSystem to SD Card==<br />
Prepare a SD card with ext4 partition: [[Learning/Linux#Partitioning and Formatting an SD Card]]<br />
<br />
extract ubuntu .bz2 package to SD card<br />
Sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
=== Environment Setup ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|network setup<br />
|-<br />
|<br />
* ifconfig eth0 10.232.162.111 netmask 255.255.255.0 up<br />
<br />
* route add default gw 10.232.162.250<br />
<br />
* echo "nameserver 8.8.8.8" >> /etc/resolv.conf<br />
<br />
* echo "nameserver 8.8.4.4" >> /etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install required packages<br />
|-<br />
|<br />
* sudo apt-get install pkg-config<br />
<br />
* sudo apt install ninja-build cmake git python3-pip kmod<br />
<br />
* sudo apt install libffi-dev libxml2 libxml2-dev graphviz doxygen xsltproc xmlto xdot libxkbcommon-dev libpixman-1-dev libinput-dev<br />
<br />
* sudo apt-get install libcairo-dev glib-2.0 libpango1.0-dev libjpeg-dev libwebp-dev libegl-mesa0 libsystemd-dev libgles2-mesa libgles2-mesa-dev libpam0g-dev libgbm-dev libx11-xcb-dev freerdp2-dev liblcms2-dev libx11-xcb-dev libcolord-dev libxcb-xkb1 libpipewire-0.2-dev libdbus-1-dev libxcb-xkb-dev libdrm-dev<br />
<br />
* sudo pip3 install --user meson -i <nowiki>https://pypi.mirrors.ustc.edu.cn/simple/</nowiki> <br />
|}<br />
<br />
=== Compile and install Wayland ===<br />
Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-1.18.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* export WLD=/usr<br />
<br />
* export LD_LIBRARY_PATH=$WLD/lib/aarch64-linux-gnu<br />
<br />
* export PKG_CONFIG_PATH=$WLD/lib/aarch64-linuxgnu/pkgconfig/:$WLD/share/pkgconfig/<br />
<br />
* export PATH=$WLD/bin:$PATH<br />
<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc<br />
<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ install <br />
|}<br />
<br />
=== Compile and install Wayland-protocol ===<br />
Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-protocols-1.20 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* ./configure -- prefix=$WLD libdir=$WLD/lib/aarch64-linux-gnu<br />
<br />
* sudo make install <br />
|}<br />
<br />
=== Compile and install Weston ===<br />
Copy the weston8.0.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/weston/8.0.0-r0/weston-8.0.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the weston-8.0.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc -Dbackend-drmscreencast-vaapi=false -Dxwayland=false -Dcolor-managementcolord=false -Dremoting=false <br />
|}<br />
If the configuration is correct, it will display below messages<br />
User defined options<br />
libdir : /usr/lib/aarch64-linux-gnu<br />
prefix : /usr<br />
sysconfdir : /etc<br />
backend-drm-screencast-vaapi : false<br />
color-management-colord : false<br />
remoting : false<br />
xwayland : false<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|compile and install<br />
|-<br />
|<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ instal <br />
|}<br />
<br />
==Port GPU Libraries==<br />
Please refer to the StartupGuide.txt document in meta-rz-features/recipes-graphics/mali/files/mali_pkg_eval_vx.x.tar.gz <br />
<br />
=== Migrate GPU drivers ===<br />
Copy the driver mali_kbase..ko from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/smarc_rzg2l-poky-linux/kernel-modulemali/r35-p0/image/lib/modules/5.10.83-cip1-yocto-standard/extra<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gpu .ko on reference board<br />
|-<br />
|<br />
* sudo insmod mali_kbase.ko <br />
|}<br />
<br />
=== Migrate GPU Libraries ===<br />
Copy the library files to SD card.<br />
i.e. meta-rz-features/recipesgraphics/mali/files/mali_pkg_eval_vx.x.tar.gz<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install library to reference board<br />
|-<br />
|<br />
* tar -xf mali_um_r35p0.tar.gz<br />
<br />
* sudo cp -r mali_um/usr/lib/* /usr/lib/aarch64-linux-gnu/<br />
<br />
* sudo cp -r /usr/lib/aarch64-linux-gnu/CL_GLES/mali_wayland/ <br />
<br />
/usr/lib/aarch64-linux-gnu/<br />
<br />
* ln -fs /usr/lib/aarch64-linux-gnu/mali_wayland/libmali.so /usr/lib/aarch64-linux-gnu/libmali.so <br />
|}<br />
<br />
=== Testing ===<br />
<br />
==== Install testing tool ====<br />
sudo apt install glmark2-es2-wayland<br />
<br />
==== Start Weston desktop ====<br />
Only root user can launch weston service, please switch to root user in advance<br />
insmod mali_kbase.ko<br />
weston --tty 1 &<br />
Run glmark2 test<br />
glmark2-es2-wayland --fullscreen<br />
{| class="wikitable"<br />
|+<br />
![[File:glmark1.png|thumb|glmark2 version|336x336px]]<br />
![[File:glmark2.png|thumb|glmark2 result|390x390px]]<br />
|-<br />
! colspan="2" |[[File:glmark2 image.png|thumb|829x829px]]<br />
|}<br />
<br />
==Port codec Librasries==<br />
In this section, we will copy codec related files from original VLP Yocto build.<br />
<br />
i.e. core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2<br />
<br />
Pleaes copy this .bz2 file to Ubuntu SD card and run below instruction on reference board<br />
<br />
unzip core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2 to folder "yocto"<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|copy codec drivers<br />
|-<br />
|<br />
* cd ./yocto<br />
* mkdir /root/modules<br />
* cp lib/modules/5.10.83-cip1-yocto-standard/extra/* /root/modules/ <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|copy gstreamer related lib<br />
|-<br />
|<br />
* cp -rd usr/bin/gst-* /usr/bin/<br />
<br />
* cp -rd usr/lib64/libgst* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/girepository-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libmmngr* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libvspm.so.1* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/libexec/gstreamer-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/share/gstreamer-1.0/ /usr/share/<br />
<br />
* cp -rd usr/share/gst-plugins-base/ /usr/share/<br />
<br />
* cp -rd usr/share/locale/en_GB/LC_MESSAGES/gst* /usr/share/locale/en_GB/LC_MESSAGES/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/libgstomx.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/libgstvspmfilter.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/<br />
<br />
* cp -rd usr/lib64/libomxr_* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libuvcs_* /usr/lib/aarch64-linux-gnu/<br />
<br />
* mkdir /lib64<br />
<br />
* cp -rd /usr/lib/aarch64-linux-gnu/ld-* /lib64/<br />
<br />
* cp etc/xdg/gstomx.conf /etc/xdg/<br />
<br />
* cp etc/gstpbfilter.conf /etc/<br />
<br />
* cp -r etc/omxr/ /etc/ <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|modify omx plugin configuration<br />
|-<br />
|vi /etc/xdg/gstomx.conf <br />
<br />
replace "lib64" as "lib/aarch64-linux-gnu"<br />
[omxh264dec]<br />
type-name=GstOMXH264Dec<br />
core-name=/usr/lib/aarch64-linux-gnu/libomxr_core.so<br />
component-name=OMX.RENESAS.VIDEO.DECODER.H264<br />
·····<br />
[omxh264enc]<br />
type-name=GstOMXH264Enc<br />
core-name=/usr/lib/aarch64-linux-gnu/libomxr_core.so<br />
component-name=OMX.RENESAS.VIDEO.ENCODER.H264<br />
···· <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gstreamer dependency<br />
|-<br />
|apt install gstreamer1.0-libav gstreamer1.0-plugins-bad <br />
|}<br />
<br />
=== Test gstreamer ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|login as root and insmod drivers<br />
|-<br />
|insmod /root/modules/mali_kbase.ko<br />
insmod /root/modules/mmngr.ko<br />
<br />
insmod /root/modules/mmngrbuf.ko<br />
<br />
insmod /root/modules/uvcs_drv.ko<br />
<br />
insmod /root/modules/vspm.ko<br />
<br />
insmod /root/modules/vspm_if.ko <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Specify gstreamer location<br />
|-<br />
|export GST_PLUGIN_SCANNER=/usr/lib/aarch64-linux-gnu/gstreamer-1.0/gst-plugin-scanner<br />
export GST_PLUGIN_PATH=/usr/lib/aarch64-linux-gnu/gstreamer-1.0 <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Launch weston<br />
|-<br />
|weston –tty 1 & <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Play Video<br />
|-<br />
|<br />
* Play video only:<br />
gst-launch-1.0 filesrc location=/root/video/sintel_trailer-720p.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! waylandsink<br />
* Play video & audio<br />
gst-launch-1.0 filesrc location=/root/video/sintel_trailer-720p.mp4 ! qtdemux name=d d. ! queue ! h264parse ! omxh264dec ! waylandsink d. ! queue ! faad ! alsasink device=plughw:0,0<br />
|}<br />
<br />
==Port Qt==<br />
You can port Qt by following 3 methods<br />
<br />
* Port from VLP<br />
* Compile & Install Qt from source<br />
* Install Qt by apt-get<br />
<br />
=== Port from VLP ===<br />
In this section, we will copy Qt5.6.3 related files from original VLP Yocto build.<br />
<br />
i.e. core-image-qt-smarc-rzg2l.tar.bz2 <br />
<br />
Pleaes copy this .bz2 file to Ubuntu SD card and run below instruction on reference board<br />
<br />
unzip core-image-qt-smarc-rzg2l.tar.bz2 to folder "yocto"<br />
<br />
(For other version of Qt, you can modify Yocto meta-qt5\recipes-qt\qt5, please inqury Qt company for higher version QT integration)<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Port Qt lib<br />
|-<br />
|cd yocto<br />
cp -rd usr/share/qt5 /usr/share/<br />
<br />
cp -rd usr/lib64/qt5 /usr/lib/aarch64-linux-gnu/<br />
<br />
cp -rd usr/lib64/libQt* /usr/aarch64-linux-gnu/<br />
<br />
cp -rd usr/lib64/pkgconfig/Qt* /usr/lib/aarch64-linuxgnu/pkgconfig/<br />
<br />
export QT_QPA_PLATFORM=wayland<br />
<br />
export QT_PLUGIN_PATH=/usr/lib/aarch64-linux-gnu/qt5/plugins/ <br />
|}<br />
Start Weston [[RZ-G/RZ-G2 BSP Porting Ubuntu#Start Weston desktop]]<br />
<br />
Then run the Qt example in /usr/share/qt5/examples<br />
<br />
=== Compile from source ===<br />
You can download qt5 source to reference board and compile on board.<br />
<br />
Or cross compile qt5 on PC<br />
<br />
Or compile qt5 in PC QEMU<br />
<br />
Here we compile qt5 on board<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|compile qt5<br />
|-<br />
|download qt5 source code by git (ignore)<br />
mkdir qt5-build<br />
cd qt5-build<br />
make<br />
make install<br />
(rsync to SD) <br />
|}<br />
We suggest to compile the qt5 with [https://github.com/seebe/rzg_stuff/tree/master/build_scripts/qt scrips]<br />
<br />
Notes: About the flags parameter in configure of Qt5. -qpa should be set as wayland or wayland-egl. We didn't support xcomposite-egl option<br />
<br />
=== Install Qt by apt-get ===<br />
apt-get install qt5-default qtwayland5<br />
<br />
Notes: The above installation commands can only run part of Qt functions. If you need more functions, you need to continue installing Qt related packages.<br />
<br />
=== Qt APPs development and testing ===<br />
This section introduce how to develop Qt application on PC.<br />
<br />
==== SDK build and installation ====<br />
bitbake core-image-qt -c populate_sdk<br />
The generated installation file is located at:<br />
<br />
build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-qtaarch64-smarc-rzg2l-toolchain-3.1.14.sh <br />
<br />
Install this SDK to PC, default folder is /opt/poky/3.1.14<br />
<br />
setup SDK runtime environment<br />
source /opt/poky/3.1.14/environment-setup-aarch64-poky-linux <br />
<br />
==== QT creator configuration ====<br />
{| class="wikitable"<br />
|+<br />
!Add Device<br />
![[File:qt-creator-add-device.png|thumb]]<br />
|-<br />
|'''Add new Kit'''<br />
|[[File:qt-creator-add-new-kit.png|thumb]]<br />
|-<br />
|'''Add Qt version'''<br />
|[[File:qt-creator-add-version.png|thumb]]<br />
|-<br />
|'''Add compiler'''<br />
|[[File:Qt-creator-add-compiler.png|thumb]]<br />
|-<br />
|'''Add debuggers'''<br />
|[[File:qt-creator-add-debuggers.png|thumb]]<br />
|-<br />
|'''Select kit to build Qt project'''<br />
|[[File:qt-creator-select-kit.png|thumb]]<br />
|-<br />
|'''example to run qt calculator project'''<br />
|[[File:qt-creator-sample-project.png|thumb]]<br />
|}</div>
Eiclg
https://renesas.info/w/index.php?title=File:qt-creator-sample-project.png&diff=2331
File:qt-creator-sample-project.png
2023-05-23T03:06:40Z
<p>Eiclg: </p>
<hr />
<div>qt-creator-sample-project</div>
Eiclg
https://renesas.info/w/index.php?title=File:qt-creator-select-kit.png&diff=2330
File:qt-creator-select-kit.png
2023-05-23T03:05:39Z
<p>Eiclg: </p>
<hr />
<div>qt-creator-select-kit</div>
Eiclg
https://renesas.info/w/index.php?title=File:qt-creator-add-debuggers.png&diff=2329
File:qt-creator-add-debuggers.png
2023-05-23T03:04:04Z
<p>Eiclg: </p>
<hr />
<div>qt-creator-add-debuggers</div>
Eiclg
https://renesas.info/w/index.php?title=File:Qt-creator-add-compiler.png&diff=2328
File:Qt-creator-add-compiler.png
2023-05-23T03:03:14Z
<p>Eiclg: </p>
<hr />
<div>Qt-creator-add-compiler</div>
Eiclg
https://renesas.info/w/index.php?title=File:qt-creator-add-version.png&diff=2327
File:qt-creator-add-version.png
2023-05-23T03:02:24Z
<p>Eiclg: </p>
<hr />
<div>qt-creator-add-version</div>
Eiclg
https://renesas.info/w/index.php?title=File:qt-creator-add-new-kit.png&diff=2326
File:qt-creator-add-new-kit.png
2023-05-23T03:01:45Z
<p>Eiclg: </p>
<hr />
<div>qt-creator-add-new-kit</div>
Eiclg
https://renesas.info/w/index.php?title=File:qt-creator-add-device.png&diff=2325
File:qt-creator-add-device.png
2023-05-23T03:00:07Z
<p>Eiclg: </p>
<hr />
<div>qt-creator-add-device</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2324
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-23T02:40:49Z
<p>Eiclg: /* Test gstreamer */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Plesae replace the <'''''<u>name</u>'''''> with your user name<br />
|-<br />
|useradd -s '/bin/bash' -m -G adm,sudo <'''''<u>name</u>'''''> <br />
passwd <'''''<u>name</u>'''''> <br />
<br />
passwd root<br />
<br />
chown -R root:root /bin/su<br />
<br />
chmod u+s /bin/su <br />
|}<br />
==== Configure UART====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|vim /etc/init.d/ttyS0.conf <br />
|-<br />
|start on stopped rc or RUNLEVEL=[12345]<br />
stop on RUNLEVEL [!12345]<br />
<br />
respawn exec /sbin/getty -L 115200 ttyLP0 vt102 <br />
|}<br />
====Exit FileSystem====<br />
exit<br />
./ch-mount.sh -u<br />
<br />
==== packaged FileSystem ====<br />
cd root<br />
tar -cjf rootfs.tar.bz2 ./*<br />
<br />
== Deploy FileSystem to SD Card==<br />
Prepare a SD card with ext4 partition: [[Learning/Linux#Partitioning and Formatting an SD Card]]<br />
<br />
extract ubuntu .bz2 package to SD card<br />
Sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
=== Environment Setup ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|network setup<br />
|-<br />
|<br />
* ifconfig eth0 10.232.162.111 netmask 255.255.255.0 up<br />
<br />
* route add default gw 10.232.162.250<br />
<br />
* echo "nameserver 8.8.8.8" >> /etc/resolv.conf<br />
<br />
* echo "nameserver 8.8.4.4" >> /etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install required packages<br />
|-<br />
|<br />
* sudo apt-get install pkg-config<br />
<br />
* sudo apt install ninja-build cmake git python3-pip kmod<br />
<br />
* sudo apt install libffi-dev libxml2 libxml2-dev graphviz doxygen xsltproc xmlto xdot libxkbcommon-dev libpixman-1-dev libinput-dev<br />
<br />
* sudo apt-get install libcairo-dev glib-2.0 libpango1.0-dev libjpeg-dev libwebp-dev libegl-mesa0 libsystemd-dev libgles2-mesa libgles2-mesa-dev libpam0g-dev libgbm-dev libx11-xcb-dev freerdp2-dev liblcms2-dev libx11-xcb-dev libcolord-dev libxcb-xkb1 libpipewire-0.2-dev libdbus-1-dev libxcb-xkb-dev libdrm-dev<br />
<br />
* sudo pip3 install --user meson -i <nowiki>https://pypi.mirrors.ustc.edu.cn/simple/</nowiki> <br />
|}<br />
<br />
=== Compile and install Wayland ===<br />
Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-1.18.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* export WLD=/usr<br />
<br />
* export LD_LIBRARY_PATH=$WLD/lib/aarch64-linux-gnu<br />
<br />
* export PKG_CONFIG_PATH=$WLD/lib/aarch64-linuxgnu/pkgconfig/:$WLD/share/pkgconfig/<br />
<br />
* export PATH=$WLD/bin:$PATH<br />
<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc<br />
<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ install <br />
|}<br />
<br />
=== Compile and install Wayland-protocol ===<br />
Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-protocols-1.20 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* ./configure -- prefix=$WLD libdir=$WLD/lib/aarch64-linux-gnu<br />
<br />
* sudo make install <br />
|}<br />
<br />
=== Compile and install Weston ===<br />
Copy the weston8.0.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/weston/8.0.0-r0/weston-8.0.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the weston-8.0.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc -Dbackend-drmscreencast-vaapi=false -Dxwayland=false -Dcolor-managementcolord=false -Dremoting=false <br />
|}<br />
If the configuration is correct, it will display below messages<br />
User defined options<br />
libdir : /usr/lib/aarch64-linux-gnu<br />
prefix : /usr<br />
sysconfdir : /etc<br />
backend-drm-screencast-vaapi : false<br />
color-management-colord : false<br />
remoting : false<br />
xwayland : false<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|compile and install<br />
|-<br />
|<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ instal <br />
|}<br />
<br />
==Port GPU Libraries==<br />
Please refer to the StartupGuide.txt document in meta-rz-features/recipes-graphics/mali/files/mali_pkg_eval_vx.x.tar.gz <br />
<br />
=== Migrate GPU drivers ===<br />
Copy the driver mali_kbase..ko from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/smarc_rzg2l-poky-linux/kernel-modulemali/r35-p0/image/lib/modules/5.10.83-cip1-yocto-standard/extra<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gpu .ko on reference board<br />
|-<br />
|<br />
* sudo insmod mali_kbase.ko <br />
|}<br />
<br />
=== Migrate GPU Libraries ===<br />
Copy the library files to SD card.<br />
i.e. meta-rz-features/recipesgraphics/mali/files/mali_pkg_eval_vx.x.tar.gz<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install library to reference board<br />
|-<br />
|<br />
* tar -xf mali_um_r35p0.tar.gz<br />
<br />
* sudo cp -r mali_um/usr/lib/* /usr/lib/aarch64-linux-gnu/<br />
<br />
* sudo cp -r /usr/lib/aarch64-linux-gnu/CL_GLES/mali_wayland/ <br />
<br />
/usr/lib/aarch64-linux-gnu/<br />
<br />
* ln -fs /usr/lib/aarch64-linux-gnu/mali_wayland/libmali.so /usr/lib/aarch64-linux-gnu/libmali.so <br />
|}<br />
<br />
=== Testing ===<br />
<br />
==== Install testing tool ====<br />
sudo apt install glmark2-es2-wayland<br />
<br />
==== Start Weston desktop ====<br />
Only root user can launch weston service, please switch to root user in advance<br />
insmod mali_kbase.ko<br />
weston --tty 1 &<br />
Run glmark2 test<br />
glmark2-es2-wayland --fullscreen<br />
{| class="wikitable"<br />
|+<br />
![[File:glmark1.png|thumb|glmark2 version|336x336px]]<br />
![[File:glmark2.png|thumb|glmark2 result|390x390px]]<br />
|-<br />
! colspan="2" |[[File:glmark2 image.png|thumb|829x829px]]<br />
|}<br />
<br />
==Port codec Librasries==<br />
In this section, we will copy codec related files from original VLP Yocto build.<br />
<br />
i.e. core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2<br />
<br />
Pleaes copy this .bz2 file to Ubuntu SD card and run below instruction on reference board<br />
<br />
unzip core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2 to folder "yocto"<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|copy codec drivers<br />
|-<br />
|<br />
* cd ./yocto<br />
* mkdir /root/modules<br />
* cp lib/modules/5.10.83-cip1-yocto-standard/extra/* /root/modules/ <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|copy gstreamer related lib<br />
|-<br />
|<br />
* cp -rd usr/bin/gst-* /usr/bin/<br />
<br />
* cp -rd usr/lib64/libgst* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/girepository-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libmmngr* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libvspm.so.1* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/libexec/gstreamer-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/share/gstreamer-1.0/ /usr/share/<br />
<br />
* cp -rd usr/share/gst-plugins-base/ /usr/share/<br />
<br />
* cp -rd usr/share/locale/en_GB/LC_MESSAGES/gst* /usr/share/locale/en_GB/LC_MESSAGES/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/libgstomx.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/libgstvspmfilter.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/<br />
<br />
* cp -rd usr/lib64/libomxr_* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libuvcs_* /usr/lib/aarch64-linux-gnu/<br />
<br />
* mkdir /lib64<br />
<br />
* cp -rd /usr/lib/aarch64-linux-gnu/ld-* /lib64/<br />
<br />
* cp etc/xdg/gstomx.conf /etc/xdg/<br />
<br />
* cp etc/gstpbfilter.conf /etc/<br />
<br />
* cp -r etc/omxr/ /etc/ <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|modify omx plugin configuration<br />
|-<br />
|vi /etc/xdg/gstomx.conf <br />
<br />
replace "lib64" as "lib/aarch64-linux-gnu"<br />
[omxh264dec]<br />
type-name=GstOMXH264Dec<br />
core-name=/usr/lib/aarch64-linux-gnu/libomxr_core.so<br />
component-name=OMX.RENESAS.VIDEO.DECODER.H264<br />
·····<br />
[omxh264enc]<br />
type-name=GstOMXH264Enc<br />
core-name=/usr/lib/aarch64-linux-gnu/libomxr_core.so<br />
component-name=OMX.RENESAS.VIDEO.ENCODER.H264<br />
···· <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gstreamer dependency<br />
|-<br />
|apt install gstreamer1.0-libav gstreamer1.0-plugins-bad <br />
|}<br />
<br />
=== Test gstreamer ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|login as root and insmod drivers<br />
|-<br />
|insmod /root/modules/mali_kbase.ko<br />
insmod /root/modules/mmngr.ko<br />
<br />
insmod /root/modules/mmngrbuf.ko<br />
<br />
insmod /root/modules/uvcs_drv.ko<br />
<br />
insmod /root/modules/vspm.ko<br />
<br />
insmod /root/modules/vspm_if.ko <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Specify gstreamer location<br />
|-<br />
|export GST_PLUGIN_SCANNER=/usr/lib/aarch64-linux-gnu/gstreamer-1.0/gst-plugin-scanner<br />
export GST_PLUGIN_PATH=/usr/lib/aarch64-linux-gnu/gstreamer-1.0 <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Launch weston<br />
|-<br />
|weston –tty 1 & <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Play Video<br />
|-<br />
|<br />
* Play video only:<br />
gst-launch-1.0 filesrc location=/root/video/sintel_trailer-720p.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! waylandsink<br />
* Play video & audio<br />
gst-launch-1.0 filesrc location=/root/video/sintel_trailer-720p.mp4 ! qtdemux name=d d. ! queue ! h264parse ! omxh264dec ! waylandsink d. ! queue ! faad ! alsasink device=plughw:0,0<br />
|}<br />
<br />
==Port Qt==<br />
You can port Qt by following 3 methods<br />
<br />
* Port from VLP<br />
* Compile & Install Qt from source<br />
* Install Qt by apt-get<br />
<br />
=== Port from VLP ===<br />
In this section, we will copy Qt5.6.3 related files from original VLP Yocto build.<br />
<br />
i.e. core-image-qt-smarc-rzg2l.tar.bz2 <br />
<br />
Pleaes copy this .bz2 file to Ubuntu SD card and run below instruction on reference board<br />
<br />
unzip core-image-qt-smarc-rzg2l.tar.bz2 to folder "yocto"<br />
<br />
(For other version of Qt, you can modify Yocto meta-qt5\recipes-qt\qt5, please inqury Qt company for higher version QT integration)<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Port Qt lib<br />
|-<br />
|cd yocto<br />
cp -rd usr/share/qt5 /usr/share/<br />
<br />
cp -rd usr/lib64/qt5 /usr/lib/aarch64-linux-gnu/<br />
<br />
cp -rd usr/lib64/libQt* /usr/aarch64-linux-gnu/<br />
<br />
cp -rd usr/lib64/pkgconfig/Qt* /usr/lib/aarch64-linuxgnu/pkgconfig/<br />
<br />
export QT_QPA_PLATFORM=wayland<br />
<br />
export QT_PLUGIN_PATH=/usr/lib/aarch64-linux-gnu/qt5/plugins/ <br />
|}<br />
Refer to</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2321
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-23T01:58:17Z
<p>Eiclg: /* Start Weston desktop */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Plesae replace the <'''''<u>name</u>'''''> with your user name<br />
|-<br />
|useradd -s '/bin/bash' -m -G adm,sudo <'''''<u>name</u>'''''> <br />
passwd <'''''<u>name</u>'''''> <br />
<br />
passwd root<br />
<br />
chown -R root:root /bin/su<br />
<br />
chmod u+s /bin/su <br />
|}<br />
==== Configure UART====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|vim /etc/init.d/ttyS0.conf <br />
|-<br />
|start on stopped rc or RUNLEVEL=[12345]<br />
stop on RUNLEVEL [!12345]<br />
<br />
respawn exec /sbin/getty -L 115200 ttyLP0 vt102 <br />
|}<br />
====Exit FileSystem====<br />
exit<br />
./ch-mount.sh -u<br />
<br />
==== packaged FileSystem ====<br />
cd root<br />
tar -cjf rootfs.tar.bz2 ./*<br />
<br />
== Deploy FileSystem to SD Card==<br />
Prepare a SD card with ext4 partition: [[Learning/Linux#Partitioning and Formatting an SD Card]]<br />
<br />
extract ubuntu .bz2 package to SD card<br />
Sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
=== Environment Setup ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|network setup<br />
|-<br />
|<br />
* ifconfig eth0 10.232.162.111 netmask 255.255.255.0 up<br />
<br />
* route add default gw 10.232.162.250<br />
<br />
* echo "nameserver 8.8.8.8" >> /etc/resolv.conf<br />
<br />
* echo "nameserver 8.8.4.4" >> /etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install required packages<br />
|-<br />
|<br />
* sudo apt-get install pkg-config<br />
<br />
* sudo apt install ninja-build cmake git python3-pip kmod<br />
<br />
* sudo apt install libffi-dev libxml2 libxml2-dev graphviz doxygen xsltproc xmlto xdot libxkbcommon-dev libpixman-1-dev libinput-dev<br />
<br />
* sudo apt-get install libcairo-dev glib-2.0 libpango1.0-dev libjpeg-dev libwebp-dev libegl-mesa0 libsystemd-dev libgles2-mesa libgles2-mesa-dev libpam0g-dev libgbm-dev libx11-xcb-dev freerdp2-dev liblcms2-dev libx11-xcb-dev libcolord-dev libxcb-xkb1 libpipewire-0.2-dev libdbus-1-dev libxcb-xkb-dev libdrm-dev<br />
<br />
* sudo pip3 install --user meson -i <nowiki>https://pypi.mirrors.ustc.edu.cn/simple/</nowiki> <br />
|}<br />
<br />
=== Compile and install Wayland ===<br />
Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-1.18.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* export WLD=/usr<br />
<br />
* export LD_LIBRARY_PATH=$WLD/lib/aarch64-linux-gnu<br />
<br />
* export PKG_CONFIG_PATH=$WLD/lib/aarch64-linuxgnu/pkgconfig/:$WLD/share/pkgconfig/<br />
<br />
* export PATH=$WLD/bin:$PATH<br />
<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc<br />
<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ install <br />
|}<br />
<br />
=== Compile and install Wayland-protocol ===<br />
Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-protocols-1.20 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* ./configure -- prefix=$WLD libdir=$WLD/lib/aarch64-linux-gnu<br />
<br />
* sudo make install <br />
|}<br />
<br />
=== Compile and install Weston ===<br />
Copy the weston8.0.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/weston/8.0.0-r0/weston-8.0.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the weston-8.0.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc -Dbackend-drmscreencast-vaapi=false -Dxwayland=false -Dcolor-managementcolord=false -Dremoting=false <br />
|}<br />
If the configuration is correct, it will display below messages<br />
User defined options<br />
libdir : /usr/lib/aarch64-linux-gnu<br />
prefix : /usr<br />
sysconfdir : /etc<br />
backend-drm-screencast-vaapi : false<br />
color-management-colord : false<br />
remoting : false<br />
xwayland : false<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|compile and install<br />
|-<br />
|<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ instal <br />
|}<br />
<br />
==Port GPU Libraries==<br />
Please refer to the StartupGuide.txt document in meta-rz-features/recipes-graphics/mali/files/mali_pkg_eval_vx.x.tar.gz <br />
<br />
=== Migrate GPU drivers ===<br />
Copy the driver mali_kbase..ko from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/smarc_rzg2l-poky-linux/kernel-modulemali/r35-p0/image/lib/modules/5.10.83-cip1-yocto-standard/extra<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gpu .ko on reference board<br />
|-<br />
|<br />
* sudo insmod mali_kbase.ko <br />
|}<br />
<br />
=== Migrate GPU Libraries ===<br />
Copy the library files to SD card.<br />
i.e. meta-rz-features/recipesgraphics/mali/files/mali_pkg_eval_vx.x.tar.gz<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install library to reference board<br />
|-<br />
|<br />
* tar -xf mali_um_r35p0.tar.gz<br />
<br />
* sudo cp -r mali_um/usr/lib/* /usr/lib/aarch64-linux-gnu/<br />
<br />
* sudo cp -r /usr/lib/aarch64-linux-gnu/CL_GLES/mali_wayland/ <br />
<br />
/usr/lib/aarch64-linux-gnu/<br />
<br />
* ln -fs /usr/lib/aarch64-linux-gnu/mali_wayland/libmali.so /usr/lib/aarch64-linux-gnu/libmali.so <br />
|}<br />
<br />
=== Testing ===<br />
<br />
==== Install testing tool ====<br />
sudo apt install glmark2-es2-wayland<br />
<br />
==== Start Weston desktop ====<br />
Only root user can launch weston service, please switch to root user in advance<br />
insmod mali_kbase.ko<br />
weston --tty 1 &<br />
Run glmark2 test<br />
glmark2-es2-wayland --fullscreen<br />
{| class="wikitable"<br />
|+<br />
![[File:glmark1.png|thumb|glmark2 version|336x336px]]<br />
![[File:glmark2.png|thumb|glmark2 result|390x390px]]<br />
|-<br />
! colspan="2" |[[File:glmark2 image.png|thumb|829x829px]]<br />
|}<br />
<br />
==Port codec Librasries==<br />
In this section, we will copy codec related files from original VLP Yocto build.<br />
<br />
i.e. core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2<br />
<br />
Pleaes copy this .bz2 file to Ubuntu SD card and run below instruction on reference board<br />
<br />
unzip core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2 to folder "yocto"<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|copy codec drivers<br />
|-<br />
|<br />
* cd ./yocto<br />
* mkdir /root/modules<br />
* cp lib/modules/5.10.83-cip1-yocto-standard/extra/* /root/modules/ <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|copy gstreamer related lib<br />
|-<br />
|<br />
* cp -rd usr/bin/gst-* /usr/bin/<br />
<br />
* cp -rd usr/lib64/libgst* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/girepository-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libmmngr* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libvspm.so.1* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/libexec/gstreamer-1.0/ /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/share/gstreamer-1.0/ /usr/share/<br />
<br />
* cp -rd usr/share/gst-plugins-base/ /usr/share/<br />
<br />
* cp -rd usr/share/locale/en_GB/LC_MESSAGES/gst* /usr/share/locale/en_GB/LC_MESSAGES/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/libgstomx.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/<br />
<br />
* cp -rd usr/lib64/gstreamer-1.0/libgstvspmfilter.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/<br />
<br />
* cp -rd usr/lib64/libomxr_* /usr/lib/aarch64-linux-gnu/<br />
<br />
* cp -rd usr/lib64/libuvcs_* /usr/lib/aarch64-linux-gnu/<br />
<br />
* mkdir /lib64<br />
<br />
* cp -rd /usr/lib/aarch64-linux-gnu/ld-* /lib64/<br />
<br />
* cp etc/xdg/gstomx.conf /etc/xdg/<br />
<br />
* cp etc/gstpbfilter.conf /etc/<br />
<br />
* cp -r etc/omxr/ /etc/ <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|modify omx plugin configuration<br />
|-<br />
|vi /etc/xdg/gstomx.conf <br />
<br />
replace "lib64" as "lib/aarch64-linux-gnu"<br />
[omxh264dec]<br />
type-name=GstOMXH264Dec<br />
core-name=/usr/lib/aarch64-linux-gnu/libomxr_core.so<br />
component-name=OMX.RENESAS.VIDEO.DECODER.H264<br />
·····<br />
[omxh264enc]<br />
type-name=GstOMXH264Enc<br />
core-name=/usr/lib/aarch64-linux-gnu/libomxr_core.so<br />
component-name=OMX.RENESAS.VIDEO.ENCODER.H264<br />
···· <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gstreamer dependency<br />
|-<br />
|apt install gstreamer1.0-libav gstreamer1.0-plugins-bad <br />
|}<br />
<br />
=== Test gstreamer ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|login as root and insmod drivers<br />
|-<br />
|insmod /root/modules/mali_kbase.ko<br />
insmod /root/modules/mmngr.ko<br />
<br />
insmod /root/modules/mmngrbuf.ko<br />
<br />
insmod /root/modules/uvcs_drv.ko<br />
<br />
insmod /root/modules/vspm.ko<br />
<br />
insmod /root/modules/vspm_if.ko <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Specify gstreamer location<br />
|-<br />
|export GST_PLUGIN_SCANNER=/usr/lib/aarch64-linux-gnu/gstreamer-1.0/gst-plugin-scanner<br />
export GST_PLUGIN_PATH=/usr/lib/aarch64-linux-gnu/gstreamer-1.0 <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Launch weston<br />
|-<br />
|weston –tty 1 & <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Play Video<br />
|-<br />
|<br />
* Play video only:gst-launch-1.0 filesrc location=/root/video/sintel_trailer-720p.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! waylandsink<br />
<br />
* Play video & audiogst-launch-1.0 filesrc location=/root/video/sintel_trailer-720p.mp4 ! qtdemux name=d d. ! queue ! h264parse ! omxh264dec ! waylandsink d. ! queue ! faad ! alsasink device=plughw:0,0 <br />
|}<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=File:glmark2_image.png&diff=2320
File:glmark2 image.png
2023-05-23T01:39:19Z
<p>Eiclg: </p>
<hr />
<div>result</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2319
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-23T01:37:42Z
<p>Eiclg: /* Start Weston desktop */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Plesae replace the <'''''<u>name</u>'''''> with your user name<br />
|-<br />
|useradd -s '/bin/bash' -m -G adm,sudo <'''''<u>name</u>'''''> <br />
passwd <'''''<u>name</u>'''''> <br />
<br />
passwd root<br />
<br />
chown -R root:root /bin/su<br />
<br />
chmod u+s /bin/su <br />
|}<br />
==== Configure UART====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|vim /etc/init.d/ttyS0.conf <br />
|-<br />
|start on stopped rc or RUNLEVEL=[12345]<br />
stop on RUNLEVEL [!12345]<br />
<br />
respawn exec /sbin/getty -L 115200 ttyLP0 vt102 <br />
|}<br />
====Exit FileSystem====<br />
exit<br />
./ch-mount.sh -u<br />
<br />
==== packaged FileSystem ====<br />
cd root<br />
tar -cjf rootfs.tar.bz2 ./*<br />
<br />
== Deploy FileSystem to SD Card==<br />
Prepare a SD card with ext4 partition: [[Learning/Linux#Partitioning and Formatting an SD Card]]<br />
<br />
extract ubuntu .bz2 package to SD card<br />
Sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
=== Environment Setup ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|network setup<br />
|-<br />
|<br />
* ifconfig eth0 10.232.162.111 netmask 255.255.255.0 up<br />
<br />
* route add default gw 10.232.162.250<br />
<br />
* echo "nameserver 8.8.8.8" >> /etc/resolv.conf<br />
<br />
* echo "nameserver 8.8.4.4" >> /etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install required packages<br />
|-<br />
|<br />
* sudo apt-get install pkg-config<br />
<br />
* sudo apt install ninja-build cmake git python3-pip kmod<br />
<br />
* sudo apt install libffi-dev libxml2 libxml2-dev graphviz doxygen xsltproc xmlto xdot libxkbcommon-dev libpixman-1-dev libinput-dev<br />
<br />
* sudo apt-get install libcairo-dev glib-2.0 libpango1.0-dev libjpeg-dev libwebp-dev libegl-mesa0 libsystemd-dev libgles2-mesa libgles2-mesa-dev libpam0g-dev libgbm-dev libx11-xcb-dev freerdp2-dev liblcms2-dev libx11-xcb-dev libcolord-dev libxcb-xkb1 libpipewire-0.2-dev libdbus-1-dev libxcb-xkb-dev libdrm-dev<br />
<br />
* sudo pip3 install --user meson -i <nowiki>https://pypi.mirrors.ustc.edu.cn/simple/</nowiki> <br />
|}<br />
<br />
=== Compile and install Wayland ===<br />
Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-1.18.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* export WLD=/usr<br />
<br />
* export LD_LIBRARY_PATH=$WLD/lib/aarch64-linux-gnu<br />
<br />
* export PKG_CONFIG_PATH=$WLD/lib/aarch64-linuxgnu/pkgconfig/:$WLD/share/pkgconfig/<br />
<br />
* export PATH=$WLD/bin:$PATH<br />
<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc<br />
<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ install <br />
|}<br />
<br />
=== Compile and install Wayland-protocol ===<br />
Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-protocols-1.20 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* ./configure -- prefix=$WLD libdir=$WLD/lib/aarch64-linux-gnu<br />
<br />
* sudo make install <br />
|}<br />
<br />
=== Compile and install Weston ===<br />
Copy the weston8.0.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/weston/8.0.0-r0/weston-8.0.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the weston-8.0.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc -Dbackend-drmscreencast-vaapi=false -Dxwayland=false -Dcolor-managementcolord=false -Dremoting=false <br />
|}<br />
If the configuration is correct, it will display below messages<br />
User defined options<br />
libdir : /usr/lib/aarch64-linux-gnu<br />
prefix : /usr<br />
sysconfdir : /etc<br />
backend-drm-screencast-vaapi : false<br />
color-management-colord : false<br />
remoting : false<br />
xwayland : false<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|compile and install<br />
|-<br />
|<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ instal <br />
|}<br />
<br />
==Port GPU Libraries==<br />
Please refer to the StartupGuide.txt document in meta-rz-features/recipes-graphics/mali/files/mali_pkg_eval_vx.x.tar.gz <br />
<br />
=== Migrate GPU drivers ===<br />
Copy the driver mali_kbase..ko from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/smarc_rzg2l-poky-linux/kernel-modulemali/r35-p0/image/lib/modules/5.10.83-cip1-yocto-standard/extra<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gpu .ko on reference board<br />
|-<br />
|<br />
* sudo insmod mali_kbase.ko <br />
|}<br />
<br />
=== Migrate GPU Libraries ===<br />
Copy the library files to SD card.<br />
i.e. meta-rz-features/recipesgraphics/mali/files/mali_pkg_eval_vx.x.tar.gz<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install library to reference board<br />
|-<br />
|<br />
* tar -xf mali_um_r35p0.tar.gz<br />
<br />
* sudo cp -r mali_um/usr/lib/* /usr/lib/aarch64-linux-gnu/<br />
<br />
* sudo cp -r /usr/lib/aarch64-linux-gnu/CL_GLES/mali_wayland/ <br />
<br />
/usr/lib/aarch64-linux-gnu/<br />
<br />
* ln -fs /usr/lib/aarch64-linux-gnu/mali_wayland/libmali.so /usr/lib/aarch64-linux-gnu/libmali.so <br />
|}<br />
<br />
=== Testing ===<br />
<br />
==== Install testing tool ====<br />
sudo apt install glmark2-es2-wayland<br />
<br />
==== Start Weston desktop ====<br />
Only root user can launch weston service, please switch to root user in advance<br />
insmod mali_kbase.ko<br />
weston --tty 1 &<br />
Run glmark2 test<br />
glmark2-es2-wayland --fullscreen<br />
{| class="wikitable"<br />
|+<br />
![[File:glmark1.png|thumb|glmark2 version]]<br />
![[File:glmark2.png|thumb|glmark2 result]]<br />
|}<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Port codec Librasries==<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2318
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-23T01:35:31Z
<p>Eiclg: /* Migrate GPU Libraries */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Plesae replace the <'''''<u>name</u>'''''> with your user name<br />
|-<br />
|useradd -s '/bin/bash' -m -G adm,sudo <'''''<u>name</u>'''''> <br />
passwd <'''''<u>name</u>'''''> <br />
<br />
passwd root<br />
<br />
chown -R root:root /bin/su<br />
<br />
chmod u+s /bin/su <br />
|}<br />
==== Configure UART====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|vim /etc/init.d/ttyS0.conf <br />
|-<br />
|start on stopped rc or RUNLEVEL=[12345]<br />
stop on RUNLEVEL [!12345]<br />
<br />
respawn exec /sbin/getty -L 115200 ttyLP0 vt102 <br />
|}<br />
====Exit FileSystem====<br />
exit<br />
./ch-mount.sh -u<br />
<br />
==== packaged FileSystem ====<br />
cd root<br />
tar -cjf rootfs.tar.bz2 ./*<br />
<br />
== Deploy FileSystem to SD Card==<br />
Prepare a SD card with ext4 partition: [[Learning/Linux#Partitioning and Formatting an SD Card]]<br />
<br />
extract ubuntu .bz2 package to SD card<br />
Sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
=== Environment Setup ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|network setup<br />
|-<br />
|<br />
* ifconfig eth0 10.232.162.111 netmask 255.255.255.0 up<br />
<br />
* route add default gw 10.232.162.250<br />
<br />
* echo "nameserver 8.8.8.8" >> /etc/resolv.conf<br />
<br />
* echo "nameserver 8.8.4.4" >> /etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install required packages<br />
|-<br />
|<br />
* sudo apt-get install pkg-config<br />
<br />
* sudo apt install ninja-build cmake git python3-pip kmod<br />
<br />
* sudo apt install libffi-dev libxml2 libxml2-dev graphviz doxygen xsltproc xmlto xdot libxkbcommon-dev libpixman-1-dev libinput-dev<br />
<br />
* sudo apt-get install libcairo-dev glib-2.0 libpango1.0-dev libjpeg-dev libwebp-dev libegl-mesa0 libsystemd-dev libgles2-mesa libgles2-mesa-dev libpam0g-dev libgbm-dev libx11-xcb-dev freerdp2-dev liblcms2-dev libx11-xcb-dev libcolord-dev libxcb-xkb1 libpipewire-0.2-dev libdbus-1-dev libxcb-xkb-dev libdrm-dev<br />
<br />
* sudo pip3 install --user meson -i <nowiki>https://pypi.mirrors.ustc.edu.cn/simple/</nowiki> <br />
|}<br />
<br />
=== Compile and install Wayland ===<br />
Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-1.18.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* export WLD=/usr<br />
<br />
* export LD_LIBRARY_PATH=$WLD/lib/aarch64-linux-gnu<br />
<br />
* export PKG_CONFIG_PATH=$WLD/lib/aarch64-linuxgnu/pkgconfig/:$WLD/share/pkgconfig/<br />
<br />
* export PATH=$WLD/bin:$PATH<br />
<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc<br />
<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ install <br />
|}<br />
<br />
=== Compile and install Wayland-protocol ===<br />
Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-protocols-1.20 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* ./configure -- prefix=$WLD libdir=$WLD/lib/aarch64-linux-gnu<br />
<br />
* sudo make install <br />
|}<br />
<br />
=== Compile and install Weston ===<br />
Copy the weston8.0.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/weston/8.0.0-r0/weston-8.0.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the weston-8.0.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc -Dbackend-drmscreencast-vaapi=false -Dxwayland=false -Dcolor-managementcolord=false -Dremoting=false <br />
|}<br />
If the configuration is correct, it will display below messages<br />
User defined options<br />
libdir : /usr/lib/aarch64-linux-gnu<br />
prefix : /usr<br />
sysconfdir : /etc<br />
backend-drm-screencast-vaapi : false<br />
color-management-colord : false<br />
remoting : false<br />
xwayland : false<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|compile and install<br />
|-<br />
|<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ instal <br />
|}<br />
<br />
==Port GPU Libraries==<br />
Please refer to the StartupGuide.txt document in meta-rz-features/recipes-graphics/mali/files/mali_pkg_eval_vx.x.tar.gz <br />
<br />
=== Migrate GPU drivers ===<br />
Copy the driver mali_kbase..ko from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/smarc_rzg2l-poky-linux/kernel-modulemali/r35-p0/image/lib/modules/5.10.83-cip1-yocto-standard/extra<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gpu .ko on reference board<br />
|-<br />
|<br />
* sudo insmod mali_kbase.ko <br />
|}<br />
<br />
=== Migrate GPU Libraries ===<br />
Copy the library files to SD card.<br />
i.e. meta-rz-features/recipesgraphics/mali/files/mali_pkg_eval_vx.x.tar.gz<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install library to reference board<br />
|-<br />
|<br />
* tar -xf mali_um_r35p0.tar.gz<br />
<br />
* sudo cp -r mali_um/usr/lib/* /usr/lib/aarch64-linux-gnu/<br />
<br />
* sudo cp -r /usr/lib/aarch64-linux-gnu/CL_GLES/mali_wayland/ <br />
<br />
/usr/lib/aarch64-linux-gnu/<br />
<br />
* ln -fs /usr/lib/aarch64-linux-gnu/mali_wayland/libmali.so /usr/lib/aarch64-linux-gnu/libmali.so <br />
|}<br />
<br />
=== Testing ===<br />
<br />
==== Install testing tool ====<br />
sudo apt install glmark2-es2-wayland<br />
<br />
==== Start Weston desktop ====<br />
Only root user can launch weston service, please switch to root user in advance<br />
insmod mali_kbase.ko<br />
weston --tty 1 &<br />
Run glmark2 test<br />
glmark2-es2-wayland --fullscreen<br />
[[File:glmark1.png|thumb|glmark2 version]]<br />
<br />
<br />
<br />
[[File:glmark2.png|thumb|glmark2 result]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Port codec Librasries==<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=File:glmark2.png&diff=2317
File:glmark2.png
2023-05-23T01:35:12Z
<p>Eiclg: </p>
<hr />
<div>glmark2 result</div>
Eiclg
https://renesas.info/w/index.php?title=File:glmark1.png&diff=2316
File:glmark1.png
2023-05-23T01:34:03Z
<p>Eiclg: </p>
<hr />
<div>glmark2 version</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2315
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-23T01:16:16Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Plesae replace the <'''''<u>name</u>'''''> with your user name<br />
|-<br />
|useradd -s '/bin/bash' -m -G adm,sudo <'''''<u>name</u>'''''> <br />
passwd <'''''<u>name</u>'''''> <br />
<br />
passwd root<br />
<br />
chown -R root:root /bin/su<br />
<br />
chmod u+s /bin/su <br />
|}<br />
==== Configure UART====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|vim /etc/init.d/ttyS0.conf <br />
|-<br />
|start on stopped rc or RUNLEVEL=[12345]<br />
stop on RUNLEVEL [!12345]<br />
<br />
respawn exec /sbin/getty -L 115200 ttyLP0 vt102 <br />
|}<br />
====Exit FileSystem====<br />
exit<br />
./ch-mount.sh -u<br />
<br />
==== packaged FileSystem ====<br />
cd root<br />
tar -cjf rootfs.tar.bz2 ./*<br />
<br />
== Deploy FileSystem to SD Card==<br />
Prepare a SD card with ext4 partition: [[Learning/Linux#Partitioning and Formatting an SD Card]]<br />
<br />
extract ubuntu .bz2 package to SD card<br />
Sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
=== Environment Setup ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|network setup<br />
|-<br />
|<br />
* ifconfig eth0 10.232.162.111 netmask 255.255.255.0 up<br />
<br />
* route add default gw 10.232.162.250<br />
<br />
* echo "nameserver 8.8.8.8" >> /etc/resolv.conf<br />
<br />
* echo "nameserver 8.8.4.4" >> /etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install required packages<br />
|-<br />
|<br />
* sudo apt-get install pkg-config<br />
<br />
* sudo apt install ninja-build cmake git python3-pip kmod<br />
<br />
* sudo apt install libffi-dev libxml2 libxml2-dev graphviz doxygen xsltproc xmlto xdot libxkbcommon-dev libpixman-1-dev libinput-dev<br />
<br />
* sudo apt-get install libcairo-dev glib-2.0 libpango1.0-dev libjpeg-dev libwebp-dev libegl-mesa0 libsystemd-dev libgles2-mesa libgles2-mesa-dev libpam0g-dev libgbm-dev libx11-xcb-dev freerdp2-dev liblcms2-dev libx11-xcb-dev libcolord-dev libxcb-xkb1 libpipewire-0.2-dev libdbus-1-dev libxcb-xkb-dev libdrm-dev<br />
<br />
* sudo pip3 install --user meson -i <nowiki>https://pypi.mirrors.ustc.edu.cn/simple/</nowiki> <br />
|}<br />
<br />
=== Compile and install Wayland ===<br />
Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-1.18.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* export WLD=/usr<br />
<br />
* export LD_LIBRARY_PATH=$WLD/lib/aarch64-linux-gnu<br />
<br />
* export PKG_CONFIG_PATH=$WLD/lib/aarch64-linuxgnu/pkgconfig/:$WLD/share/pkgconfig/<br />
<br />
* export PATH=$WLD/bin:$PATH<br />
<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc<br />
<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ install <br />
|}<br />
<br />
=== Compile and install Wayland-protocol ===<br />
Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-protocols-1.20 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* ./configure -- prefix=$WLD libdir=$WLD/lib/aarch64-linux-gnu<br />
<br />
* sudo make install <br />
|}<br />
<br />
=== Compile and install Weston ===<br />
Copy the weston8.0.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/weston/8.0.0-r0/weston-8.0.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the weston-8.0.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc -Dbackend-drmscreencast-vaapi=false -Dxwayland=false -Dcolor-managementcolord=false -Dremoting=false <br />
|}<br />
If the configuration is correct, it will display below messages<br />
User defined options<br />
libdir : /usr/lib/aarch64-linux-gnu<br />
prefix : /usr<br />
sysconfdir : /etc<br />
backend-drm-screencast-vaapi : false<br />
color-management-colord : false<br />
remoting : false<br />
xwayland : false<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|compile and install<br />
|-<br />
|<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ instal <br />
|}<br />
<br />
==Port GPU Libraries==<br />
Please refer to the StartupGuide.txt document in meta-rz-features/recipes-graphics/mali/files/mali_pkg_eval_vx.x.tar.gz <br />
<br />
=== Migrate GPU drivers ===<br />
Copy the driver mali_kbase..ko from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/smarc_rzg2l-poky-linux/kernel-modulemali/r35-p0/image/lib/modules/5.10.83-cip1-yocto-standard/extra<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install gpu .ko on reference board<br />
|-<br />
|<br />
* sudo insmod mali_kbase.ko <br />
|}<br />
<br />
=== Migrate GPU Libraries ===<br />
<br />
=== Testing ===<br />
<br />
==Port codec Librasries==<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2314
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-23T01:07:00Z
<p>Eiclg: /* Add users */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Plesae replace the <'''''<u>name</u>'''''> with your user name<br />
|-<br />
|useradd -s '/bin/bash' -m -G adm,sudo <'''''<u>name</u>'''''> <br />
passwd <'''''<u>name</u>'''''> <br />
<br />
passwd root<br />
<br />
chown -R root:root /bin/su<br />
<br />
chmod u+s /bin/su <br />
|}<br />
==== Configure UART====<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|vim /etc/init.d/ttyS0.conf <br />
|-<br />
|start on stopped rc or RUNLEVEL=[12345]<br />
stop on RUNLEVEL [!12345]<br />
<br />
respawn exec /sbin/getty -L 115200 ttyLP0 vt102 <br />
|}<br />
====Exit FileSystem====<br />
exit<br />
./ch-mount.sh -u<br />
<br />
==== packaged FileSystem ====<br />
cd root<br />
tar -cjf rootfs.tar.bz2 ./*<br />
<br />
== Deploy FileSystem to SD Card==<br />
Prepare a SD card with ext4 partition: [[Learning/Linux#Partitioning and Formatting an SD Card]]<br />
<br />
extract ubuntu .bz2 package to SD card<br />
Sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
=== Environment Setup ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|network setup<br />
|-<br />
|<br />
* ifconfig eth0 10.232.162.111 netmask 255.255.255.0 up<br />
<br />
* route add default gw 10.232.162.250<br />
<br />
* echo "nameserver 8.8.8.8" >> /etc/resolv.conf<br />
<br />
* echo "nameserver 8.8.4.4" >> /etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|install required packages<br />
|-<br />
|<br />
* sudo apt-get install pkg-config<br />
<br />
* sudo apt install ninja-build cmake git python3-pip kmod<br />
<br />
* sudo apt install libffi-dev libxml2 libxml2-dev graphviz doxygen xsltproc xmlto xdot libxkbcommon-dev libpixman-1-dev libinput-dev<br />
<br />
* sudo apt-get install libcairo-dev glib-2.0 libpango1.0-dev libjpeg-dev libwebp-dev libegl-mesa0 libsystemd-dev libgles2-mesa libgles2-mesa-dev libpam0g-dev libgbm-dev libx11-xcb-dev freerdp2-dev liblcms2-dev libx11-xcb-dev libcolord-dev libxcb-xkb1 libpipewire-0.2-dev libdbus-1-dev libxcb-xkb-dev libdrm-dev<br />
<br />
* sudo pip3 install --user meson -i <nowiki>https://pypi.mirrors.ustc.edu.cn/simple/</nowiki> <br />
|}<br />
<br />
=== Compile and install Wayland ===<br />
Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-1.18.0 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* export WLD=/usr<br />
<br />
* export LD_LIBRARY_PATH=$WLD/lib/aarch64-linux-gnu<br />
<br />
* export PKG_CONFIG_PATH=$WLD/lib/aarch64-linuxgnu/pkgconfig/:$WLD/share/pkgconfig/<br />
<br />
* export PATH=$WLD/bin:$PATH<br />
<br />
* sudo /root/.local/bin/meson build/ --prefix=$WLD --libdir=$WLD/lib/aarch64-linux-gnu --sysconfdir=/etc<br />
<br />
* sudo ninja -C build/<br />
<br />
* sudo ninja -C build/ install <br />
|}<br />
<br />
=== Compile and install Wayland-protocol ===<br />
Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.<br />
i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Enter the wayland-protocols-1.20 folder on SD card<br />
Run below command on Reference Board<br />
|-<br />
|<br />
* ./configure -- prefix=$WLD libdir=$WLD/lib/aarch64-linux-gnu<br />
<br />
* sudo make install <br />
|}<br />
<br />
==Port GPU Libraries==<br />
<br />
==Port codec Librasries==<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2311
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T08:31:17Z
<p>Eiclg: /* Enter Filesystem */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh<br />
./ch-mount.sh -m root/<br />
chmod -R 777 /tmp<br />
<br />
====Install required software====<br />
apt-get install \<br />
language-pack-en-base \<br />
sudo \<br />
ssh \<br />
net-tools \<br />
network-manager \<br />
iputils-ping \<br />
rsyslog \<br />
bash-completion \<br />
htop \<br />
resolvconf \<br />
dialog \<br />
vim<br />
<br />
====Add users====<br />
<br />
==== Configure UART====<br />
<br />
====Exit FileSystem====<br />
<br />
== Deploy FileSystem to SD Card==<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
==Port GPU Libraries==<br />
<br />
==Port codec Librasries==<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2310
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T08:29:15Z
<p>Eiclg: /* Configure Filesystem */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
chmod +x ch-mount.sh <br />
<br />
./ch-mount.sh -m root/ <br />
<br />
chmod -R 777 /tmp <br />
<br />
====Install required software====<br />
<br />
====Add users====<br />
<br />
==== Configure UART====<br />
<br />
====Exit FileSystem====<br />
<br />
== Deploy FileSystem to SD Card==<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
==Port GPU Libraries==<br />
<br />
==Port codec Librasries==<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2309
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T08:25:04Z
<p>Eiclg: /* Prepare Files */</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
In the following example, please replace "'''''<u>version</u>'''''" as below name as you need<br />
ubuntu-base-20.04.4-base-arm64: 20.04.4<br />
<br />
ubuntu-base-18.04.5-base-arm64: 18.04.5 <br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Initial preparation<br />
|-<br />
|mkdir root <br />
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root <br />
<br />
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ <br />
<br />
cp -b /etc/resolv.conf root/etc/resolv.conf <br />
|}<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Create a new script file<br />
|-<br />
|vim ch-mount.sh <br />
#!/bin/bash<br />
function mnt() {<br />
echo "MOUNTING"<br />
sudo mount -t proc /proc ${2}proc<br />
sudo mount -t sysfs /sys ${2}sys<br />
sudo mount -o bind /dev ${2}dev<br />
sudo chroot ${2}<br />
}<br />
function umnt() {<br />
echo "UNMOUNTING"<br />
sudo umount ${2}proc<br />
sudo umount ${2}sys<br />
sudo umount ${2}dev<br />
}<br />
if [ "$1" == "-m" ] && [ -n "$2" ] ;<br />
then<br />
mnt $1 $2<br />
elif [ "$1" == "-u" ] && [ -n "$2" ];<br />
then<br />
umnt $1 $2<br />
else<br />
echo ""<br />
echo "Either 1'st, 2'nd or both parameters were missing"<br />
echo ""<br />
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)"<br />
echo "2'nd parameter is the full path of rootfs directory(with trailing<br />
'/')"<br />
echo ""<br />
echo "For example: ch-mount -m /media/sdcard/"<br />
echo ""<br />
echo 1st parameter : ${1}<br />
echo 2nd parameter : ${2}<br />
fi<br />
|}<br />
<br />
<br />
===Configure Filesystem ===<br />
<br />
==== Enter Filesystem====<br />
<br />
====Install required software====<br />
<br />
====Add users====<br />
<br />
==== Configure UART====<br />
<br />
====Exit FileSystem====<br />
<br />
== Deploy FileSystem to SD Card==<br />
<br />
==Install Wayland, Wayland-Protocols and Weston==<br />
<br />
==Port GPU Libraries==<br />
<br />
==Port codec Librasries==<br />
<br />
==Port Qt==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2308
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T07:30:05Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|<br />
* Download ubuntu-base-20.04.4-base-arm64<br />
<pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre><br />
<br />
* Download ubuntu-base-18.04.5-base-arm64<br />
<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
<br />
=== Configure Filesystem ===<br />
<br />
==== Enter Filesystem ====<br />
<br />
==== Install required software ====<br />
<br />
==== Add users ====<br />
<br />
==== Configure UART ====<br />
<br />
==== Exit FileSystem ====<br />
<br />
== Deploy FileSystem to SD Card ==<br />
<br />
== Install Wayland, Wayland-Protocols and Weston ==<br />
<br />
== Port GPU Libraries ==<br />
<br />
== Port codec Librasries ==<br />
<br />
== Port Qt ==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2307
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T07:28:05Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
Run below command on Host Ubuntu PC<br />
<br />
'''sudo apt-get install qemu-user-static''' <br />
<br />
=== Download Required Files ===<br />
{| class="mw-collapsible mw-collapsed wikitable" width="50%"<br />
|Select the package to download based on the desired file system &emsp;<br />
|-<br />
|Download ubuntu-base-20.04.4-base-arm64 <pre><br />
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz<br />
</pre>Download ubuntu-base-18.04.5-base-arm64<pre><br />
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz<br />
</pre><br />
|}<br />
=== Prepare Files ===<br />
<br />
=== Configure Filesystem ===<br />
<br />
==== Enter Filesystem ====<br />
<br />
==== Install required software ====<br />
<br />
==== Add users ====<br />
<br />
==== Configure UART ====<br />
<br />
==== Exit FileSystem ====<br />
<br />
== Deploy FileSystem to SD Card ==<br />
<br />
== Install Wayland, Wayland-Protocols and Weston ==<br />
<br />
== Port GPU Libraries ==<br />
<br />
== Port codec Librasries ==<br />
<br />
== Port Qt ==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2306
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T07:04:11Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
== Specification ==<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
== Ubuntu Filesystem Building ==<br />
<br />
=== Install QEMU ===<br />
<br />
=== Download Required Files ===<br />
<br />
=== Prepare Files ===<br />
<br />
=== Configure Filesystem ===<br />
<br />
==== Enter Filesystem ====<br />
<br />
==== Install required software ====<br />
<br />
==== Add users ====<br />
<br />
==== Configure UART ====<br />
<br />
==== Exit FileSystem ====<br />
<br />
== Deploy FileSystem to SD Card ==<br />
<br />
== Install Wayland, Wayland-Protocols and Weston ==<br />
<br />
== Port GPU Libraries ==<br />
<br />
== Port codec Librasries ==<br />
<br />
== Port Qt ==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2305
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T06:48:41Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
= Specification =<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
= Ubuntu Filesystem Building =<br />
<br />
=== Install QEMU ===<br />
<br />
=== Download Required Files ===<br />
<br />
=== Prepare Files ===<br />
<br />
=== Configure Filesystem ===<br />
<br />
==== Enter Filesystem ====<br />
<br />
==== Install required software ====<br />
<br />
==== Add users ====<br />
<br />
==== Configure UART ====<br />
<br />
==== Exit FileSystem ====<br />
<br />
= Deploy FileSystem to SD Card =<br />
<br />
= Install Wayland, Wayland-Protocols and Weston =<br />
<br />
= Port GPU Libraries =<br />
<br />
= Port codec Librasries =<br />
<br />
= Port Qt =</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2304
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T06:42:29Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
= Specification =<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
= Ubuntu Filesystem Building =<br />
<br />
=== Install QEMU ===<br />
<br />
=== Download Required Files ===<br />
<br />
=== Prepare Files ===<br />
<br />
=== Configure Filesystem ===</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2303
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T06:38:04Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
= Specification =<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
= Ubuntu Filesystem Building =<br />
__FORCETOC__</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2302
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T06:35:47Z
<p>Eiclg: </p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==<br />
<br />
= Specification =<br />
'''Target Ubuntu OS Version:''' 20.04, 18.04<br />
<br />
'''Target reference board:''' [[RZ-G/RZ-G2L SMARC|RZ/G2L,/G2LC,/G2UL SMARC]]<br />
<br />
'''Host PC Environment:''' Ubuntu20.04<br />
<br />
= Ubuntu Filesystem Building =</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP_Porting_Ubuntu&diff=2301
RZ-G/RZ-G2 BSP Porting Ubuntu
2023-05-22T06:32:44Z
<p>Eiclg: Created page with " ← Back to RZ-G/RZ-G2_BSP_Porting == SoC: All =="</p>
<hr />
<div><br />
← Back to [[RZ-G/RZ-G2_BSP_Porting]]<br />
<br />
== SoC: All ==</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-Five/RZ-Five_BSP&diff=1369
RZ-Five/RZ-Five BSP
2022-05-24T10:14:08Z
<p>Eiclg: </p>
<hr />
<div>{{DISPLAYTITLE:RZ/Five BSP Information Page}}<br />
<br />
← [[RZ-Five]]<br />
<br />
=Downloads=<br />
==Linux 5.10 BSP for all RZ/Five Devices==<br />
*<font size="+2">'''RZ/Five'''</font><br />
*<font size="+1"> ⭐ [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzfive-risc-v-general-purpose-microprocessors-risc-v-cpu-core-andes-ax45mp-single-10-ghz-2ch-gigabit-ethernet Official RZ/Five(RISC-V) BSP Download Page] </font><br />
*Please Download the individual components required for your MPU.<br />
*Please use the package versions listed table<br />
{| class="wikitable"<br />
|- style="vertical-align: top;"<br />
|<br />
|'''RZ/Five BSP v0.8'''<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/Five Linux Package (Common for all MPU)''' <br> ZIP file containing Yocto BSP and all documentation<br />
*'''Yocto Recipe''' <br> This is the actual BSP provided in a Yocto build package<br />
*'''Release Note for Linux Package''' <br> Build instructions, start with this document<br />
*'''Reference Boards Linux Start-up Guide''' <br> How to program the boot loaders into SPI flash<br />
*'''BSP Component list''' <br> List of each package and version included in the default BSP build<br />
|💾 [https://www.renesas.com/document/sws/rzfive-board-support-package-v08-rtk0ef0126z0000azj-v08zip?language=en&r=1569466 (link)]<br />
|}<br />
<br />
=Writing Bootloader=<br />
In Current BSP0.8 Start-up Guide, there is a mistake in Table4. Address for each file, please use below table<br />
{| class="wikitable"<br />
|+<br />
!File name<br />
!Address to load to RAM<br />
!Address to save to ROM<br />
|-<br />
|spl-smarc-rzfive.srec<br />
|0001_1E00<br />
|00000<br />
|-<br />
|fit-smarc-rzfive.srec<br />
|0000_0000<br />
|20000<br />
|}</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-Five/RZ-Five_BSP&diff=1368
RZ-Five/RZ-Five BSP
2022-05-24T10:13:23Z
<p>Eiclg: </p>
<hr />
<div>{{DISPLAYTITLE:RZ/Five BSP Information Page}}<br />
<br />
← [[RZ-Five]]<br />
<br />
=Downloads=<br />
==Linux 5.10 BSP for all RZ/Five Devices==<br />
*<font size="+2">'''RZ/Five'''</font><br />
*<font size="+1"> ⭐ [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzfive-risc-v-general-purpose-microprocessors-risc-v-cpu-core-andes-ax45mp-single-10-ghz-2ch-gigabit-ethernet Official RZ/Five(RISC-V) BSP Download Page] </font><br />
*Please Download the individual components required for your MPU.<br />
*Please use the package versions listed table<br />
{| class="wikitable"<br />
|- style="vertical-align: top;"<br />
|<br />
|'''RZ/Five BSP v0.8'''<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/Five Linux Package (Common for all MPU)''' <br> ZIP file containing Yocto BSP and all documentation<br />
*'''Yocto Recipe''' <br> This is the actual BSP provided in a Yocto build package<br />
*'''Release Note for Linux Package''' <br> Build instructions, start with this document<br />
*'''Reference Boards Linux Start-up Guide''' <br> How to program the boot loaders into SPI flash<br />
*'''BSP Component list''' <br> List of each package and version included in the default BSP build<br />
|💾 [https://www.renesas.com/document/sws/rzfive-board-support-package-v08-rtk0ef0126z0000azj-v08zip?language=en&r=1569466 (link)]<br />
|}<br />
<br />
=Writing Bootloader=<br />
In Current BSP0.8 Start-up Guide, there is a mistake in Table4. Address for each file, please use below table<br />
{| class="wikitable"<br />
|+<br />
!File name<br />
!Address to load to RAM<br />
!Address to save to ROM<br />
|-<br />
|spl-smarc-rzfive.srec<br />
|0001_1E00<br />
|00000<br />
|-<br />
|fit-smarc-rzfive.srec<br />
|0000_0000<br />
|20000<br />
|}<br />
[[Category:Contents]]</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-Five/RZ-Five_BSP&diff=1367
RZ-Five/RZ-Five BSP
2022-05-24T10:09:31Z
<p>Eiclg: There is a mistake in start up guide, add address table for bsp 0.8</p>
<hr />
<div>{{DISPLAYTITLE:RZ/Five BSP Information Page}}<br />
<br />
← [[RZ-Five]]<br />
<br />
=Downloads=<br />
==Linux 5.10 BSP for all RZ/Five Devices==<br />
*<font size="+2">'''RZ/Five'''</font><br />
*<font size="+1"> ⭐ [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzfive-risc-v-general-purpose-microprocessors-risc-v-cpu-core-andes-ax45mp-single-10-ghz-2ch-gigabit-ethernet Official RZ/Five(RISC-V) BSP Download Page] </font><br />
*Please Download the individual components required for your MPU.<br />
*Please use the package versions listed table<br />
{| class="wikitable"<br />
|- style="vertical-align: top;"<br />
|<br />
|'''RZ/Five BSP v0.8'''<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/Five Linux Package (Common for all MPU)''' <br> ZIP file containing Yocto BSP and all documentation<br />
*'''Yocto Recipe''' <br> This is the actual BSP provided in a Yocto build package<br />
*'''Release Note for Linux Package''' <br> Build instructions, start with this document<br />
*'''Reference Boards Linux Start-up Guide''' <br> How to program the boot loaders into SPI flash<br />
*'''BSP Component list''' <br> List of each package and version included in the default BSP build<br />
|💾 [https://www.renesas.com/document/sws/rzfive-board-support-package-v08-rtk0ef0126z0000azj-v08zip?language=en&r=1569466 (link)]<br />
|}<br />
<br />
=Writing Bootloader=<br />
In Current BSP0.8 Start-up Guide, there is a mistake in Table4. Address for each file, please use below table<br />
{| class="wikitable"<br />
|+<br />
!File name<br />
!Address to load to RAM<br />
!Address to save to ROM<br />
|-<br />
|spl-smarc-rzfive.srec<br />
|0001_1E00<br />
|00000<br />
|-<br />
|fit-smarc-rzfive.srec<br />
|0000_0000<br />
|20000<br />
|}</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2_BSP&diff=790
RZ-G/RZ-G2 BSP
2021-11-18T01:28:00Z
<p>Eiclg: Customer asked when BSP v1.3 can support Multi-OS package. Actually BSP v1.3 use the same Multi-OS pacage as BSP 1.1</p>
<hr />
<div>{{DISPLAYTITLE:RZ/G2 BSP Information Page}}<br />
← [[RZ-G]]<br />
<br />
= Downloads =<br />
* <font size=+2>'''RZ/G2E, RZ/G2N, RZ/G2M, RZ/G2H'''</font><br />
* <font size=+1> [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-cortex-a-mpus/rzg-linux-platform/rzg-marketplace/verified-linux-package Official RZ/G2 BSP Download Page] </font><br />
{| class="wikitable"<br />
|- style="vertical-align: top;"<br />
|<br />
|'''VLP64 v1.0.6'''<br />
|'''VLP64 v1.0.7-RT'''<br />
|'''VLP64 v1.0.8'''<br />
|'''VLP64 v1.0.9-RT'''<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/G2 Linux Package (Complete Download)''' <br> ZIP file containing Yocto BSP and all documentation<br />
|<br />
|<br />
|💾 [https://www.renesas.com/us/en/document/esw/rzg-verified-linux-package-64bit-kernel-v108-rtk0ef0045z0011azj-v108zip?r=1163891 (link)]<br />
|💾 [https://www.renesas.com/us/en/document/swe/rzg-verified-linux-package-64bit-kernel-v109-rt-rtk0ef0045z0011azj-v109rtzip?r=1163946 (link)]<br />
|- style="vertical-align: top;"<br />
|📦 '''Yocto Recipe''' <br> This is the actual BSP provided in a Yocto build package<br />
|💾 [https://www.renesas.com/document/esw/yocto-recipe-packages-vlp64-v106?language=en (link)]<br />
|💾 [https://www.renesas.com/document/esw/yocto-recipe-packages-vlp64-v107-rt-rzg2bspevav107rttargz?language=en (link)]<br />
| <center>⬆</center><br />
| <center>⬆</center><br />
|- style="vertical-align: top;"<br />
|📦 '''Release Note for Linux Package''' <br> Build instructions, start with this document<br />
|📄 [https://www.renesas.com/us/en/document/rln/release-note-rzg-verified-linux-package-64bit-kernel-v106?language=en (link)]<br />
|📄 [https://www.renesas.com/document/rln/release-note-rzg-verified-linux-package-64bit-kernel-v107-rt?language=en (link)]<br />
| <center>⬆</center><br />
| <center>⬆</center><br />
|- style="vertical-align: top;"<br />
|📦 '''Reference Boards Linux Start-up Guide''' <br> How to program the boot loaders into SPI flash<br />
|📄 [https://www.renesas.com/eu/en/document/rln/rzg2-reference-boards-linux-start-guide-0?language=en (link)]<br />
|📄 [https://www.renesas.com/document/rln/rzg2-reference-boards-start-guide-1?language=en (link)]<br />
| <center>⬆</center><br />
| <center>⬆</center><br />
|- style="vertical-align: top;"<br />
|📦 '''Release Note for HTML5 Linux Package''' <br> Building the HTML5 browser using the BSP requires a different set of instructions<br />
|📄 [https://www.renesas.com/eu/en/document/rln/rzg-verified-linux-package-64bit-kernel-v106-release-note-html5?language=en (link)]<br />
|📄 [https://www.renesas.com/document/rln/rzg-verified-linux-package-64bit-kernel-v107-rt-release-note-html5?language=en (link)]<br />
| <center>⬆</center><br />
| <center>⬆</center><br />
|- style="vertical-align: top;"<br />
|📦 '''BSP Component list''' <br> List of each package and version included in the default BSP build<br />
|📄 [https://www.renesas.com/eu/en/document/rln/rzg-verified-linux-package-64bit-kernel-v106-component-list?language=en (link)]<br />
|📄 [https://www.renesas.com/document/rln/rzg-verified-linux-package-64bit-kernel-v107-rt-component-list?language=en (link)]<br />
| <center>⬆</center><br />
| <center>⬆</center><br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/G2 Group BSP Manual Set''' <br> Detailed information about Device Drivers and Device Tree Settings<br />
|📄 [https://www.renesas.com/eu/en/document/rzg2-group-bsp-manual-set?language=en (link)]<br />
|📄 [https://www.renesas.com/eu/en/document/rzg2-group-bsp-manual-set?language=en (link)]<br />
|📄 [https://www.renesas.com/eu/en/document/rzg2-group-bsp-manual-set?language=en (link)]<br />
|📄 [https://www.renesas.com/eu/en/document/rzg2-group-bsp-manual-set?language=en (link)]<br />
|}<br />
<br />
<br><br />
<br />
* <font size=+2>'''RZ/G2L'''</font><br />
* <font size=+1> [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip Official RZ/G2L BSP Download Page] </font><br />
{| class="wikitable"<br />
|- style="vertical-align: top;"<br />
|<br />
|'''BSP v1.0'''<br />
|'''BSP v1.1'''<br />
|'''BSP v1.3'''<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/G2L Linux Package''' <br> ● '''Yocto BSP''' <br> ● '''Release Note''' <br> &emsp; ○ Build instructions, start with this document <br> ● '''RZ/G2L Reference Board Start-up Guide''' <br> &emsp; ○ How to program the boot loaders into SPI flash <br> ● '''BSP Component list''' <br> &emsp; ○ List of each package and version included in the default BSP build<br />
|💾 [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip (link)]<br />
|💾 [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip (link)]<br />
|💾 [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip (link)]<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/G2L Mali Graphic Library''' <br> ● Files to be added to the Yocto BSP to enable Graphics<br />
|<br />
| v0.51 <br> 💾 [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)]<br />
| v0.8 <br> 💾 [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)]<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/G2L Video Codec Library''' <br> ● Files to be added to the Yocto BSP to enable H.264 Video Encode/Decode<br />
|<br />
|<br />
| v0.51 <br> 💾 [https://www.renesas.com/us/en/document/swe/codec-library-evaluation-version-v051-rzg2l-group-board-support-package?language=en (link)]<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/G2L Group BSP Manual Set''' <br> ● Detailed information about Device Drivers and Device Tree Settings<br />
|<br />
|📄 [https://www.renesas.com/document/oth/rzg2l-group-bsp-manual-set-rev101?language=en (link)]<br />
|📄 [https://www.renesas.com/document/oth/rzg2l-group-bsp-manual-set-rev101?language=en (link)]<br />
|- style="vertical-align: top;"<br />
|📦 '''RZ/G2L Multi-OS Package (CM33)''' <br> ● FreeRTOS for CM33 and OpenAMP comms between A55 and CM33<br />
|<br />
|📄 [https://www.renesas.com/jp/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-multi-os-package (link)]<br />
|📄 [https://www.renesas.com/jp/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-multi-os-package (link)]<br />
|}<br />
<br />
This page discusses topics specific to the content and code released in the BSP.<br />
Information on using the BSP is found on other pages such as [[RZ-G/RZG_yocto]].<br />
<br />
= BSP Differences Between renesas.com Download and Github Version =<br />
<br />
Below are the differences between BSP you download from renesas.com and what is available on public repositories.<br />
<br />
'''Public Repository Clones'''<br><br />
* meta-gplv2/<br />
* meta-linaro/<br />
* meta-openembedded/<br />
* meta-qt5/<br />
* meta-rzg2/<br />
* meta-virtualization/<br />
* poky/<br />
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.<br />
<br />
<br />
'''Example Layers'''<br><br />
* meta-hmi-custom/<br />
* meta-userboard/<br />
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.<br />
<br />
<br />
'''The RZ/G2 BSP'''<br><br />
* meta-rzg2/<br />
Basically, all the customizations and patches are located in the directory 'meta-rzg2'.<br><br />
This directory is a clone of the public repository is located here: https://github.com/renesas-rz/meta-rzg2.<br><br />
There are git tags for BSP version that was release.<br><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<br />
: DL_DIR = "${TOPDIR}/oss_packages"<br />
: BB_NO_NETWORK = "0"<br />
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.<br />
<br />
<br />
'''Non-public Patches'''<br><br />
* extra/<br />
This directory is only in the package downloaded from renesas.com<br><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.<br />
<br />
<br />
'''Video and Multi-media Drivers'''<br><br />
* proprietary/<br />
This directory is only in the package downloaded from renesas.com<br><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.<br />
<br />
= Fix the VLP64 v1.0.5-RT SDK Toolchain =<br />
<br />
When the V1.0.5-RT BSP was released, there was a bug when creating the SDK toolchain.<br />
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.<br />
For example:<br />
<pre><br />
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)<br />
</pre><br />
<br />
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.<br />
There were 2 patches that were added to teh Debian repository that do not work well with ARM64 builds under Yocto.<br />
The fix is to simply remove the code that was added by those those 2 Debian patches.<br />
You can read more about it here: https://github.com/renesas-rz/meta-rzg2/commit/2a6153c80d59<br />
<br />
The Renesas VLP64 v1.0.6 BSP has this fix, but the v1.0.5-RT BSP does not.<br />
<br />
Below are the instructions to fix your existing v1.0.5-RT BSP.<br />
<br />
1. Open a terminal in your v1.05-RT Yocto directory and change into the meta-rzg2 directory.<br />
<pre><br />
$ cd /x/x/x/rzg2_bsp_eva_v105rt<br />
$ cd meta-rzg2<br />
</pre><br />
<br />
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.<br />
<pre><br />
$ wget https://github.com/renesas-rz/meta-rzg2/commit/2a6153c80d59.patch<br />
</pre><br />
<br />
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".<br />
Therefore when we apply the patch, we need to change into the subdirecotry and then strip down the path from the patch file (-p3).<br />
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'.<br />
<pre><br />
$ cd cip-core-buster/cip-core-buster-limited<br />
$ git apply -p3 --whitespace=nowarn ../../2a6153c80d59.patch<br />
$ cd ../..<br />
</pre><br />
<br />
4. Do a complete rebuild of the binutils that is used in the SDK (binutils-cross-canadian-aarch64) and then recreate SDK itself.<br />
<pre><br />
$ bitbake binutils-cross-canadian-aarch64 -c clean<br />
$ bitbake binutils-cross-canadian-aarch64 -c cleansstate<br />
$ bitbake binutils-cross-canadian-aarch64<br />
$ bitbake core-image-qt-sdk -c populate_sdk<br />
</pre><br />
<br />
5. Finally, reinstall the SDK. As always, your SDK is located in build/tmp/deploy/sdk/<br />
<pre><br />
$ sudo ./poky-glibc-x86_64-core-image-qt-sdk-aarch64-toolchain-2.4.3.sh<br />
</pre><br />
<br />
= Fix RZ/G2H eMMC boot for VLP64 v1.0.5-RT and v1.0.6 =<br />
<br />
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.<br />
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.<br />
<br />
Please apply the patch below to your arm-trusted-firmware code base if you are using a RZ/G2H and require booting from eMMC.<br />
<br />
Note: The same patch file can be used for all variations of v1.0.5 and v1.0.6 releases<br />
<pre><br />
$ 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<br />
</pre><br />
<br />
= Fix broken links to video files for VLP64 v1.0.5-RT and v1.0.6 =<br />
<br />
The Renesas.com website was recently changed, and now the links for the sample video movies for the Yocto recipes-demos have become broken.<br />
<br />
A patch to the meta-rzg2 Yocto layer is required to fix the URL.<br />
<br />
Note: The same patch file can be used for all variations of v1.0.5 and v1.0.6 releases.<br />
<br />
<pre><br />
$ rzg2_bsp_eva_v106/meta-rzg2<br />
$ 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<br />
$ patch -p1 -i 0001-recipes-demos*.patch<br />
</pre><br />
<br />
= SPI Flash Driver for BSP 1.0.6 =<br />
<br />
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:<br />
<br />
1. Add kernel patches to BSP<br />
<br />
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<br />
<pre><br />
$ rzg2_bsp_eva_v106/recipes-kernel/linux/linux-renesas/patches<br />
$ mkdir v1.0.6_spi_patch<br />
$ cd v1.0.6_spi_patch #copy patch files here<br />
</pre><br />
1.b) Update patches.scc file: <br />
<br />
Yocto uses .scc file to apply patches located in ~/rzg2_bsp_eva_v106/meta-rzg2/recipes-kernel/linux/linux-renesas/patches.scc.<br />
Get updated .scc file from https://github.com/seebe/rzg_stuff/tree/master/build_scripts/vlp64_patches/BSP-1.0.6-SPI-write/<br />
<pre><br />
$ cd ~/rzg2_bsp_eva_v106/meta-rzg2/recipes-kernel/linux/linux-renesas/<br />
$ wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts/vlp64_patches/BSP-1.0.6-SPI-write/patches.scc<br />
</pre><br />
<br />
2. Configuring kernel using menuconfig<br />
<br />
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:<br />
<pre><br />
$ cd rzg2_bsp_eva_v106<br />
$ source poky/oe-init-build-env<br />
$ bitbake linux-renesas -c kernel_configme -f<br />
$ bitbake linux-renesas -c menuconfig<br />
</pre><br />
Once menuconfig comes up, configure below kernel configuration parameters. <br />
<br />
2.a)Enable Renesa RPC-IF driver:<br />
<pre><br />
.config - Linux/arm64 4.19.140 Kernel Configuration<br />
> Device Drivers > Memory Controller drivers<br />
</pre><br />
2.b)Enable SPI memory (M25P80 ):<br />
<pre><br />
.config - Linux/arm64 4.19.140 Kernel Configuration<br />
> Device Drivers > Memory Technology Device (MTD) support > Self-contained MTD device drivers <br />
</pre><br />
After making your changes, simply exit the tool and save your changes to create an updated version of the .config configuration file<br />
<br />
3. Build the image using updated BSP</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2L_SMARC&diff=755
RZ-G/RZ-G2L SMARC
2021-11-16T02:07:00Z
<p>Eiclg: /* Build Qt in BSP V1.3 */</p>
<hr />
<div>{{DISPLAYTITLE:RZ/G2L SMARC Board by Renesas}}<br />
<img height="200" style="float:right" src=http://linuxgizmos.com/files/renesas_rzg2l_carrier.jpg><br />
← [[RZ-G]]<br />
<br />
<big>📌'''This page is for both the RZ/G2L and RZ/G2LC boards.'''</big><br />
<br />
= General Information =<br />
* '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-3d-graphics-and-video-codec Official RZ/G2L Device Website ]'''<br />
* '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rtk9744l23s01000be-rzg2l-evaluation-board-kit Official RZ/G2L Evaluation Board Kit Website]'''<br />
* '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rtk9744c22s01000be-rzg2lc-evaluation-board-kit Official RZ/G2LC Evaluation Board Kit Website]'''<br />
** Please review the '''Documentation''' and '''Downloads''' sections<br />
* Linux Board Support Package Download<br />
** '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip Official BSP Download Page]'''<br />
** Please refer to the '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip Linux BSP page]''' on this wiki site for guidance on '''what to download'''.<br />
** Please read the '''Release Note''' document for the BSP build instructions.<br />
* Additional Help<br />
** A script for '''programming the boot loaders into SPI Flash''' can be found here: https://github.com/renesas-rz/rzg2_bsp_scripts/tree/master/flash_writer_tool<br />
** Information regarding '''[[RZ-G/RZ-G2L_Flash_Programming | RZ/G2L Programming]]''' of onboard Flash devices with bootloaders and root file systems<br />
* Articles<br />
** [http://linuxgizmos.com/renesas-adds-to-rz-g2-line-with-three-cortex-a55-socs Renesas adds to RZ/G2 line with three Cortex-A55 SoCs]<br />
<br />
= Board Version Identification (RZ/G2L only) =<br />
<br />
There are currently multiple versions of RZ/G2L boards with different components. (There is only 1 version of RZ/G2LC board). Please make note of what board you have. <br><br />
Some boards require different '''software patches''' to be applied before building.<br />
<br />
[[File:RZG2L_Discrete_vs_PMIC.png|thumb|right]]<br />
<br />
'''RZ/G2L Silicon version WS1 vs WS2:'''<br />
* The '''WS1''' Silicon version has the specific date code "2050KC002" written on top of the device<br />
* The '''WS2''' Silicon version has the text "RZ/G2L" written on top of the device<br />
<br />
'''Discrete Power Design vs New Renesas PMIC Solution:'''<br />
* The '''Discrete Power''' design has the words "Renesas" written in white silk screen on the '''top edge''' of the board.<br />
* The '''PMIC Power''' design has the words "Renesas" written in white silk screen in the '''center''' the board. Also, the PMIC has the words Renesas on the top of the device.<br />
<br />
'''Board Combinations:'''<br />
<br />
Here are the only release of these boards:<br />
* 1st Release: WS1 Silicon + Discrete Power<br />
* 2nd Release: WS2 Silicon + Discrete Power<br />
* 3rd Release: WS2 Silicon + PMIC Power<br />
<br />
'''Power Button on PMIC Boards:'''<br />
* On the PMIC boards, please '''press and hold''' the <span style="color:red">red</span> power button for 2 seconds to turn ON and OFF.<br />
* If the "Carrier PWR On" LED does not turn green, please try again and hold the button longer.<br />
<br />
= Getting Started =<br />
'''1. Download the Linux BSP'''<br />
* Download the RZ/G2L Board Support Package from renesas.com.<br />
* Links to all the downloads can be found on '''[https://renesas.info/wiki/RZ-G/RZ-G2_BSP#Downloads this page here]'''. Please refer to the RZ/G2L table.<br />
* ⚠️ You also need to download the "RZ/G2L Mali Graphic Library" package to enable graphs.<br />
<br />
'''2. Build Environment'''<br />
* To build the BSP, you will need a Linux PC running '''Ubuntu 20.04'''. Only this Host OS version was tested.<br />
* You can use a Linux PC (recommended) or a Virtual Machine.<br />
<br />
'''3. Build the BSP'''<br />
* The instructions for building the BSP are located in the '''Release Note''' document that is included in the ZIP file download from [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip renesas.com]. However, the steps below fix some bugs in the instructions.<br />
* ⚠️ There are currently '''3 versions of RZ/G2L boards''' (WS1-Discrete, WS2-Discrete, WS2-PMIC) and there is only 1 version of RZ/G2LC boards. Please review section [[RZ-G/RZ-G2L_SMARC#Board_Version_Identification|Board Version Identification]] above.<br />
* ⚠️ If you are building core-image-weston or core-image-qt, you need to add '''Mali Graphics library''' mentioned in step 1.<br />
* If you have a '''RZ/G2L WS1 board''', please review section 6 in the 'Release Note' of the BSP v1.3 in detail before following the instructions in section 3.<br />
<br />
Please choose the correct board:<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable"<br />
| Simple build instructions for RZ/G2L SMARC BSP v1.3 &nbsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;<br />
|-<br />
|<br />
These instructions are a summary of what is explained in the BSP Release Note, and contain additional information that is not in the Release Notes.<br />
<pre><br />
### Extract package that was downloaded from renesas.com<br />
$ mkdir rzg2l_bsp_v1.3<br />
$ tar -xf rzg2l_bsp_v1.3.tar.gz -C rzg2l_bsp_v1.3<br />
$ cd rzg2l_bsp_v1.3<br />
<br />
### Copy the 'Mali Graphics library' Zip file (RTK0EF0045Z13001ZJ-v0.8_EN.zip) under our BSP directory.<br />
### Then, we will un-zip it and install it.<br />
$ unzip RTK0EF0045Z13001ZJ-v0.8_EN.zip<br />
$ tar zxvf RTK0EF0045Z13001ZJ-v0.8_EN/meta-rz-features.tar.gz<br />
<br />
### (Optional, select users) Install Codec Library Package - Alpha Version<br />
### Copy the file "RTK0EF0045Z15001ZJ-v0.51_EN.zip" under the BSP directory.<br />
$ unzip RTK0EF0045Z15001ZJ-v0.51_EN.zip<br />
$ tar zxvf RTK0EF0045Z15001ZJ-v0.51_EN/meta-rz-features.tar.gz<br />
<br />
### Initialize Yocto Environment<br />
$ source poky/oe-init-build-env<br />
<br />
### Copy prepared configuration files for this board<br />
$ cp ../meta-rzg2/docs/template/conf/smarc-rzg2l/*.conf ./conf/<br />
<br />
### Build<br />
### !!! BSP Bug Fix !!! (please do these commands first)<br />
$ bitbake -c deploy -f trusted-firmware-a<br />
$ bitbake -c deploy -f u-boot<br />
<br />
$ bitbake core-image-minimal # (this is optional, no graphics)<br />
$ bitbake core-image-weston<br />
$ bitbake core-image-minimal -c populate_sdk<br />
</pre><br />
|}<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable"<br />
| Simple build instructions for RZ/G2LC SMARC BSP v1.3 (github update) &nbsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;<br />
|-<br />
|<br />
These instructions are a summary of what is explained in the BSP Release Note, and contain additional information that is not in the Release Notes.<br><br />
The RZ/G2LC was not fully supported at the time of the BSP v1.3 release, so we need to pull the latest code from github.<br />
<pre><br />
### Extract package that was downloaded from renesas.com<br />
$ mkdir rzg2l_bsp_v1.3<br />
$ tar -xf rzg2l_bsp_v1.3.tar.gz -C rzg2l_bsp_v1.3<br />
$ cd rzg2l_bsp_v1.3<br />
<br />
### RZ/G2LC UPDATE<br />
# Download an updated v1.3 BSP from github required for RZ/G2LC support<br />
# We will replace the meta-rzg2 direcotry<br />
$ mv meta-rzg2 meta-rzg2-orig<br />
$ git clone https://github.com/renesas-rz/meta-rzg2 ; cd meta-rzg2 ; git checkout 84dfa722a01e ; cd ..<br />
<br />
### Copy the 'Mali Graphics library' Zip file (RTK0EF0045Z13001ZJ-v0.8_EN.zip) under our BSP directory.<br />
### Then, we will un-zip it and install it.<br />
$ unzip RTK0EF0045Z13001ZJ-v0.8_EN.zip<br />
$ tar zxvf RTK0EF0045Z13001ZJ-v0.8_EN/meta-rz-features.tar.gz<br />
<br />
### (Optional, select users) Install Codec Library Package - Alpha Version<br />
### Copy the file "RTK0EF0045Z15001ZJ-v0.51_EN.zip" under the BSP directory.<br />
$ unzip RTK0EF0045Z15001ZJ-v0.51_EN.zip<br />
$ tar zxvf RTK0EF0045Z15001ZJ-v0.51_EN/meta-rz-features.tar.gz<br />
<br />
### Initialize Yocto Environment<br />
$ source poky/oe-init-build-env<br />
<br />
### Copy prepared configuration files for this board<br />
$ cp ../meta-rzg2/docs/template/conf/smarc-rzg2lc/*.conf ./conf/<br />
<br />
### Build<br />
$ bitbake core-image-minimal # (this is optional, no graphics)<br />
$ bitbake core-image-weston<br />
$ bitbake core-image-minimal -c populate_sdk<br />
</pre><br />
|}<br />
<br />
'''4. Prepare an SD Card'''<br />
* 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.<br />
<br />
* Insert your micro SD card into a '''USB-SD-Card reader''' and then plug into a Linux PC.<br />
<br />
* Use the commands below to download the formatting script and run. Please select your card and choose the default settings.<br />
<br />
<pre><br />
$ wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/usb_sd_partition/usb_sd_partition.sh<br />
$ chmod +x usb_sd_partition.sh<br />
$ ./usb_sd_partition.sh<br />
</pre><br />
* 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'''.<br />
<pre><br />
# Change to the Yocto output directory that contains the files<br />
# Replace "smarc-rzg2l" to "smarc-rzg2lc" where needed<br />
$ cd build/tmp/deploy/images/smarc-rzg2l<br />
<br />
# Copy the Linux kernel and Device Tree to partition 1<br />
$ sudo cp -v Image /media/$USER/RZ_FAT<br />
$ sudo cp -v r9a07g044l2-smarc.dtb /media/$USER/RZ_FAT # RZ/G2L<br />
$ sudo cp -v r9a07g044c2-smarc.dtb /media/$USER/RZ_FAT # RZ/G2LC<br />
<br />
# Copy and expand the Root File System to partition 2<br />
$ sudo tar -xvf core-image-minimal-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext<br />
(or if using graphics)<br />
$ sudo tar -xvf core-image-weston-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext<br />
<br />
# Make sure all files are finished writing before removing the USB card reader from the PC<br />
$ sync<br />
</pre><br />
<br />
* Safely remove your USB card reader by right clicking on the drive icon (either RZ_FAT or RZ_ext) in Ubuntu and selecting "Eject"<br />
<br />
'''5. Power the Board and Connect to the Serial Port '''<br />
* Supply power the board using the '''USB-C connection''' on the carrier board labeled "Power Input"<br />
* 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.<br />
* 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'''.<br />
* 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.<br />
<br />
'''6. Switch settings for the CPU SOM board.'''<br />
* 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/G2L.<br />
* Set the switches on the SOM board to what you want to use.<br />
* ⚠️ 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"<br />
* 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/G2L.<br />
* On the SOM (CPU) board, there is a little switch (SW1) near the SD card socket.<br />
<pre><br />
SOM board uses SD Card socket SOM board uses eMMC Flash<br />
SW1-1 = ON/OFF(JTAG) SW1-1 = ON/OFF(JTAG)<br />
SW1-2 = ON SW1-2 = OFF<br />
+-----+ +-----+<br />
| ON | | ON |<br />
| = = | | = |<br />
| | | = |<br />
| 1 2 | | 1 2 |<br />
+-----+ +-----+<br />
</pre><br />
<br />
'''7-1. Boot the Board using SD Card on Carrier Board (Recommended)'''<br />
* Insert the '''SD card''' into the socket on '''Carrier Board'''.<br />
<pre style="background-color:#FFFFFF; border:0px"><br />
┌─────┬─────┬─────┐<br />
│ │ SOM │ │<br />
│ └─────┘ │<br />
│ Carrier Board │<br />
│ ┌─┐ │<br />
└─────┴─┴─────────┘<br />
↑<br />
SD Card Socket<br />
</pre><br />
* 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.<br />
* At the u-boot prompt ( => ), enter the following commands to boot the board.<br />
* ⚠️ If you get an failure when saving with "saveenv", remove power to the board and try again.<br />
'''RZ/G2L EVK:'''<br />
<pre><br />
# Create command macros and save them:<br />
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 /r9a07g044l2-smarc.dtb'<br />
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'<br />
=> setenv bootcmd 'run sd_boot1 sd_boot2'<br />
=> saveenv<br />
</pre><br />
<br />
'''RZ/G2LC EVK:'''<br />
<pre><br />
# Create command macros and save them:<br />
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 /r9a07g044c2-smarc.dtb'<br />
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'<br />
=> setenv bootcmd 'run sd_boot1 sd_boot2'<br />
=> saveenv<br />
</pre><br />
Reset the board and it will automatically boot<br />
<br />
'''7-2. Boot the Board using eMMC Flash on SOM Board'''<br />
* Set switch SW1-2 = OFF<br />
* The boot loader (u-boot) by default will try to boot from eMMC after 3 seconds.<br />
* Press the '''blue reset button''' and wait.<br />
<br />
'''7-3. Boot the Board using SD Card on SOM Board (eMMC Flash disabled)'''<br />
* Set switch SW1-2 = ON<br />
* Insert the '''SD card''' into the socket on '''SMARC SOM CPU board''' (not the carrier board).<br />
* 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.<br />
* 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)<br />
* At the u-boot prompt ( => ), enter the following commands to boot the board:<br />
<pre><br />
# Manually enter the following commands to boot<br />
=> mmc dev 0 ; fatload mmc 0:1 0x48080000 Image ; fatload mmc 0:1 0x48000000 /r9a07g044l2-smarc.dtb<br />
=> setenv bootargs 'root=/dev/mmcblk0p2 rootwait' ; booti 0x48080000 - 0x48000000<br />
</pre><br />
<br />
<br />
'''8. Linux Login'''<br />
* The login will be "root" (no password is needed)<br />
<br />
= Board Setup Information =<br />
{| class="toccolours" width="100%" style="border-style: none ; text-align: center; background-color:white;"<br />
|-<br />
| [[File:board_configuration.png|frameless]]<br>'''RZ/G2L Evaluation Board Kit Configuration'''<br />
| [[File:smarc_module_board_top.png|frameless|]] <br>'''RZ/G2L SMARC Module Board (TOP)'''<br />
| [[File:smarc_module_board_bottom.png|frameless|]]<br>'''RZ/G2L SMARC Module Board (Bottom)'''<br />
| [[File:smarc_series_carrier_board.png|frameless|]]<br>'''RZ SMARC Series Carrier Board'''<br />
|-<br />
| &nbsp;<br />
|-<br />
| colspan="2" style="text-align:left;" | [[File:power_supply.png|frameless|]]<br>'''Power Supply'''<br>The following power supply environment is used in the evaluation of Renesas:<br>● USB Type-C cable CB-CD23BK (manufactured by Aukey) <br> ● USB PD Charger Anker PowerPort III 65W Pod (manufactured by Anker) <br />
| colspan="2" style="text-align:left;" |[[File:JTAG_connection_ice_debug.png|frameless|]]<br>'''JTAG Cable Connection for ICE Debugging'''<br>When connecting JTAG debugger, please set the DIP SW1 settings as shown.<br>The JTAG connector is 10pin.<br />
|-<br />
|-<br />
| &nbsp;<br />
|-<br />
| [[File:boot_mode.png|frameless|]]<br>'''How to set Boot Modes'''<br />
|}<br />
<br />
= Board Operation Information =<br />
{| class="toccolours" width="100%" style="border-style: none ; text-align: center; background-color:white;"<br />
|-<br />
| style="text-align:left;" | [[File:power_on.png|frameless|]]<br>'''Power ON'''<br>● Connect USB-PD Power Charger to USB Type-C Connector. Then LED1(VBUS PWR On) and LED3(Module PWR On) lights up.<br>● Press SW9 to turn on the power. Then LED4(Carrier PWR On) lights up.<br />
| style="text-align:left;" | [[File:debug_serial.png|frameless|]]<br>'''Debug Serial (Console Output)'''<br>● Debug serial uses CN14. The baud rate is 115200bps.<br>● Since the serial-USB conversion IC is not always powered, the Windows PC will recognize it after the power switch is turned on.<br>● If it is not recognized by your Windows PC, please install the driver�https://www.ftdichip.com/Drivers/VCP.htm<br />
<br />
|}<br />
<br />
= LCD Monitors =<br />
The following LCD monitor were tested with this board.<br />
<br />
* Ingcool 7 inch HDMI LCD 1024x600 Resolution Capacitive Touch Screen<br />
** 🛒 Amazon link : https://www.amazon.com/Ingcool-Resolution-Capacitive-Compatible-Raspberry/dp/B08H8HZRLQ<br />
** If you attach the 'Touch' USB connection on the LCD to the RZ/G2L board, it will both power the LCD board as well as enable touch support.<br />
* ELECROW Raspberry Pi Touchscreen Monitor 5 inch HDMI Screen Display 800x480 Compatible<br />
** 🛒 Amazon link : https://www.amazon.com/Elecrow-Capacitive-interface-Supports-Raspberry/dp/B07FDYXPT7<br />
<br />
= Using the Coral MIPI Camera =<br />
As of the RZ/G2L BSP v1.3 release, the Coral Camera module (OV5645) is supported and enabled.<br />
<br />
'''MIPI CSI Configuration and Resolution Selection'''<br><br />
Before you can use the camera, you must first configure the MIPI CSI module to capture image.<br><br />
MIPI CSI configuration is done by using media-ctl utility from v4l-utils package.<br><br />
The first 2 commands below enable the camera.<br><br />
Below that are commands you use to select the camera resolution you want to capture.<br />
<pre><br />
[ Camera Setup ]<br />
media-ctl -d /dev/media0 -r<br />
media-ctl -d /dev/media0 -l "'rzg2l_csi2 10830400.csi2':1 -> 'CRU output':0 [1]"<br />
<br />
[Select resolution 1280x960 ]<br />
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1280x960 field:none]"<br />
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/1280x960 field:none]"<br />
<br />
[Select resolution 1920x1080 ]<br />
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1920x1080 field:none]"<br />
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/1920x1080 field:none]"<br />
<br />
[Select resolution 2592x1944 ]<br />
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/2592x1944 field:none]"<br />
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/2592x1944 field:none]"<br />
</pre><br />
<br />
'''Capture Images using GStreamer'''<br><br />
This command can be used capture images and display them on the screen in weston.<br><br />
<pre><br />
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! waylandsink<br />
</pre><br />
<br />
= Build Qt in BSP V1.3 =<br />
BSP V1.3 already supports to build core-image-qt. Please follow these instructions to add Qt to the build.<br><br />
Start in the base of the Yocto BSP directory.<br />
<pre><br />
$ git clone https://github.com/meta-qt5/meta-qt5<br />
$ cd meta-qt5<br />
$ git checkout c1b0c9f546289b1592d7a895640de103723a0305<br />
$ cd ..<br />
</pre><br />
<br />
It also comes with Qt demoes. If you want to build the demos, enable QT_DEMO = "1" in conf/local.conf.<br />
* Edit file /build/conf/local.conf<br />
* Remove the comment marker # to set QT_DEMO = "1"<br />
<pre><br />
# Adding qt demonstration to core-image-qt or not<br />
QT_DEMO = "1"<br />
</pre><br />
There is an issue to play the multimedia file by gstreamer or gst-launch-1.0. This can be fixed by editing the file:<br />
<br />
* rzg2l_bsp_v1.3/meta-rzg2/dynamic-layers/qt5-layer/images/core-image-qt.bb<br />
<br />
and adding the following lines to the file:<br />
require recipes-multimedia/image/core-image-weston.inc<br />
Now you can build core-image-qt.<br />
<pre><br />
$ bitbake core-image-qt<br />
</pre><br />
After the build is complete, copy the new root file system to your SD Card<br />
<pre><br />
$ cd build/tmp/deploy/images/smarc-rzg2l<br />
$ sudo tar -xvf core-image-qt-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext<br />
$ cd -<br />
$ sync<br />
</pre><br />
After the board boots, on the Weston desktop you will see icons that will start the demos.<br />
<br />
= Enable eMMC Boot =<br />
eMMC Boot refers to the SoC booting directly from eMMC flash after RESET. This means SPI Flash is not used.<br />
<br />
eMMC boot support was added after BSP v1.3 was released.<br />
<br />
The follow commands (copy/paste) and instructions will allow you to manually download, build and program your board. <br />
<br />
{| class="mw-collapsible mw-collapsed wikitable"<br />
| Instructions &nbsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;<br />
|-<br />
|<br />
<pre><br />
# Download and install a toolchain<br />
# Linaro Toolchain, Version 7.5.0-2019.12<br />
sudo mkdir -p /opt/linaro<br />
cd /opt/linaro<br />
sudo wget https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz<br />
sudo tar xvf gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz<br />
cd - # this command puts you back to your original directory :)<br />
<br />
# Make sure you have all the build utilities you need<br />
sudo apt-get install git make gcc g++ libncurses5-dev libncursesw5-dev python bison flex libssl-dev<br />
<br />
# Create a new Directory<br />
mkdir rzg2l_emmc_boot<br />
cd rzg2l_emmc_boot<br />
<br />
#---------------------------------------------------<br />
# Download FlashWriter<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/rzg2_flash_writer<br />
cd rzg2_flash_writer ; git checkout rz_g2l ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download TrustedFirmware-A<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/rzg_trusted-firmware-a<br />
cd rzg_trusted-firmware-a ; git checkout v2.5/rzg2l ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download mbed<br />
# mbed code is needed to build Trusted Firmware-A<br />
#---------------------------------------------------<br />
git clone git://github.com/ARMmbed/mbedtls.git<br />
cd mbedtls ; git checkout mbedtls-2.16.3 ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download u-boot<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/renesas-u-boot-cip<br />
cd renesas-u-boot-cip ; git checkout v2020.10/rzg2l ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download build scripts<br />
#---------------------------------------------------<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_common.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_flashwriter.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_tfa.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_uboot.sh<br />
chmod +x *.sh<br />
<br />
<br />
#---------------------------------------------------<br />
# Configure build system<br />
#<br />
# - Select "smarc-rzg2l"<br />
# - All output files will be in directory "output_smarc-rzg2l"<br />
#---------------------------------------------------<br />
./build.sh s<br />
<br />
#---------------------------------------------------<br />
# build Flash Writer<br />
#<br />
# - Select toolchain "ARM gcc-arm-10.2-2020.11" that you installed<br />
# - Change "eMMC Flash programming support" from "(default)" to "ENABLE"<br />
# - Select 'Build'<br />
#---------------------------------------------------<br />
./build.sh f<br />
<br />
#---------------------------------------------------<br />
# build u-boot<br />
#---------------------------------------------------<br />
# * Select toolchain "ARM gcc-arm-10.2-2020.11" that you installed<br />
./build.sh u<br />
<br />
#---------------------------------------------------<br />
# build TF-A<br />
#<br />
# - Select toolchain "ARM gcc-arm-10.2-2020.11" that you installed<br />
# - Change "Boot Device" to "eMMC Flash"<br />
# - Select 'Build'<br />
#---------------------------------------------------<br />
./build.sh t<br />
<br />
#---------------------------------------------------<br />
# Download 'Flash Writer Tool'<br />
# - Configure for our output directory <br />
# - Configure for board "smarc-rzg2l"<br />
# - Configure for eMMC Flash boot<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/rzg2_bsp_scripts<br />
cd rzg2_bsp_scripts/flash_writer_tool<br />
echo "CONFIG_FILE=config.ini" > settings.txt<br />
echo "FILES_DIR=../../output_smarc-rzg2l" > config.ini<br />
echo "FLASH=1" >> config.ini<br />
echo "BOARD=smarc-rzg2l" >> config.ini<br />
echo "BOARD_VERSION=PMIC" >> config.ini # NOTE: Only if you have a board with PMIC Power Supply<br />
echo "BOARD_VERSION=DISCRETE" >> config.ini # NOTE: Only if you have a board with Discrete Power Supply<br />
<br />
#---------------------------------------------------<br />
# Run 'Flash Writer Tool'<br />
#---------------------------------------------------<br />
./flash_writer_tool.sh<br />
<br />
Step 1. Select "Show Switches" to show how to put board into SCIF Download mode<br />
Step 2. Select "Download F.W."<br />
Step 3. Select "eMMC boot setup"<br />
Step 4. Select "Program BL2"<br />
Step 5. Select "Program FIP"<br />
Step 6. Select "Show Switches" to show how to put board into eMMC Boot mode<br />
Step 7. Select "<SAVE-and-EXIT>"<br />
<br />
</pre><br />
|}<br />
<br />
= Fix qmake missing in BSP v1.1 and BSP v1.3 =<br />
To created an SDK package that can build Qt applications, you use this command:<br />
<pre><br />
bitbake core-image-qt -c populate_sdk<br />
</pre><br />
However, there is an issue where when the Qt SDK is created, the '''qmake''' utility is not added to the SDK toolchain. This means you will not be able to build Qt user applications.<br />
<br />
This can be fixed by editing the file:<br />
* rzg2l_bsp_v1.3/meta-rzg2/dynamic-layers/qt5-layer/images/core-image-qt.bb<br />
and adding the following lines to the file:<br />
<pre><br />
inherit populate_sdk_qt5<br />
TOOLCHAIN_HOST_TASK_append = " nativesdk-qtwayland-tools " <br />
FEATURE_PACKAGES_tools-sdk += " packagegroup-qt5-toolchain-target kernel-devsrc " <br />
</pre><br />
This will be fixed for BSP v1.4</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-G/RZ-G2L_SMARC&diff=704
RZ-G/RZ-G2L SMARC
2021-11-01T05:08:08Z
<p>Eiclg: /* Enable eMMC Boot */</p>
<hr />
<div>{{DISPLAYTITLE:RZ/G2L SMARC Board by Renesas}}<br />
<img height="200" style="float:right" src=http://linuxgizmos.com/files/renesas_rzg2l_carrier.jpg><br />
← [[RZ-G]]<br />
<br />
= General Information =<br />
* '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-3d-graphics-and-video-codec Official RZ/G2L Device Website ]'''<br />
* '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rtk9744l23s01000be-rzg2l-evaluation-board-kit Official RZ/G2L Evaluation Board Kit Website]'''<br />
* '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rtk9744c22s01000be-rzg2lc-evaluation-board-kit Official RZ/G2LC Evaluation Board Kit Website]'''<br />
** Please review the '''Documentation''' and '''Downloads''' sections<br />
* Linux Board Support Package Download<br />
** '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip Official BSP Download Page]'''<br />
** Please refer to the '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip Linux BSP page]''' on this wiki site for guidance on '''what to download'''.<br />
** Please read the '''Release Note''' document for the BSP build instructions.<br />
* Additional Help<br />
** A script for '''programming the boot loaders into SPI Flash''' can be found here: https://github.com/renesas-rz/rzg2_bsp_scripts/tree/master/flash_writer_tool<br />
** Information regarding '''[[RZ-G/RZ-G2L_Flash_Programming | RZ/G2L Programming]]''' of onboard Flash devices with bootloaders and root file systems<br />
* Articles<br />
** [http://linuxgizmos.com/renesas-adds-to-rz-g2-line-with-three-cortex-a55-socs Renesas adds to RZ/G2 line with three Cortex-A55 SoCs]<br />
<br />
= Board Version Identification =<br />
<br />
There are currently multiple versions of boards with different components. Please make note of what board you have. <br><br />
Some boards require different '''software patches''' to be applied before building.<br />
<br />
[[File:RZG2L_Discrete_vs_PMIC.png|thumb|right]]<br />
<br />
'''Silicon version WS1 vs WS2:'''<br />
* The '''WS1''' Silicon version has the specific date code "2050KC002" written on top of the device<br />
* The '''WS2''' Silicon version has the text "RZ/G2L" written on top of the device<br />
<br />
'''Discrete Power Design vs New Renesas PMIC Solution:'''<br />
* The '''Discrete Power''' design has the words "Renesas" written in white silk screen on the '''top edge''' of the board.<br />
* The '''PMIC Power''' design has the words "Renesas" written in white silk screen in the '''center''' the board. Also, the PMIC has the words Renesas on the top of the device.<br />
<br />
'''Board Combinations:'''<br />
<br />
Here are the only release of these boards:<br />
* 1st Release: WS1 Silicon + Discrete Power<br />
* 2nd Release: WS2 Silicon + Discrete Power<br />
* 3rd Release: WS2 Silicon + PMIC Power<br />
<br />
'''Power Button on PMIC Boards:'''<br />
* On the PMIC boards, please '''press and hold''' the <span style="color:red">red</span> power button for 2 seconds to turn ON and OFF.<br />
* If the "Carrier PWR On" LED does not turn green, please try again and hold the button longer.<br />
<br />
= Getting Started =<br />
'''1. Download the Linux BSP'''<br />
* Download the RZ/G2L Board Support Package from renesas.com.<br />
* Links to all the downloads can be found on '''[https://renesas.info/wiki/RZ-G/RZ-G2_BSP#Downloads this page here]'''. Please refer to the RZ/G2L table.<br />
* ⚠️ You also need to download the "RZ/G2L Mali Graphic Library" package to enable graphs.<br />
<br />
'''2. Build Environment'''<br />
* To build the BSP, you will need a Linux PC running '''Ubuntu 20.04'''. Only this Host OS version was tested.<br />
* You can use a Linux PC (recommended) or a Virtual Machine.<br />
<br />
'''3. Build the BSP'''<br />
* The instructions for building the BSP are located in the '''Release Note''' document that is included in the ZIP file download from [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzg2l-board-support-package-419-cip renesas.com].<br />
* ⚠️ There are currently '''3 versions of boards''' (WS1-Discrete, WS2-Discrete, WS2-PMIC). Please review section [[RZ-G/RZ-G2L_SMARC#Board_Version_Identification|Board Version Identification]] above.<br />
* ⚠️ If you are building core-image-weston, you need to add '''Mali Graphics library''' mentioned in step 1.<br />
<br />
'''BSP v1.3'''<br />
* ⚠️ '''Currently there is a bug in the v 1.3 BSP'''. Please run commands '''bitbake -c deploy -f trusted-firmware-a''' and '''bitbake -c deploy -f u-boot''' before '''bitbake core-image-weston'''<br />
* If you have a '''WS1 board''', please review section 6 in the 'Release Note' of the BSP v1.3 in detail before following the instructions in section 3.<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable"<br />
| Simple build instructions for BSP v1.3 &nbsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;<br />
|-<br />
|<br />
These instructions are a summary of what is explained in the BSP Release Note, and contain additional information that is not in the Release Notes.<br />
<pre><br />
### Extract package that was downloaded from renesas.com<br />
$ mkdir rzg2l_bsp_v1.3<br />
$ tar -xf rzg2l_bsp_v1.3.tar.gz -C rzg2l_bsp_v1.3<br />
$ cd rzg2l_bsp_v1.3<br />
<br />
### Copy the 'Mali Graphics library' Zip file (RTK0EF0045Z13001ZJ-v0.8_EN.zip) under our BSP directory.<br />
### Then, we will un-zip it and install it.<br />
$ unzip RTK0EF0045Z13001ZJ-v0.8_EN.zip<br />
$ tar zxvf RTK0EF0045Z13001ZJ-v0.8_EN/meta-rz-features.tar.gz<br />
<br />
### (Optional, select users) Install Codec Library Package - Alpha Version<br />
### Copy the file "RTK0EF0045Z15001ZJ-v0.51_EN.zip" under the BSP directory.<br />
$ unzip RTK0EF0045Z15001ZJ-v0.51_EN.zip<br />
$ tar zxvf RTK0EF0045Z15001ZJ-v0.51_EN/meta-rz-features.tar.gz<br />
<br />
### Initialize Yocto Environment<br />
$ source poky/oe-init-build-env<br />
<br />
### Copy prepared configuration files for this board<br />
### (choose RZ/G2L or RZ/G2LC)<br />
RZ/G2L: $ cp ../meta-rzg2/docs/template/conf/smarc-rzg2l/*.conf ./conf/<br />
RZ/G2LC: $ cp ../meta-rzg2/docs/template/conf/smarc-rzg2lc/*.conf ./conf/<br />
<br />
### Build<br />
### !!! BSP Bug Fix !!!<br />
$ bitbake -c deploy -f trusted-firmware-a<br />
$ bitbake -c deploy -f u-boot<br />
<br />
$ bitbake core-image-minimal # (this is optional, no graphics)<br />
$ bitbake core-image-weston<br />
$ bitbake core-image-minimal -c populate_sdk<br />
</pre><br />
|}<br />
<br />
'''BSP v1.1'''<br />
* ⚠️ Board Versions: In the 'Release Note' of the BSP v1.1, please review section 6-4 and 6-5 in detail before following the instructions in section 3 (or use the simple copy/paste instruction below).<br />
* ⚠️ An '''"update1"''' was released after the BSP v1.1 package for WS2 boards only. Update1 must be applied to the v1.1 release.<br />
* ⚠️ The '''Simple build instructions''' below are a summary of what is explained in the BSP Release Note and contain additional information that is not in the Release Notes.<br />
<br />
{| class="mw-collapsible mw-collapsed wikitable"<br />
| Simple build instructions for BSP v1.1 &nbsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;<br />
|-<br />
|<br />
These instructions are a summary of what is explained in the BSP Release Note, and contain additional information that is not in the Release Notes.<br />
<pre><br />
### Extract package that was downloaded from renesas.com<br />
$ mkdir rzg2l_bsp_v1.1<br />
$ tar -xf rzg2l_bsp_v1.1.tar.gz -C rzg2l_bsp_v1.1<br />
$ cd rzg2l_bsp_v1.1<br />
<br />
### Copy the 'Mali Graphics library' Zip file (RTK0EF0045Z13001ZJ-v0.51_EN.zip) under our BSP directory.<br />
### Then, we will un-zip it and install it.<br />
$ unzip RTK0EF0045Z13001ZJ-v0.51_EN.zip<br />
$ cd RTK0EF0045Z13001ZJ-v0.51_EN/proprietary<br />
$ ./copy_gfx_mmp.sh ../../meta-rzg2<br />
$ cd ../..<br />
<br />
### (only for WS2-xxx boards) Apply additional patches for BSP v1.1 "update1" that is not included in renesas.com download.<br />
$ cd meta-rzg2<br />
$ wget https://github.com/renesas-rz/meta-rzg2/commit/6edc0e741b37.patch<br />
$ patch -p1 < 6edc0e741b37.patch<br />
$ wget https://github.com/renesas-rz/meta-rzg2/commit/61f6dcb61ac8.patch<br />
$ patch -p1 < 61f6dcb61ac8.patch<br />
$ cd ..<br />
<br />
### (only for WS1-Discrete boards) Apply additional patches for WS1 boards<br />
$ cd meta-rzg2<br />
$ patch -p1 < ../extra/0001-linux-renesas-add-workaround-patch-for-gicv3.patch<br />
$ patch -p1 < ../extra/0002-tf-a-add-rd-wr-64-bit-reg-workaround.patch<br />
$ cd ..<br />
<br />
### (only for WS2-Discrete boards) Apply additional patches for WS2-Discrete boards<br />
$ cd meta-rzg2<br />
$ patch -p1 < ../extra/0001-BSPv1.1-Modify-the-initialization-routine-for-DDR-of.patch<br />
$ cd ..<br />
<br />
### (only for WS2-PMIC boards) Apply additional patches for WS2-PMIC boards<br />
$ cd meta-rzg2<br />
$ wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/boards/rzg2l_smarc/bsp_v1.1_update1_pmic_patch/0001-Support-RZ-G2L-Smarc-PMIC-edition-boards.patch<br />
$ patch -p1 < 0001-Support-RZ-G2L-Smarc-PMIC-edition-boards.patch<br />
$ cd ..<br />
<br />
### (Optional, select users) Install Codec Library Package - Alpha Version<br />
### Copy the file "RTK0EF0045Z15001ZJ_0_4_0.tar.bz2" under the BSP directory.<br />
### Copy the file "meta-rzg2_add_codec_support.patch.tar.gz" under the BSP directory.<br />
$ tar -xvf RTK0EF0045Z15001ZJ_0_4_0.tar.bz2<br />
$ tar -xvf meta-rzg2_add_codec_support.patch.tar.gz<br />
$ cd meta-rzg2<br />
$ patch -p1 -i ../meta-rzg2_add_codec_support.patch<br />
$ sh docs/template/copyscript/copy_proprietary_software_omx.sh ../RTK0EF0045Z15001ZJ_0_4_0<br />
$ cd ..<br />
<br />
### Initialize Yocto Environment<br />
$ source poky/oe-init-build-env<br />
<br />
### Copy prepared configuration files for this board<br />
$ cp ../meta-rzg2/docs/template/conf/smarc-rzg2l/*.conf ./conf/<br />
<br />
### Build<br />
$ bitbake core-image-minimal # (this is optional, no graphics)<br />
$ bitbake core-image-weston<br />
$ bitbake core-image-minimal -c populate_sdk<br />
</pre><br />
|}<br />
<br />
'''4. Prepare an SD Card'''<br />
* 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.<br />
<br />
* Insert your micro SD card into a '''USB-SD-Card reader''' and then plug into a Linux PC.<br />
<br />
* Use the commands below to download the formatting script and run. Please select your card and choose the default settings.<br />
<br />
<pre><br />
$ wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/usb_sd_partition/usb_sd_partition.sh<br />
$ chmod +x usb_sd_partition.sh<br />
$ ./usb_sd_partition.sh<br />
</pre><br />
* 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'''.<br />
<pre><br />
# Change to the Yocto output directory that contains the files<br />
$ cd build/tmp/deploy/images/smarc-rzg2l<br />
<br />
# Copy the Linux kernel and Device Tree to partition 1<br />
$ sudo cp -v Image /media/$USER/RZ_FAT<br />
$ sudo cp -v r9a07g044l2-smarc.dtb /media/$USER/RZ_FAT<br />
<br />
# Copy and expand the Root File System to partition 2<br />
$ sudo tar -xvf core-image-minimal-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext<br />
(or if using graphics)<br />
$ sudo tar -xvf core-image-weston-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext<br />
<br />
# Make sure all files are finished writing before removing the USB card reader from the PC<br />
$ sync<br />
</pre><br />
<br />
* Safely remove your USB card reader by right clicking on the drive icon (either RZ_FAT or RZ_ext) in Ubuntu and selecting "Eject"<br />
<br />
'''5. Power the Board and Connect to the Serial Port '''<br />
* Supply power the board using the '''USB-C connection''' on the carrier board labeled "Power Input"<br />
* 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.<br />
* 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'''.<br />
* 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.<br />
<br />
'''6. Switch settings for the CPU SOM board.'''<br />
* 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/G2L.<br />
* Set the switches on the SOM board to what you want to use.<br />
* ⚠️ 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"<br />
* 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/G2L.<br />
* On the SOM (CPU) board, there is a little switch (SW1) near the SD card socket.<br />
<pre><br />
SOM board uses SD Card socket SOM board uses eMMC Flash<br />
SW1-1 = ON/OFF(JTAG) SW1-1 = ON/OFF(JTAG)<br />
SW1-2 = ON SW1-2 = OFF<br />
+-----+ +-----+<br />
| ON | | ON |<br />
| = = | | = |<br />
| | | = |<br />
| 1 2 | | 1 2 |<br />
+-----+ +-----+<br />
</pre><br />
<br />
'''7-1. Boot the Board using SD Card on Carrier Board (Recommended)'''<br />
* Insert the '''SD card''' into the socket on '''Carrier Board'''.<br />
<pre style="background-color:#FFFFFF; border:0px"><br />
┌─────┬─────┬─────┐<br />
│ │ SOM │ │<br />
│ └─────┘ │<br />
│ Carrier Board │<br />
│ ┌─┐ │<br />
└─────┴─┴─────────┘<br />
↑<br />
SD Card Socket<br />
</pre><br />
* 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.<br />
* At the u-boot prompt ( => ), enter the following commands to boot the board:<br />
<pre><br />
# Create command macros and save them:<br />
=> setenv sd_boot_carrier1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 /r9a07g044l2-smarc.dtb'<br />
=> setenv sd_boot_carrier2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'<br />
=> setenv bootcmd 'run sd_boot_carrier1 sd_boot_carrier2'<br />
=> saveenv<br />
<br />
# Reset the board and it will automatically boot<br />
</pre><br />
<br />
'''7-2. Boot the Board using eMMC Flash on SOM Board'''<br />
* Set switch SW1-2 = OFF<br />
* The boot loader (u-boot) by default will try to boot from eMMC after 3 seconds.<br />
* Press the '''blue reset button''' and wait.<br />
<br />
'''7-3. Boot the Board using SD Card on SOM Board (eMMC Flash disabled)'''<br />
* Set switch SW1-2 = ON<br />
* Insert the '''SD card''' into the socket on '''SMARC SOM CPU board''' (not the carrier board).<br />
* 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.<br />
* 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)<br />
* At the u-boot prompt ( => ), enter the following commands to boot the board:<br />
<pre><br />
# Manually enter the following commands to boot<br />
=> mmc dev 0 ; fatload mmc 0:1 0x48080000 Image ; fatload mmc 0:1 0x48000000 /r9a07g044l2-smarc.dtb<br />
=> setenv bootargs 'root=/dev/mmcblk0p2 rootwait' ; booti 0x48080000 - 0x48000000<br />
</pre><br />
<br />
<br />
'''8. Linux Login'''<br />
* The login will be "root" (no password is needed)<br />
<br />
= Board Setup Information =<br />
{| class="toccolours" width="100%" style="border-style: none ; text-align: center; background-color:white;"<br />
|-<br />
| [[File:board_configuration.png|frameless]]<br>'''RZ/G2L Evaluation Board Kit Configuration'''<br />
| [[File:smarc_module_board_top.png|frameless|]] <br>'''RZ/G2L SMARC Module Board (TOP)'''<br />
| [[File:smarc_module_board_bottom.png|frameless|]]<br>'''RZ/G2L SMARC Module Board (Bottom)'''<br />
| [[File:smarc_series_carrier_board.png|frameless|]]<br>'''RZ SMARC Series Carrier Board'''<br />
|-<br />
| &nbsp;<br />
|-<br />
| colspan="2" style="text-align:left;" | [[File:power_supply.png|frameless|]]<br>'''Power Supply'''<br>The following power supply environment is used in the evaluation of Renesas:<br>● USB Type-C cable CB-CD23BK (manufactured by Aukey) <br> ● USB PD Charger Anker PowerPort III 65W Pod (manufactured by Anker) <br />
| colspan="2" style="text-align:left;" |[[File:JTAG_connection_ice_debug.png|frameless|]]<br>'''JTAG Cable Connection for ICE Debugging'''<br>When connecting JTAG debugger, please set the DIP SW1 settings as shown.<br>The JTAG connector is 10pin.<br />
|-<br />
|-<br />
| &nbsp;<br />
|-<br />
| [[File:boot_mode.png|frameless|]]<br>'''How to set Boot Modes'''<br />
|}<br />
<br />
= Board Operation Information =<br />
{| class="toccolours" width="100%" style="border-style: none ; text-align: center; background-color:white;"<br />
|-<br />
| style="text-align:left;" | [[File:power_on.png|frameless|]]<br>'''Power ON'''<br>● Connect USB-PD Power Charger to USB Type-C Connector. Then LED1(VBUS PWR On) and LED3(Module PWR On) lights up.<br>● Press SW9 to turn on the power. Then LED4(Carrier PWR On) lights up.<br />
| style="text-align:left;" | [[File:debug_serial.png|frameless|]]<br>'''Debug Serial (Console Output)'''<br>● Debug serial uses CN14. The baud rate is 115200bps.<br>● Since the serial-USB conversion IC is not always powered, the Windows PC will recognize it after the power switch is turned on.<br>● If it is not recognized by your Windows PC, please install the driver�https://www.ftdichip.com/Drivers/VCP.htm<br />
<br />
|}<br />
<br />
= LCD Monitors =<br />
The following LCD monitor were tested with this board.<br />
<br />
* Ingcool 7 inch HDMI LCD 1024x600 Resolution Capacitive Touch Screen<br />
** 🛒 Amazon link : https://www.amazon.com/Ingcool-Resolution-Capacitive-Compatible-Raspberry/dp/B08H8HZRLQ<br />
** If you attach the 'Touch' USB connection on the LCD to the RZ/G2L board, it will both power the LCD board as well as enable touch support.<br />
* ELECROW Raspberry Pi Touchscreen Monitor 5 inch HDMI Screen Display 800x480 Compatible<br />
** 🛒 Amazon link : https://www.amazon.com/Elecrow-Capacitive-interface-Supports-Raspberry/dp/B07FDYXPT7<br />
<br />
= Enable the Coral MIPI Camera =<br />
In the RZ/G2L BSP v1.1 release, the Coral Camera module (OV5645) is supported, but not enabled.<br />
Please follow the instructions below to apply a patch that enables the Camera module in the Device Tree.<br />
<br />
These instructions assume that you have already built the BSP at least 1 time.<br />
<br />
1. Download a patch and apply it to your current kernel source code. Start at the base of your Yocto directory.<br />
<pre><br />
$ cd build/tmp/work-shared/smarc-rzg2l/kernel-source<br />
$ wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/boards/rzg2l_smarc/camera_patch/0001-add-MIPI-CSI-OV5645-camera.patch<br />
$ patch -p1 -i 0001-add-MIPI-CSI-OV5645-camera.patch<br />
$ cd ../../../..<br />
</pre><br />
⚠️ In Yocto, if you do a 'bitbake linux-renesas clean' command, it will completely erase the kernel code, and you will have to apply this patch again.<br />
<br />
2. Since this patch only updated the kernel Device Tree, follow these instructions to rebuild just the Device Tree.<br />
* [https://renesas.info/wiki/RZ-G/RZG_yocto#Build_DTB_only_with_Yocto Build DTB only with Yocto]<br />
<br />
3. Copy your new Device Tree file (build/tmp/deploy/images/smarc-rzg2l/r9a07g044l2-smarc.dtb) to the SD Card and boot.<br />
<br />
4. Configure MIPI CSI module to capture image:<br />
<br />
MIPI CSI configuration is done by using media-ctl utility from v4l-utils package.<br><br />
The first 2 commands below enable the camera.<br><br />
Below that are commands you use to select the camera resolution you want to capture.<br />
<pre><br />
[ Camera Setup ]<br />
media-ctl -d /dev/media0 -r<br />
media-ctl -d /dev/media0 -l "'rzg2l_csi2 10830400.csi2':1 -> 'CRU output':0 [1]"<br />
<br />
[Select resolution 1280x960 ]<br />
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1280x960 field:none]"<br />
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/1280x960 field:none]"<br />
<br />
[Select resolution 1920x1080 ]<br />
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1920x1080 field:none]"<br />
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/1920x1080 field:none]"<br />
<br />
[Select resolution 2592x1944 ]<br />
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/2592x1944 field:none]"<br />
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/2592x1944 field:none]"<br />
</pre><br />
<br />
5. Capture image using GStreamer<br />
<br />
This command can be used capture images and display them on the screen in weston.<br />
<pre><br />
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! waylandsink<br />
</pre><br />
<br />
= Build Qt in BSP V1.1 =<br />
BSP V1.1 already support to build core-image-qt. Please follow instructions to add Qt in BSP V1.1.<br><br />
Start in the base of the Yocto BSP directory.<br />
<pre><br />
$ git clone https://github.com/meta-qt5/meta-qt5<br />
$ cd meta-qt5<br />
$ git checkout c1b0c9f546289b1592d7a895640de103723a0305<br />
$ cd ..<br />
</pre><br />
<br />
It also comes with Qt demoes. If you want to build the demos, enable QT_DEMO = "1" in conf/local.conf.<br />
* Edit file /build/conf/local.conf<br />
* Remove the comment marker # to set QT_DEMO = "1"<br />
<pre><br />
# Adding qt demonstration to core-image-qt or not<br />
QT_DEMO = "1"<br />
</pre><br />
Now you can build core-image-qt.<br />
<pre><br />
$ bitbake core-image-qt<br />
</pre><br />
After the build is complete, copy the new root file system to your SD Card<br />
<pre><br />
$ cd build/tmp/deploy/images/smarc-rzg2l<br />
$ sudo tar -xvf core-image-qt-smarc-rzg2l.tar.gz -C /media/$USER/RZ_ext<br />
$ cd -<br />
$ sync<br />
</pre><br />
After the board boots, on the Weston desktop you will see icons that will start the demos.<br />
<br />
= Enable eMMC Boot =<br />
eMMC Boot refers to the SoC booting directly from eMMC flash after RESET. This means SPI Flash is not used.<br />
<br />
eMMC boot support was added after BSP v1.3 was released.<br />
<br />
The follow commands (copy/paste) and instructions will allow you to manually download, build and program your board. <br />
<br />
{| class="mw-collapsible mw-collapsed wikitable"<br />
| Instructions &nbsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;<br />
|-<br />
|<br />
<pre><br />
# Download and install a toolchain<br />
# Linaro Toolchain, Version 7.5.0-2019.12<br />
sudo mkdir -p /opt/linaro<br />
cd /opt/linaro<br />
sudo wget https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz<br />
sudo tar xvf gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz<br />
cd - # this command puts you back to your original directory :)<br />
<br />
# Make sure you have all the build utilities you need<br />
sudo apt-get install git make gcc g++ libncurses5-dev libncursesw5-dev python bison flex libssl-dev<br />
<br />
# Create a new Directory<br />
mkdir rzg2l_emmc_boot<br />
cd rzg2l_emmc_boot<br />
<br />
#---------------------------------------------------<br />
# Download FlashWriter<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/rzg2_flash_writer<br />
cd rzg2_flash_writer ; git checkout rz_g2l ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download TrustedFirmware-A<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/rzg_trusted-firmware-a<br />
cd rzg_trusted-firmware-a ; git checkout v2.5/rzg2l ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download mbed<br />
# mbed code is needed to build Trusted Firmware-A<br />
#---------------------------------------------------<br />
git clone git://github.com/ARMmbed/mbedtls.git<br />
cd mbedtls ; git checkout mbedtls-2.16.3 ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download u-boot<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/renesas-u-boot-cip<br />
cd renesas-u-boot-cip ; git checkout v2020.10/rzg2l ; cd ..<br />
<br />
<br />
#---------------------------------------------------<br />
# Download build scripts<br />
#---------------------------------------------------<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_common.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_flashwriter.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_tfa.sh<br />
wget https://raw.githubusercontent.com/seebe/rzg_stuff/master/build_scripts_new/build_uboot.sh<br />
chmod +x *.sh<br />
<br />
<br />
#---------------------------------------------------<br />
# Configure build system<br />
#<br />
# - Select "smarc-rzg2l"<br />
# - All output files will be in directory "output_smarc-rzg2l"<br />
#---------------------------------------------------<br />
./build.sh s<br />
<br />
#---------------------------------------------------<br />
# build Flash Writer<br />
#<br />
# - Select toolchain "ARM gcc-arm-10.2-2020.11" that you installed<br />
# - Change "eMMC Flash programming support" from "(default)" to "ENABLE"<br />
# - Select 'Build'<br />
#---------------------------------------------------<br />
./build.sh f<br />
<br />
#---------------------------------------------------<br />
# build u-boot<br />
#---------------------------------------------------<br />
# * Select toolchain "ARM gcc-arm-10.2-2020.11" that you installed<br />
./build.sh u<br />
<br />
#---------------------------------------------------<br />
# build TF-A<br />
#<br />
# - Select toolchain "ARM gcc-arm-10.2-2020.11" that you installed<br />
# - Change "Boot Device" to "eMMC Flash"<br />
# - Select 'Build'<br />
#---------------------------------------------------<br />
./build.sh t<br />
<br />
#---------------------------------------------------<br />
# Download 'Flash Writer Tool'<br />
# - Configure for our output directory <br />
# - Configure for board "smarc-rzg2l"<br />
# - Configure for eMMC Flash boot<br />
#---------------------------------------------------<br />
git clone https://github.com/renesas-rz/rzg2_bsp_scripts<br />
cd rzg2_bsp_scripts/flash_writer_tool<br />
echo "CONFIG_FILE=config.ini" > settings.txt<br />
echo "FILES_DIR=../../output_smarc-rzg2l" > config.ini<br />
echo "FLASH=1" >> config.ini<br />
echo "BOARD=smarc-rzg2l" >> config.ini<br />
echo "BOARD_VERSION=PMIC" >> config.ini # NOTE: Only if you have a board with PMIC Power Supply<br />
echo "BOARD_VERSION=DISCRETE" >> config.ini # NOTE: Only if you have a board with Discrete Power Supply<br />
<br />
#---------------------------------------------------<br />
# Run 'Flash Writer Tool'<br />
#---------------------------------------------------<br />
./flash_writer_tool.sh<br />
<br />
Step 1. Select "Show Switches" to show how to put board into SCIF Download mode<br />
Step 2. Select "Download F.W."<br />
Step 3. Select "eMMC boot setup"<br />
Step 4. Select "Program BL2"<br />
Step 5. Select "Program FIP"<br />
Step 6. Select "Show Switches" to show how to put board into eMMC Boot mode<br />
Step 7. Select "<SAVE-and-EXIT>"<br />
<br />
</pre><br />
|}</div>
Eiclg
https://renesas.info/w/index.php?title=RZ-A&diff=579
RZ-A
2021-09-03T01:14:22Z
<p>Eiclg: /* Articles and Whitepapers */</p>
<hr />
<div>{{DISPLAYTITLE:RZ/A Series 32-bit MPU}}<br />
<br />
<img src="https://renesas.info/images/RZ.jpg" style="float:right" height="120"><br />
<br />
<br><br><br />
<br />
= Boards =<br />
''' RZA1 '''<br />
{| class="toccolours" width="100%" style="text-align: center"<br />
| <font size=+1> <font color=#282A9D>◼</font> [[RZ-A/RZA1LU-Stream_It|Stream It kit]] <br></font><img height=150 src=https://www.renesas.com/sites/default/files/inline-images/rz-a1-stream-it-board.jpg> <br> RZ/A1LU <br> by Renesas<br />
|<font size=+1> <font color=#282A9D>◼</font> RZ/A1H Starter Kit <br></font> <img height=150 src=https://www.renesas.com/sites/default/files/media/images/rsk-rza1-en-ja-zh.jpg> <br> RZA/1H <br> by Renesas<br />
| <font size=+1> <font color=#282A9D>◼</font> [[RZA MBED Support|GRLYCHEE]]</font>[[File:RZA1LU MBED Lychee Board.png|center|thumb|125x125px|[https://os.mbed.com/platforms/Renesas-GR-LYCHEE/]]]RZ/A1LU <br> by Renesas MBED<br />
| <font size=+1> <font color=#282A9D>◼</font> [[RZA MBED Support|GRPEACH]] </font>[[File:GR-PEACH .png|center|thumb|125x125px|[https://os.mbed.com/platforms/Renesas-GR-PEACH/]]]RZA1LH <br> by Renesas MBED<br />
|}<br />
''' RZA2M '''<br />
{| class="toccolours" width="100%" style="text-align: center"<br />
|<font size="+1"> <font color="#282A9D">◼</font> [[RZA2M Evaluation board]] <br></font> <img height=150 src=https://renesas.info/w/images/4/4f/RZA2M.jpg> <br> RZA2M <br> by Renesas<br />
|<font size="+1"> <font color="#282A9D">◼</font> [[RZA MBED Support|RZA2M MBED Mango]] </font>[[File:GR-Mango.png|center|thumb|150x150px|[https://os.mbed.com/platforms/Renesas-GR-MANGO/]]]<br> by Renesas MBED<br />
|}<br />
<br />
=Official Software and Documentation=<br />
These are the currently supported Software packages for the RZA1 and RZA2M. The <br />
*[https://www.renesas.com/us/en/software-tool/rza2m-freertos-software-package RZ/A2M FreeRTOS™ Software Package]<br />
*[https://www.renesas.com/us/en/software-tool/rza-software-development-kit RZ/A1LU FreeRTOS™ Software Package]<br />
*[[RZ-A/RZA AzureRTOS|Microsoft Azure RZA Software Package]]<br />
=Renesas Supported Development Environments=<br />
*[[Renesas e2studio]]<br />
=RZA GUI Platforms=<br />
*[https://docs.microsoft.com/en-us/azure/?product=featured Microsoft Azure GUIX] [https://github.com/azure-rtos/samples demos]<br />
*[https://www.guiliani.de/mediawiki/index.php?title=The_C%2B%2B_GUI_framework_for_all_embedded_engineers TES Guiliani] [https://www.guiliani.de/mediawiki/index.php?title=Downloads:EvalKits demos]<br />
*[https://www.cranksoftware.com/partners/renesas Crank] ''contact Crank for RZA demos''<br />
*[https://www.microej.com MicroEJ] ''contact MicroEJ for RZA Java demos''<br />
*[https://www.embedded-wizard.de/platforms/renesas/rz-a Tara Embedded Wizard] ''contact Tara for RZA demos''<br />
<br />
=Articles and Whitepapers=<br />
*[https://www2.renesas.cn/cn/en/blogs/improve-machine-vision-20-times-renesas-drp RZ/A2M: Improve Machine Vision up to 20 times with Renesas DRP!]<br />
*[https://www.renesas.com/us/en/blogs/rza2m-drp-realizes-fast-detection-2d-barcode-code-type RZ/A2M DRP realizes fast detection of 2D barcode code type] [https://github.com/renesas-rz/rza2m_barcode_type_detection_demo Sample Code]<br />
*[https://www.renesas.com/us/en/blogs/rza2m-drp-realizes-efficient-mask-face-detection RZ/A2M DRP realizes efficient mask face detection] [https://github.com/renesas-rz/rza2m_face_detection_demo Sample Code]<br />
<br />
=Topics=<br />
{| class="toccolours" width="100%" style="text-align: center"<br />
|<font size="+3">🎥</font> '''[[RZ-A/RZA_videos | Demo Videos]]'''<br />
|}</div>
Eiclg