Skip to content

How To Build Linux BSP Plus

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 110GB free space is necessary.

    OS

    Ubuntu 22.04 LTS

    64bit OS must be used.

Step 1: Obtain Renesas RZ Linux BSP Plus source code

Note

Renesas RZ Linux BSP Plus (Yocto Linux) source code is available from GitHub repository.

How to get the source code is explained in the next step.

Regarding Graphics and Video Codecs packages, please download from Renesas.com website.

Get Graphics package

Get Video Codecs package

Once downloaded, please check the Release Note included inside each package.

Get Graphics package

* RZ/G2LC does not support Video Codecs package.

Once downloaded, please check the Release Note included inside each package.

* RZ/G2UL does not support Graphics and Video Codecs packages. Please skip this step.

* RZ/G3S does not support Graphics and Video Codecs packages. Please skip this step.

Step 2: 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-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping libsdl1.2-dev xterm p7zip-full libyaml-dev libssl-dev bmap-tools
    

  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=smarc-rzg2l
    

    export WORK=<A directory path for building>
    export BOARD=smarc-rzg2lc
    

    export WORK=<A directory path for building>
    export BOARD=smarc-rzg2ul
    

    export WORK=<A directory path for building>
    export BOARD=smarc-rzg3s
    

  4. Clone Yocto recipe package

    Create a working directory, and clone Yocto recipe package.

    mkdir ${WORK}
    cd ${WORK}
    

    git clone https://git.yoctoproject.org/git/poky
    cd poky
    git checkout -b tmp ae2d52758fc2fcb0ed996aa234430464ebf4b310
    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 c29a18fa39ede952f3f6108ec007c1906e2d9a0d
    cd ${WORK}
    

    git clone https://github.com/renesas-rz/meta-renesas
    cd meta-renesas
    git checkout -b tmp BSP-PLUS-K6.12-V2.0
    cd ${WORK}
    

  5. Enable Graphics and Video Codec

    The graphics package and the video codec package can be used at the same time, or just one of the packages can be used individually.

    Note

    You need to download Graphics and Video Codec packages for this step.

    See Step 1: Obtain Renesas RZ Linux BSP Plus source code.

    Graphics package is RTK0EF0045Z14001ZJ-*.zip.

    Video Codec package is RTK0EF0045Z16002ZJ_*.zip.

    • Graphics package

      Note

      If you want to enable the Graphics on RZ/G2L when building core-image-weston, please copy the Graphics package to working directory and run the commands below.

      If you build core-image-minimal, please ignore this step.

      After copying the Graphics package, please extract the package as below.

      cd ${WORK}
      unzip ./RTK0EF0045Z14001ZJ-*.zip
      tar zxvf ./RTK0EF0045Z14001ZJ-*/meta-rz-features_graphics_*.tar.gz
      

    • Video Codec package

      After copying the Video Codec package, please extract the package as below.

      cd ${WORK}
      unzip ./RTK0EF0045Z16002ZJ_*.zip
      tar zxvf ./RTK0EF0045Z16002ZJ_*/meta-rz-features_codec_*.tar.gz
      

    Graphics package is RTK0EF0045Z14001ZJ-*.zip.

    • Graphics package

      Note

      If you want to enable the Graphics on RZ/G2LC when building core-image-weston, please copy the Graphics package to working directory and run the commands below.

      If you build core-image-minimal, please ignore this step.

      After copying the Graphics package, please extract the package as below.

      cd ${WORK}
      unzip ./RTK0EF0045Z14001ZJ-*.zip
      tar zxvf ./RTK0EF0045Z14001ZJ-*/meta-rz-features_graphics_*.tar.gz
      

    * RZ/G2LC does not support Video Codecs package.

    * RZ/G2UL does not support Graphics and Video Codecs packages.

    * RZ/G3S does not support Graphics and Video Codecs packages.

  6. Initialize build environment

    Run an environment setup script as follows.

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

  7. Add layers

    Add necessary Yocto meta-layers layer as follows.

    • Graphics: Please run the command below if you need the Graphics library.

      cd ${WORK}/build
      bitbake-layers add-layer ../meta-rz-features/meta-rz-graphics
      

    • Video Codec: Please run the command below if you need the video codec library.

      cd ${WORK}/build
      bitbake-layers add-layer ../meta-rz-features/meta-rz-codecs
      

    • Graphics: Please run the command below if you need the Graphics library.

      cd ${WORK}/build
      bitbake-layers add-layer ../meta-rz-features/meta-rz-graphics
      

    Not Applicable

    Not Applicable

  8. Enable mke2fs (Make Extended Filesystem) command sets

    If you need to create the filesystem for the block devices on the evaluation board, please add mke2fs 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 = " e2fsprogs-mke2fs"'>> conf/local.conf
    

  9. Build images

    Run bitbake command to build images.

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake <image name>
    

    Note

    Available build options (<image name>) are:

    • core-image-minimal
    • core-image-weston

    Note

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

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

    Device

    Category

    File name

    RZ/G2L













    Linux kernel

    Image-smarc-rzg2l.bin

    Device tree file

    r9a07g044l2-smarc.dtb

    Root filesystem

    <image name>-smarc-rzg2l.rootfs.tar.bz2

    Boot loader


    • bl2_bp_esd-smarc-rzg2l_pmic.bin
    • bl2_bp_mmc-smarc-rzg2l_pmic.srec
    • bl2_bp_spi-smarc-rzg2l_pmic.srec
    • fip-smarc-rzg2l_pmic.srec

    Flash Writer

    Flash_Writer_SCIF_RZG2L_SMARC_PMIC_DDR4_2GB_1PCS.mot

    SD image (wic)

    • <image name>-smarc-rzg2l.rootfs.wic.gz
    • <image name>-smarc-rzg2l.rootfs.wic.bmap

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake <image name>
    

    Note

    Available build options (<image name>) are:

    • core-image-minimal
    • core-image-weston

    Note

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

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

    Device

    Category

    File name

    RZ/G2LC













    Linux kernel

    Image-smarc-rzg2lc.bin

    Device tree file

    r9a07g044l2-smarc.dtb

    Root filesystem

    <image name>-smarc-rzg2lc.rootfs.tar.bz2

    Boot loader


    • bl2_bp_esd-smarc-rzg2lc_pmic.bin
    • bl2_bp_mmc-smarc-rzg2lc_pmic.srec
    • bl2_bp_spi-smarc-rzg2lc_pmic.srec
    • fip-smarc-rzg2lc_pmic.srec

    Flash Writer

    Flash_Writer_SCIF_RZG2LC_SMARC_PMIC_DDR4_2GB_1PCS.mot

    SD image (wic)

    • <image name>-smarc-rzg2lc.rootfs.wic.gz
    • <image name>-smarc-rzg2lc.rootfs.wic.bmap

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake <image name>
    

    Note

    Available build options (<image name>) are:

    • 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/G2UL













    Linux kernel

    Image-smarc-rzg2ul.bin

    Device tree file

    r9a07g044l2-smarc.dtb

    Root filesystem

    <image name>-smarc-rzg2ul.rootfs.tar.bz2

    Boot loader


    • bl2_bp_esd-smarc-rzg2ul_pmic.bin
    • bl2_bp_mmc-smarc-rzg2ul_pmic.srec
    • bl2_bp_spi-smarc-rzg2ul_pmic.srec
    • fip-smarc-rzg2ul_pmic.srec

    Flash Writer

    Flash_Writer_SCIF_RZG2UL_SMARC_PMIC_DDR4_2GB_1PCS.mot

    SD image (wic)

    • <image name>-smarc-rzg2ul.rootfs.wic.gz
    • <image name>-smarc-rzg2ul.rootfs.wic.bmap

    cd ${WORK}/build
    MACHINE=${BOARD} bitbake <image name>
    

    Note

    Available build options (<image name>) are:

    • 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/G3S













    Linux kernel

    Image-smarc-rzg3s.bin

    Device tree file

    r9a07g044l2-smarc.dtb

    Root filesystem

    <image name>-smarc-rzg3s.rootfs.tar.bz2

    Boot loader


    • bl2_bp_esd-smarc-rzg3s_pmic.bin
    • bl2_bp_mmc-smarc-rzg3s_pmic.srec
    • bl2_bp_spi-smarc-rzg3s_pmic.srec
    • fip-smarc-rzg3s_pmic.srec

    Flash Writer

    Flash_Writer_SCIF_RZG3S_SMARC_PMIC_DDR4_2GB_1PCS.mot

    SD image (wic)

    • <image name>-smarc-rzg3s.rootfs.wic.gz
    • <image name>-smarc-rzg3s.rootfs.wic.bmap

Step 3: 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.

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

    Get Security package

  • Multi-OS package

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

    Get Multi-OS package

  • Security package

    Security package for RZ/G2LC is expected to be available in 2025/Oct.

  • Multi-OS package

    Multi-OS package for RZ/G2LC is expected to be available in 2025/Nov.

  • Security package

    Security package for RZ/G2UL is expected to be available in 2025/Oct.

  • Multi-OS package

    Multi-OS package for RZ/G2UL is expected to be available in 2025/Nov.

  • Security package

    Security package for RZ/G3S is expected to be available in 2025/Oct.

  • Multi-OS package

    Multi-OS package for RZ/G3S is expected to be available in 2025/Nov.