Skip to content

RZ/G2L Debian Bootable Tool

Back to Getting Started >

1. Overview

The RZ/G2L Debian Bootable Tool is a Bash script designed to streamline the creation and customization of bootable ARM64 Linux disk images for Debian 13 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 Debian 13 ARM64 ISO if it doesn't exist already.
    • Use QEMU to install Debian 13 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 Debian 13 from the ISO into the image.
  • install_renesas_sw.sh: Set up environment for chroot method to install software packages.
  • install_packages_debian.sh: Install software packages inside a Debian 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 Debian Installer

  • 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 RTK0EF0045Z0031AZJ-v*.zip
    tar xf RTK0EF0045Z0031AZJ-v*/rz-debian-support-v*.tar.gz -C ${WORK_DIR}
    unzip RTK0EF0045Z0033AZJ-v*_EN.zip
    tar xf RTK0EF0045Z0033AZJ-v*_EN/rz-graphics-v*.tar.gz -C ${WORK_DIR}
    unzip RTK0EF0045Z0039AZJ-v*_EN.zip
    tar xf RTK0EF0045Z0039AZJ-v*_EN/rz-codecs-v*.tar.gz -C ${WORK_DIR}
    7z x debian13-testing-arm64-iso_May26-2025.7z
    mv debian13-testing-arm64-iso_May26-2025/debian-testing-arm64-DVD-1.iso ${WORK_DIR}/installer/downloads/
    

    Note

    In the case that you have never used 7z on your PC, install 7z as follows:

    sudo apt install p7zip-full
    
  • Check your working directory:

    ls ${WORK_DIR}
    

    You will see the following directories.

    bootloaders  installer  oss  rz-codecs  rz-graphics
    
  • Execute ./make_bootable_tool.sh to open the GUI:

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

    Main menu

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 Debian 13 pre-installed.
    • 2 Create New: Create a new 16GiB image and install Debian 13 on it.

    Prepare 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_deian_base.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., Debian_13.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 Debian_13.img.

    Create raw image

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

    Download ISO file

  • The tool will use QEMU VM to install Debian 13 on Debian_13.img. Press "Ok" to continue.

    Start QEMU

  • Follow installation instructions in Section 4.3.

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

    Complete install Debian 13

4.2.2 Install Software

  • Press Enter on the Install Software:.

    Select "Install Software" option

  • Enter the administrator password. The tool will then install all .deb packages into Linux_deian_base.img.

    Install software 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.

  • Press Enter on Write Image: to write Linux_deian_base.img to the microSD card.

    Select "Write Image" option

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

    Select microSD card

  • Press Proceed to confirm.

    Confirm action

  • The tool will write Linux_deian_base.img to sdb Transcend (59,5G). Wait until 16GiB of data is written.

    Write image

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

    Write image_successful

    Attach_sd_successful

  • Press Save and Exit to save the settings. Then press OK to exit.

    Return main menu

    Save setting

    Exit tool

  • Execute sudo eject /dev/sdb to safely remove the microSD card from the Host PC.

4.3 How To Install Debian 13

  • Press Enter on Install.

    Install Debian 13

  • Press Enter on English.

    Select language

  • Select your country, territory, or area (e.g., United States).

    Select location

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

    Configure keyboard

  • Edit the hostname (e.g., debian), then press Continue.

    Host name

  • Enter the domain name, then press Continue (leave blank if not applicable).

    Domain name

  • Set and verify the root password.

    Root password

    Verify root password

  • Create a user account (e.g., user).

    User name

    Name account

    User password

    Verify user password

  • Select your time zone (e.g., Eastern).

    Configure clock

  • Press Enter on Guided - use entire disk.

    Use entire disk

  • Press Enter on Virtual disk 1 (vda) - 17.2 GB Virtio Block Device.

    Select Disk

  • Press Enter on All files in one partition (recommended for new users).

    One partition

  • Press Enter on Finish partitioning and write changes to disk, then confirm with Yes.

    Finish partitioning

    Write to disk

  • Press Yes to update the software using a network mirror.

    Network mirror

  • Select archive mirror country (e.g., United States).

    Mirror country

  • Press Enter on deb.debian.org.

    Archive mirror

  • Edit HTTP proxy information (leave blank if not applicable), then press Continue.

    HTTP proxy

  • Press NO to skip the package usage survey.

    Usage survey

  • Do not select any desktop environment. Press Continue to proceed.

    Software selection

  • If successful, the Installation complete dialog box will appear. Click Continue to exit the installer.

    Reboot

  • At GRUB interface, press Ctrl+A+X to exit the VM.

    Grub menu

Back to Getting Started >