RZ/G2L Ubuntu Bootable Tool¶
1. Overview¶
The RZ/G2L Ubuntu Bootable Tool is a Bash script designed to streamline the creation and customization of bootable ARM64 Linux disk images for Ubuntu 24.04 on the RZ/G2L platform.
It offers a user-friendly, menu-based interface using whiptail
and zenity
, making it easy to create, manage disk images and apply custom configurations.
The tool also supports writing images directly to an SD card.
2. Objectives¶
Preparing The Image:
- Use an existing image or create a new 16GB image.
- Download Ubuntu 24.04 ARM64 ISO if it doesn't exist already.
- Use QEMU to install Ubuntu 24.04 from the ISO into the created image.
Install Software Packages:
- Install OSS (Open-source Software) packages including CIP kernel, GStreamer, MMNGR, VSPMIF.
- Install HW Graphics packages (optional).
- Install HW Codec packages (optional).
Write The Image:
- Select and write the image to an SD card.
3. Scripts Details¶
The bootable Linux image creation process is implemented as several small scripts for easy maintenance. Here is the introduction and main functions.
make_bootable_tool.sh
: Contain the main menu selection.install_qemu.sh
: Install QEMU version 8.2.9.run_qemu.sh
: Start QEMU VM to install Ubuntu 24.04 from the ISO into the image.install_renesas_sw.sh
: Set up environment for chroot method to install software packages.install_packages_ubuntu.sh
: Install software packages inside an Ubuntu chroot environment.attach_sd.sh
: Write bootable image to SD card.settings.txt
: Save previously used image names.
4. Usage¶
4.1 Prerequisites¶
- Ubuntu 22.04 LTS, and 24.04 LTS are supported.
- Internet connection is required.
- The
sudo
permission is required. - 50GB+ available storage.
- 32GB+ microSD card.
4.2 How To Use¶
Set the following environment:
Create your working directory, and decompress packages:
mkdir -p ${WORK_DIR} cd ${DL_DIR} unzip RTK0EF0045Z0030AZJ-v*.zip tar xf RTK0EF0045Z0030AZJ-v*/rz-ubuntu-support-v*.tar.gz -C ${WORK_DIR} unzip RTK0EF0045Z0032AZJ-v*_EN.zip tar xf RTK0EF0045Z0032AZJ-v*_EN/rz-graphics-v*.tar.gz -C ${WORK_DIR} unzip RTK0EF0045Z0038AZJ-v*_EN.zip tar xf RTK0EF0045Z0038AZJ-v*_EN/rz-codecs-v*.tar.gz -C ${WORK_DIR}
Check your working directory:
You will see the following directories.
Run the main script:
The main menu provides 3 options:
- Select Image: Prepare an image with Ubuntu 24.04 pre-installed.
- Install Software: Install software packages to the image.
- Write Image: Write the image to the SD card.
4.2.1 Select Image¶
Press Enter on the Select Image: and select one of the two options below:
- 1 Browse: Select an image with Ubuntu 24.04 pre-installed.
- 2 Create New: Create a new 16GiB image and install Ubuntu 24.04 on it.
Note
When you perform this process for the first time, you need to create a new image (2 Create New). You can use the created image next time (1 Browse).
For the 1 Browse option, use the file dialog to select the image (e.g.,
Linux.img
). Next, press OK to confirm and skip to Section 4.2.2.For the 2 Create New option, use the file dialog to name the image (e.g.,
Linux.img
) and select its location. Next, press OK to confirm.Enter the administrator password. The tool will then download, build, and install QEMU version 8.2.9. If it's already installed, this step will be skipped.
The tool will allocate and format
Linux.img
.The tool will download the Ubuntu 24.04 ISO. If it already exists in the
downloads
folder, this step will be skipped.The tool will use QEMU VM to install Ubuntu 24.04 to
Linux.img
. Press OK to continue.Follow installation instructions in Section 4.2.4.
If successful, the Completed dialog box will appear. Press OK to continue.
4.2.2 Install Software¶
Press Enter on the Install Software:.
The tool will install all .deb packages into
Linux.img
.Wait for the Success dialog box. Press OK to continue.
4.2.3 Write Image¶
Plug in the microSD card to the Host PC.
In the main menu, press Enter on Write Image: to write
Linux.img
to the microSD card.Select the microSD card (e.g.,
sdb Transcend (59,5G)
). Press OK to continue.Press Proceed to confirm.
The tool will write
Linux.img
tosdb Transcend (59,5G)
.If successful, the following dialog box will appear. Press OK to continue.
Execute
sudo eject /dev/sdb
to safely remove the microSD card from the Host PC.
4.2.4 How to install Ubuntu 24.04¶
Press Enter on Try or Install Ubuntu Server.
Press Enter on Continue in rich mode.
Press Enter on English.
Select your keyboard configuration (e.g., English (US)).
Use the default settings and press Enter to continue.
Use the default settings and press Enter to continue.
Use the default settings and press Enter to continue.
Wait for the mirror location to be tested (see below), then press Done to continue.
Deselect Set up this disk as an LVM group and press Done to continue.
Press Enter to confirm the partitions of the /dev/vdb disk.
Select Continue to finish partitioning and write changes to the /dev/vdb disk.
Enter username (e.g., user) and password for the administrator account, then press Done.
Use the default settings and press Enter to continue.
Use the default settings and press Done to continue.
Do not select any snap package. Press Done to continue.
Wait for the installation to finish.
Press Reboot Now to exit the installer.
Press Ctrl+A+X to exit the VM.