Skip to content

RZ/G2L Ubuntu Bootable Tool

Back to Getting Started >

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:

    export DL_DIR=<A directory path where packages downloaded in step 3 are stored>
    export WORK_DIR=<A path to your working directory>
    
  • 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:

    ls ${WORK_DIR}
    

    You will see the following directories.

    bootloaders  installer  oss  rz-codecs  rz-graphics
    
  • Run the main script:

    cd ${WORK_DIR}/installer
    ./make_bootable_tool.sh
    
  • The main menu provides 3 options:

    main_menu.png

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.

    Select image

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.

    Choose image

  • 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.

    Image name

  • 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.

    Download QEMU

  • The tool will allocate and format Linux.img.

    Create raw image

  • The tool will download the Ubuntu 24.04 ISO. If it already exists in the downloads folder, this step will be skipped.

    Download ISO file Compelte Download ISO file

  • The tool will use QEMU VM to install Ubuntu 24.04 to Linux.img. Press OK to continue.

    Start QEMU

  • Follow installation instructions in Section 4.2.4.

  • If successful, the Completed dialog box will appear. Press OK to continue.

    Complete install Ubuntu

4.2.2 Install Software

  • Press Enter on the Install Software:.

    Select "Intall Software" option

  • The tool will install all .deb packages into Linux.img.

    Install sofware packages

  • Wait for the Success dialog box. Press OK to continue.

    Finish install software packages

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 "Write Image" option

  • Select the microSD card (e.g., sdb Transcend (59,5G)). Press OK to continue.

    Select storage device

  • Press Proceed to confirm.

    Confirm action

  • The tool will write Linux.img to sdb Transcend (59,5G).

    Write image

  • If successful, the following dialog box will appear. Press OK to continue.

    Write image_successful

  • 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.

    Install Ubuntu 24.04

  • Press Enter on Continue in rich mode.

    Choose mode installer

  • Press Enter on English.

    Select language

  • Select your keyboard configuration (e.g., English (US)).

    Choose keyboard

  • Use the default settings and press Enter to continue.

    Select server

  • Use the default settings and press Enter to continue.

    Network setting

  • Use the default settings and press Enter to continue.

    Proxy setting

  • Wait for the mirror location to be tested (see below), then press Done to continue.

    Mirror setting

  • Deselect Set up this disk as an LVM group and press Done to continue.

    Storage setting

  • Press Enter to confirm the partitions of the /dev/vdb disk.

    Storage2 setting

  • Select Continue to finish partitioning and write changes to the /dev/vdb disk.

    Storage warn

  • Enter username (e.g., user) and password for the administrator account, then press Done.

    Profile setting

  • Use the default settings and press Enter to continue.

    Skip ubuntu pro setting

  • Use the default settings and press Done to continue.

    Skip openssh setting

  • Do not select any snap package. Press Done to continue.

    Skip snap setting

  • Wait for the installation to finish.

    Finish setting

  • Press Reboot Now to exit the installer.

    Network setting

  • Press Ctrl+A+X to exit the VM.

Back to Getting Started >