RZ-G/RZ-G2 BSP Porting Ubuntu: Difference between revisions
No edit summary |
|||
Line 34: | Line 34: | ||
|} | |} | ||
=== Prepare Files === | === Prepare Files === | ||
In the following example, please replace "'''''<u>version</u>'''''" 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 | ||
{| class="mw-collapsible mw-collapsed wikitable" width="50%" | |||
|Initial preparation | |||
|- | |||
|mkdir root | |||
tar -xpf ubuntu-base-<'''''<u>version</u>'''''>-base-arm64.tar.gz -C root | |||
cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ | |||
==== | cp -b /etc/resolv.conf root/etc/resolv.conf | ||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" width="50%" | |||
|Create a new script file | |||
|- | |||
|vim ch-mount.sh | |||
#!/bin/bash | |||
function mnt() { | |||
echo "MOUNTING" | |||
sudo mount -t proc /proc ${2}proc | |||
sudo mount -t sysfs /sys ${2}sys | |||
sudo mount -o bind /dev ${2}dev | |||
sudo chroot ${2} | |||
} | |||
function umnt() { | |||
echo "UNMOUNTING" | |||
sudo umount ${2}proc | |||
sudo umount ${2}sys | |||
sudo umount ${2}dev | |||
} | |||
if [ "$1" == "-m" ] && [ -n "$2" ] ; | |||
then | |||
mnt $1 $2 | |||
elif [ "$1" == "-u" ] && [ -n "$2" ]; | |||
then | |||
umnt $1 $2 | |||
else | |||
echo "" | |||
echo "Either 1'st, 2'nd or both parameters were missing" | |||
echo "" | |||
echo "1'st parameter can be one of these: -m(mount) OR -u(umount)" | |||
echo "2'nd parameter is the full path of rootfs directory(with trailing | |||
'/')" | |||
echo "" | |||
echo "For example: ch-mount -m /media/sdcard/" | |||
echo "" | |||
echo 1st parameter : ${1} | |||
echo 2nd parameter : ${2} | |||
fi | |||
|} | |||
===Configure Filesystem === | |||
==== | ==== Enter Filesystem==== | ||
== | ====Install required software==== | ||
== | ====Add users==== | ||
== | ==== Configure UART==== | ||
== | ====Exit FileSystem==== | ||
== Port Qt == | == Deploy FileSystem to SD Card== | ||
Β | |||
==Install Wayland, Wayland-Protocols and Weston== | |||
Β | |||
==Port GPU Libraries== | |||
Β | |||
==Port codec Librasries== | |||
Β | |||
==Port Qt== |
Revision as of 08:25, 22 May 2023
β Back to RZ-G/RZ-G2_BSP_Porting
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
Select the package to download based on the desired file system |
wget https://cdimage.ubuntu.com/ubuntubase/releases/20.04/release/ubuntu-base-20.04.4-base-arm64.tar.gz
wget http://cdimage.ubuntu.com/ubuntubase/releases/18.04.5/release/ubuntu-base-18.04.5-basearm64.tar.gz |
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
Initial preparation |
mkdir root
tar -xpf ubuntu-base-<version>-base-arm64.tar.gz -C root cp /usr/bin/qemu-aarch64-static ./root/usr/bin/ cp -b /etc/resolv.conf root/etc/resolv.conf |
Create a new script file |
vim ch-mount.sh
#!/bin/bash function mnt() { echo "MOUNTING" sudo mount -t proc /proc ${2}proc sudo mount -t sysfs /sys ${2}sys sudo mount -o bind /dev ${2}dev sudo chroot ${2} } function umnt() { echo "UNMOUNTING" sudo umount ${2}proc sudo umount ${2}sys sudo umount ${2}dev } if [ "$1" == "-m" ] && [ -n "$2" ] ; then mnt $1 $2 elif [ "$1" == "-u" ] && [ -n "$2" ]; then umnt $1 $2 else echo "" echo "Either 1'st, 2'nd or both parameters were missing" echo "" echo "1'st parameter can be one of these: -m(mount) OR -u(umount)" echo "2'nd parameter is the full path of rootfs directory(with trailing '/')" echo "" echo "For example: ch-mount -m /media/sdcard/" echo "" echo 1st parameter : ${1} echo 2nd parameter : ${2} fi |