Skip to content

How To Build Linux BSP Plus for RZ/T,N

Introduction

This page explains how to build Linux BSP Plus source code.

Requirement

  1. To build Linux BSP Plus (Yocto Linux), the equipment below should be prepared.

    Equipment

    Details

    Linux PC

    Approximately 100GB free space is necessary.

    OS

    Ubuntu 22.04 LTS

    64bit OS must be used.

Requirement

  1. To build Linux BSP Plus (Yocto Linux), the equipment below should be prepared.

    Equipment

    Details

    Linux PC

    Approximately 100GB free space is necessary.

    OS

    Ubuntu 22.04 LTS

    64bit OS must be used.

Requirement

  1. To build Linux BSP Plus (Yocto Linux), the equipment below should be prepared.

    Equipment

    Details

    Linux PC

    Approximately 100GB free space is necessary.

    OS

    Ubuntu 22.04 LTS

    64bit OS must be used.

Note

A pre-built Linux image generated using the same procedure is provided.
If you wish to use it, please download it from the link below.
Both Realtime Linux Kernel and Non-Realtime Linux Kernel images are available.

The pre-built Linux images may occasionally fail to boot due to an issue in the USB2 PHY driver.
A fix is already available in the source code. If this issue affects your evaluation, please rebuild the image with the fix applied by following the build procedure below.

Step 1: Build Renesas RZ Linux BSP Plus source code

This step explains how to build Linux environment with Renesas RZ Linux BSP Plus source code.

Note

In the following instructions, text in angle brackets should be replaced with a character string that depends on your environment.

The brackets < and > are unnecessary in the text.

  1. Install the required packages

    Install some packages into your Linux PC, which are necessary in the following steps.

    sudo apt-get update
    sudo apt install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd bmap-tools
    pip3 install --user kas
    

  2. Set up your git environment

    Set up your git environment if you have never done it.

    git config --global user.email "<Your email address>"
    git config --global user.name "<Your user name>"
    

    Note

    For more information, refer to Yocto Project Quick Build.

  3. Set environment variables

    Set the following environment variables.

    export WORK=<A directory path for building>
    export BOARD=rzt2h-dev
    

    export WORK=<A directory path for building>
    export BOARD=rzn2h-dev
    

    export WORK=<A directory path for building>
    export BOARD=rzt2n-dev
    

  4. Clone Yocto recipe package

    Create a working directory, and clone Yocto recipe package.

    mkdir ${WORK}
    cd ${WORK}
    

    git clone https://github.com/renesas-rz/meta-renesas
    cd meta-renesas
    git checkout -b tmp BSP-PLUS-K6.12-V3.0
    cd ../
    kas checkout meta-renesas/kas/base.yml
    

    git clone https://github.com/renesas-rz/meta-renesas
    cd meta-renesas
    git checkout -b tmp BSP-PLUS-K6.12-V3.0
    cd ../
    kas checkout meta-renesas/kas/base.yml
    

    git clone https://git.yoctoproject.org/git/poky
    cd poky
    git checkout -b tmp 7e8674996b0164b07e56bc066d0fba790e627061
    git cherry-pick 80593d0ce1 e6cbef9080 e380eea705 bf7d623729 3bcac51eb2 fb693aab03
    cd ${WORK}
    

    git clone https://git.yoctoproject.org/meta-arm
    cd meta-arm
    git checkout -b tmp 8e0f8af90fefb03f08cd2228cde7a89902a6b37c
    cd ${WORK}
    

    git clone https://git.openembedded.org/meta-openembedded
    cd meta-openembedded
    git checkout -b tmp 89a01c3d9ad1f8fce6aeb4dd0e694cfa28d42099
    cd ${WORK}
    

    git clone https://github.com/renesas-rz/meta-renesas
    cd meta-renesas
    git checkout -b tmp RZT2N-BSP-1.0.0
    cd ${WORK}
    

  5. Initialize build environment

    Run an environment setup script as follows.

    cd ${WORK}
    TEMPLATECONF=${PWD}/meta-renesas/meta-rz-distro/conf/templates/vlp-v5-conf/ source poky/oe-init-build-env build
    

  6. Enable the command for writing a boot image to eMMC

    If you need to create the filesystem for the block devices on the evaluation board, please add bmaptool command sets to root filesystem by local.conf.

    Caution

    If eMMC boot is required, this step is mandatory.

    cd ${WORK}/build
    echo 'IMAGE_INSTALL:append = " bmaptool"'>> conf/local.conf
    

  7. Enable Real-time Linux kernel (optional)

    If you need to build a Real-time Linux kernel, please configure the build to use the RT kernel recipe.

    cd ${WORK}/build
    echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-renesas-rt"'>> conf/local.conf
    echo 'PREFERRED_VERSION_linux-renesas-rt = "6.12%"'>> conf/local.conf
    

    cd ${WORK}/build
    echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-renesas-rt"'>> conf/local.conf
    echo 'PREFERRED_VERSION_linux-renesas-rt = "6.12%"'>> conf/local.conf
    

    cd ${WORK}/build
    echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-renesas-rt"'>> conf/local.conf
    echo 'PREFERRED_VERSION_linux-renesas-rt = "6.12%"'>> conf/local.conf
    

  8. Build images

    Run bitbake command to build images.

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-minimal
    

    Note

    After building images, you can find them in the following directories.

    • Images: ${WORK}/build/tmp/deploy/images/${BOARD}/

    Device

    Category

    File name

    RZ/T2H

    Linux kernel

    Image-rzt2h-dev.bin

    Device tree file

    r9a09g077m44-dev.dtb

    Root filesystem

    core-image-minimal-rzt2h-dev.rootfs.tar.bz2

    Boot loader

    • bl2_bp_esd-rzt2h-dev.bin
    • bl2_bp_emmc-rzt2h-dev.srec
    • bl2_bp_xspi0-rzt2h-dev.srec
    • fip-rzt2h-dev.srec

    Flash Programmer

    • HDR NM
    • Flash_Programmer_SCIF_CR52_RZT2H_EVK.mot

    SD image (wic)

    • core-image-minimal-rzt2h-dev.rootfs.wic.gz
    • core-image-minimal-rzt2h-dev.rootfs.wic.bmap

    Note

    If you need to create an SDK toolchain, run bitbake command as follows.

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-minimal -c populate_sdk
    

    After building SDK toolchain, you can find them in the following directory.

    ${WORK}/build/tmp/deploy/sdk/
    

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-minimal
    

    Note

    After building images, you can find them in the following directories.

    • Images: ${WORK}/build/tmp/deploy/images/${BOARD}/

    Device

    Category

    File name

    RZ/N2H

    Linux kernel

    Image-rzn2h-dev.bin

    Device tree file

    r9a09g087m44-dev.dtb

    Root filesystem

    core-image-minimal-rzn2h-dev.rootfs.tar.bz2

    Boot loader

    • bl2_bp_esd-rzn2h-dev.bin
    • bl2_bp_emmc-rzn2h-dev.srec
    • bl2_bp_xspi0-rzn2h-dev.srec
    • fip-rzn2h-dev.srec

    Flash Programmer

    • HDR NM
    • Flash_Programmer_SCIF_CR52_RZT2H_EVK.mot

    SD image (wic)

    • core-image-minimal-rzn2h-dev.rootfs.wic.gz
    • core-image-minimal-rzn2h-dev.rootfs.wic.bmap

    Note

    If you need to create an SDK toolchain, run bitbake command as follows.

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-minimal -c populate_sdk
    

    After building SDK toolchain, you can find them in the following directory.

    ${WORK}/build/tmp/deploy/sdk/
    

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-minimal
    

    Note

    After building images, you can find them in the following directories.

    • Images: ${WORK}/build/tmp/deploy/images/${BOARD}/

    Device

    Category

    File name

    RZ/T2N

    Linux kernel

    Image-rzt2n-dev.bin

    Device tree file

    r9a07g076-dev.dtb

    Root filesystem

    core-image-minimal-rzt2n-dev.rootfs.tar.bz2

    Boot loader

    • bl2_bp_esd-rzt2n-dev.bin
    • bl2_bp_emmc-rzt2n-dev.srec
    • bl2_bp_xspi0-rzt2n-dev.srec
    • fip-rzt2n-dev.srec

    Flash Programmer

    • HDR NM
    • Flash_Programmer_SCIF_CR52_RZT2N_EVK.mot

    SD image (wic)

    • core-image-minimal-rzt2n-dev.rootfs.wic.gz
    • core-image-minimal-rzt2n-dev.rootfs.wic.bmap

    Note

    If you need to create an SDK toolchain, run bitbake command as follows.

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake core-image-minimal -c populate_sdk
    

    After building SDK toolchain, you can find them in the following directory.

    ${WORK}/build/tmp/deploy/sdk/
    

    Note

    Refer to the RZ/T2N Group DDR Design Contents available on the Renesas website. Follow the accompanying guide to generate an ECC-enabled DDR memory initialization parameter file, and integrate the generated file into the build environment.

    Note

    If you need the Flash Programmer source code, please download and use it from the link below.
    RZ MPU Flash Programmer Source Code

Step 2: Additional Feature Packages (optional)

There are some additional feature packages for RZ Linux BSP Plus as follows.

Please obtain the necessary files from the following links according to the features you wish to add. For instructions on how to integrate the packages, refer to the documentation included in the downloaded files or, in the case of Git, the README.

  • Security package


    This package is to add Security functions such as Secure Boot, Trusted Execution Environment, Hardware Cryptographic IP, Secure Debug and Security Configurator to RZ MPU. Provided functions are different for each device. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Security package

    Note

    Renesas' approval is required to obtain the security package. Please apply using the form at the link.

  • Multi-OS package


    This package is the software package consisting of RZ/T and RZ/N Flexible Software Package (FSP) as software package for Renesas MCU with Arm Cortex-R Core or and Cortex-A Core, and OpenAMP as standardization API of framework for interprocessor communication for developing multi OS solution.

    Get Multi-OS package

  • Time-sensitive Network Package


    This package includes examples for using Time-sensitive Network which is a set of networking technologies designed to enable real-time communication over Ethernet. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Time-sensitive Network Package

  • XDP Package


    This package includes examples for using XDP which is a packet processing framework within the Linux kernel. XDP enables efficient and low-latency packet processing. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get XDP Package

  • Industrial Network Package


    This package provides examples for industrial communication protocols and related software frameworks, including EtherCAT, OPC UA, Modbus TCP, EtherNet/IP, and PROFINET. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Industrial Network Package

  • Openplc Package


    This package provides instructions for installing OpenPLC and the OpenPLC Runtime on a Windows PC and the evaluation board. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Openplc Package

  • CODESYS Package


    This package provides instructions for installing CODESYS and the CODESYS Runtime on a Windows PC and the evaluation board. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get CODESYS Package

  • Security package


    This package is to add Security functions such as Secure Boot, Trusted Execution Environment, Hardware Cryptographic IP, Secure Debug and Security Configurator to RZ MPU. Provided functions are different for each device. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Security package

    Note

    Renesas' approval is required to obtain the security package. Please apply using the form at the link.

  • Multi-OS package


    This package is the software package consisting of RZ/T and RZ/N Flexible Software Package (FSP) as software package for Renesas MCU with Arm Cortex-R Core or and Cortex-A Core, and OpenAMP as standardization API of framework for interprocessor communication for developing multi OS solution.

    Get Multi-OS package

  • Time-sensitive Network Package


    This package includes examples for using Time-sensitive Network which is a set of networking technologies designed to enable real-time communication over Ethernet. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Time-sensitive Network Package

  • XDP Package


    This package includes examples for using XDP which is a packet processing framework within the Linux kernel. XDP enables efficient and low-latency packet processing. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get XDP Package

  • Industrial Network Package


    This package provides examples for industrial communication protocols and related software frameworks, including EtherCAT, OPC UA, Modbus TCP, EtherNet/IP, and PROFINET. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Industrial Network Package

  • Openplc Package


    This package provides instructions for installing OpenPLC and the OpenPLC Runtime on a Windows PC and the evaluation board. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get Openplc Package

  • CODESYS Package


    This package provides instructions for installing CODESYS and the CODESYS Runtime on a Windows PC and the evaluation board. For more datails, please refer to the documentation included in the package. This package is also compatible with Verified Linux Package v5.0.0. When using Linux BSP Plus, replace the package name in the document accordingly.

    Get CODESYS Package

  • Security package


    This package is to add Security functions such as Secure Boot, Trusted Execution Environment, Hardware Cryptographic IP, Secure Debug and Security Configurator to RZ MPU. Provided functions are different for each device. For more datails, please refer to the documentation included in the package.

    Get Security package

    Note

    Renesas' approval is required to obtain the security package. Please apply using the form at the link.

  • Multi-OS package


    This package is the software package consisting of RZ/T and RZ/N Flexible Software Package (FSP) as software package for Renesas MCU with Arm Cortex-R Core or and Cortex-A Core, and OpenAMP as standardization API of framework for interprocessor communication for developing multi OS solution.

    Get Multi-OS package

  • Time-sensitive Network Package


    This package includes examples for using Time-sensitive Network which is a set of networking technologies designed to enable real-time communication over Ethernet. For more datails, please refer to the documentation included in the package.

    Get Time-sensitive Network Package

  • XDP Package


    This package includes examples for using XDP which is a packet processing framework within the Linux kernel. XDP enables efficient and low-latency packet processing. For more datails, please refer to the documentation included in the package.

    Get XDP Package

  • Industrial Network Package


    This package provides examples for industrial communication protocols and related software frameworks, including EtherCAT, OPC UA, Modbus TCP, EtherNet/IP, and PROFINET. For more datails, please refer to the documentation included in the package.

    Get Industrial Network Package

  • OpenPLC Package


    This package provides instructions for installing OpenPLC and the OpenPLC Runtime on a Windows PC and the evaluation board. For more datails, please refer to the documentation included in the package.

    Get OpenPLC Package

  • CODESYS Package


    This package provides instructions for installing CODESYS and the CODESYS Runtime on a Windows PC and the evaluation board. For more datails, please refer to the documentation included in the package.

    Get CODESYS Package

Back to the Getting Started >