You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

SoC: All

Specification

Target Ubuntu OS Version: 20.04, 18.04

Target reference board: RZ/G2L,/G2LC,/G2UL SMARC

Host PC Environment: Ubuntu20.04

Ubuntu Filesystem Building

Install QEMU

Run below command on Host Ubuntu PC

sudo apt-get install qemu-user-static

Download Required Files

ExpandSelect the package to download based on the desired file system  

Prepare Files

In the following example, please replace "version" as below name as you need

ubuntu-base-20.04.4-base-arm64: 20.04.4
ubuntu-base-18.04.5-base-arm64: 18.04.5 
ExpandInitial preparation
ExpandCreate a new script file


Configure Filesystem

Enter Filesystem

chmod +x ch-mount.sh
./ch-mount.sh -m root/
chmod -R 777 /tmp

Install required software

apt-get update
apt-get install \
language-pack-en-base \
sudo \
ssh \
net-tools \
network-manager \
ethtool \
ifupdown \
isc-dhcp-client \
openssh-server \
iputils-ping \
rsyslog \
bash-completion \
htop \
resolvconf \
dialog \
vim    

Add users

ExpandPlesae replace the <name> with your user name

Configure UART

Expandvim /etc/init.d/ttyS0.conf

Network setup

echo "auto eth0" > /etc/network/interfaces.d/eth0
echo "iface eth0 inet dhcp" >> /etc/network/interfaces.d/eth0
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf

Exit FileSystem

exit
./ch-mount.sh -u root/

packaged FileSystem

cd root
tar -cjf rootfs.tar.bz2 ./*

Deploy FileSystem to SD Card

Prepare a SD card with ext4 partition: Learning/Linux#Partitioning and Formatting an SD Card

extract ubuntu .bz2 package to SD card

sudo tar -xvf rootfs.tar.gz -C /media/xxx/rootfs

Install Wayland, Wayland-Protocols and Weston

Environment Setup

Expandinstall required packages

Compile and install Wayland

Copy the Wayland 1.18.0 source code from VLP Yocto build folder to SD card.

i.e. build/tmp/work/aarch64-poky-linux/wayland/1.18.0-r0/wayland-1.18.0/
ExpandEnter the wayland-1.18.0 folder on SD card

Run below command on Reference Board

Compile and install Wayland-protocol

Copy the wayland-protocol1.20.0 source code from VLP Yocto build folder to SD card.

i.e. build/tmp/work/aarch64-poky-linux/wayland-protocols/1.20-r0/wayland-protocols-1.20/
ExpandEnter the wayland-protocols-1.20 folder on SD card

Run below command on Reference Board

Compile and install Weston

Copy the weston8.0.0 source code from VLP Yocto build folder to SD card.

i.e. build/tmp/work/aarch64-poky-linux/weston/8.0.0-r0/weston-8.0.0/
ExpandEnter the weston-8.0.0 folder on SD card

Run below command on Reference Board

If the configuration is correct, it will display below messages

User defined options
    libdir : /usr/lib/aarch64-linux-gnu
    prefix : /usr
    sysconfdir : /etc
    backend-drm-screencast-vaapi : false
    color-management-colord : false
    remoting : false
    xwayland : false
Expandcompile and install

Port GPU Libraries

Please refer to the StartupGuide.txt document in meta-rz-features/recipes-graphics/mali/files/mali_pkg_eval_vx.x.tar.gz

Migrate GPU drivers

Copy the driver mali_kbase..ko from VLP Yocto build folder to SD card.

i.e. build/tmp/work/smarc_rzg2l-poky-linux/kernel-modulemali/r35-p0/image/lib/modules/5.10.83-cip1-yocto-standard/extra
Expandinstall gpu .ko on reference board

Migrate GPU Libraries

Copy the library files to SD card.

i.e.  meta-rz-features/recipesgraphics/mali/files/mali_pkg_eval_vx.x.tar.gz
Expandinstall library to reference board

Testing

Install testing tool

sudo apt install glmark2-es2-wayland

Start Weston desktop

Only root user can launch weston service, please switch to root user in advance

insmod mali_kbase.ko
export XDG_RUNTIME_DIR=/usr/lib/
export RUNLEVEL=3
weston --tty 1 &

Run glmark2 test

glmark2-es2-wayland --fullscreen
glmark2 versionglmark2 result
glmark2 image.png

Port codec Librasries

In this section, we will copy codec related files from original VLP Yocto build.

i.e. core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2

Pleaes copy this .bz2 file to Ubuntu SD card and run below instruction on reference board

unzip core-image-qt-smarc-rzg2l.tar.bz2 or core-image-weston-smarc-rzg2l.tar.bz2 to folder "yocto"

Expandcopy codec drivers
Expandcopy gstreamer related lib
Expandmodify omx plugin configuration
Expandinstall gstreamer dependency

Test gstreamer

Expandlogin as root and insmod drivers
ExpandSpecify gstreamer location
ExpandLaunch weston
ExpandPlay Video

Port Qt

You can port Qt by following 3 methods

  • Port from VLP
  • Compile & Install Qt from source
  • Install Qt by apt-get

Port from VLP

In this section, we will copy Qt5.6.3 related files from original VLP Yocto build.

i.e. core-image-qt-smarc-rzg2l.tar.bz2

Pleaes copy this .bz2 file to Ubuntu SD card and run below instruction on reference board

unzip core-image-qt-smarc-rzg2l.tar.bz2 to folder "yocto"

(For other version of Qt, you can modify Yocto meta-qt5\recipes-qt\qt5, please inqury Qt company for higher version QT integration)

ExpandPort Qt lib

Start Weston RZ-G/RZ-G2 BSP Porting Ubuntu#Start Weston desktop

Then run the Qt example in /usr/share/qt5/examples

Compile from source

You can download qt5 source to reference board and compile on board.

Or cross compile qt5 on PC

Or compile qt5 in PC QEMU

Here we compile qt5 on board

Expandcompile qt5

We suggest to compile the qt5 with scrips

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

Install Qt by apt-get

apt-get install qt5-default qtwayland5

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.

Qt APPs development and testing

This section introduce how to develop Qt application on PC.

SDK build and installation

bitbake core-image-qt -c populate_sdk

The generated installation file is located at:

build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-qtaarch64-smarc-rzg2l-toolchain-3.1.14.sh

Install this SDK to PC, default folder is /opt/poky/3.1.14

setup SDK runtime environment

source /opt/poky/3.1.14/environment-setup-aarch64-poky-linux 

QT creator configuration

Add Deviceqt-creator-add-device.png
Add new Kitqt-creator-add-new-kit.png
Add Qt versionqt-creator-add-version.png
Add compilerQt-creator-add-compiler.png
Add debuggersqt-creator-add-debuggers.png
Select kit to build Qt projectqt-creator-select-kit.png
example to run qt calculator project

qt-creator-sample-project.png


  • No labels