Setting Up Your Development Environment for Renesas Remi Pi

The development process is based on an Ubuntu system and requires specific hardware, software tools, and resources. Below is what you need to prepare:

1. Development Host Requirements

To build the SDK and work efficiently, your host machine should have:

  • CPU: At least a dual-core processor
  • Memory: 8 GB or more
  • Storage: 100 GB or more
  • Platform:
    • A PC or server running Linux
    • Or a Linux virtual machine (VM)
    • Or WSL2 on Windows

2. Operating System

  • Recommended: Ubuntu 22.04 (64-bit desktop)
  • Other options: Fedora, OpenSUSE, Debian, RHEL, CentOS

3. Required Packages

  • Install the basic packages listed in the Remi Pi Linux Software Development Guide.
  • Only one package is needed for the initial setup.

By following these steps, you’ll be ready to set up the development environment for the Renesas Remi Pi platform (based on RZ/G processors like the G2L with dual ARM Cortex-A53 cores) and start development and debugging quickly.
Run the following command before start porting Ubuntu:

sudo apt-get update
sudo apt-get install qemu-user-static 

Porting Ubuntu 22.04 File System

1. What is Ubuntu-base?

  • Ubuntu-base is the minimal Ubuntu file system, just a few MB in size, but backed by the full Ubuntu software repository.
  • It includes the Debian package manager, making it easy to install additional software via apt-get.
  • Ideal for embedded systems because it supports deep customization and stability.

2. Why Use Ubuntu-base?

  • Other methods for building embedded file systems include BusyBox, Yocto, and Buildroot.
  • Ubuntu stands out for its:
    • Powerful package management system
    • Strong community support
    • Ability to install software easily with apt-get install
  • Supports multiple architectures: ARM, x86, PowerPC, etc.
  • This guide focuses on ARM-based systems.

3. Getting the Source Code

You have two options:

  1. From MYIR’s disk image: Download the zip file from the 04-sources folder.
  2. From Ubuntu official sources: Use wget to fetch the source code.

Choose the method that fits your needs before starting the build process.

Download From Ubuntu official sources

Procedure Details

  1. Download Ubuntu-base
    sudo wget https://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04-base-arm64.tar.gz
  2. Create a rootfs folder and extract the archive\ (Adjust paths and folder names as needed)
    mkdir rootfs
    tar -xf ubuntu-base-22.04.1-base-arm64.tar.gz -C rootfs/
  3. Check the extracted folder structure
tree -d -L 1 rootfs

Expected structure:

ubuntu_rootfs
├── bin -> usr/bin
├── boot
├── dev
├── etc
├── home
├── lib -> usr/lib
├── media
├── mnt
├── opt
├── proc
├── root
├── run
├── sbin -> usr/sbin
├── snap
├── srv
├── sys
├── tmp
├── usr
└── var

Preparing the chroot Environment

Install the Emulator

cp /usr/bin/qemu-aarch64-static ./rootfs/usr/bin/

If qemu-user-static is not installed:

sudo apt install qemu-user-static

Copy DNS Configuration

cp /etc/resolv.conf ./rootfs/etc/resolv.conf 

Creating a Mount Script

  1. Create the script file and make it executable
    vi ch-mount.sh

Add the following content:

#!/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 mount -o bind /dev/pts ${2}dev/pts
    sudo chroot ${2}
}

function umnt() {
    echo "UNMOUNTING"
    sudo umount ${2}proc
    sudo umount ${2}sys
    sudo umount ${2}dev/pts
    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 1st, 2nd or both parameters were missing"
    echo ""
    echo "1st parameter: -m (mount) OR -u (umount)"
    echo "2nd parameter: full path of rootfs directory (with trailing '/')"
    echo ""
    echo "Example: ch-mount -m /media/sdcard/"
    echo ""
    echo "1st parameter: ${1}"
    echo "2nd...
Read more »