Timesys Getting Started Guide for Renesas RSK-RZA1 Kit using XIP


Contents

Introduction

This document will describe in detail the procedures for booting a Linux kernel image and mounting a root file system using XIP on the Renesas RSK-RZA1 XIP.

Prerequisites

Host Requirements

To properly boot a board using software from Timesys, your host machine must meet the following requirements:

  • Modern GNU/Linux Distribution. While you can use nearly any modern Linux distribution released in the last 24 months, Timesys recommends one of the following:
    • Ubuntu (Most recent release or LTS)
    • Fedora (Most recent release)
  • An internet connection on the Development Host.
  • Root or sudo permission on the Development Host.
  • A copy of the Linux Kernel (xipImage-3.14-ts-armv7l) and Root File System (rootfs.axfs) for the Target Board downloaded from Factory. These are found in the output directory of your online build, or in the directory build_armv7l-timesys-linux-<libc>/images/ on the command line.
  • If you are booting your root file system over the network, you will need two network cards installed and configured in the Development Host. One to communicate normally with your LAN/WAN while installing host packages, the other to communicate solely with the target board.
  • An available serial port on your Development Host.

Target Requirements

To boot the Renesas RSK-RZA1 XIP, you will need the following items:

  • Renesas RSK-RZA1 XIP Board
  • Mini USB Cable
  • J-Link Lite cable, and J-Link software installed on the host system.
  • Power Supply

Once you have all of the necessary components, you should perform the following steps:

  1. Connect the mini USB port labeled CN18 to a USB port of your workstation using the mini USB cable.
  2. Connect the J-Link adapter to your host machine via USB, and to the RSK-RZA1 at CN14.
  3. Connect the power supply to your board.

Preparing the Target

Configuring Serial Communication

The RSK-RZA1 uses a serial debug port to communicate with the host machine. The commands discussed in this section are meant to be performed by a privileged user account. This requires the root login or prepending each command with sudo.

Using Minicom

  1. Start minicom on your host machine in configuration mode. As root:

    # minicom -o -s -w

  2. A menu of configuration should appear. Use the Down-arrow key to scroll down and select the Serial port setup option, and press Enter.
  3. Verify that the listed serial port is the same one that is connected to the target board. If it is not, press A, and enter the correct device. This is /dev/ttyACM0 on most Linux distributions.
  4. Set the Bps/Par/Bits option by pressing the letter E and using the next menu to set the appropriate values. You press the key that corresponds to the value 115200, then press Enter.
  5. Set Hardware flow control to No using the F key.
  6. Set Software flow control to No using the G key.
  7. Press Enter to return to the main configuration menu, and then press Esc to exit this menu.
  8. Reset the board, and wait for a moment. If you do not see output from the board, press Enter several times until you see the prompt. If you do not see any output from the board, and have verified that the serial terminal connection is setup correctly, contact your board vendor.

TIP: If you experience an error similar to Device /dev/ttyACM0 is locked when starting minicom, it usually means that another process is using the serial port (which is usually another instance of minicom). You can find the process that is currently using the serial port by executing the following:

# fuser /dev/ttyACM0
/dev/ttyACM0:         28358

# ps 28358
  PID TTY      STAT  TIME COMMAND
  28923 pts/0    S+    0:00 minicom

This process can also be killed directly with fuser as root. Please use this command with caution:

# fuser -k /dev/ttyACM0

Using GNU Screen

To quickly connect to a board using Gnu Screen, execute the following:

# screen /dev/ttyACM0 115200

For more information about using screen, please consult the man page, or view the manual online at http://www.gnu.org/software/screen/manual/screen.html

Loading Images to QSPI Flash

The RZ/A1 RSK kit comes with a Segger Lite JTAG Adapter. You will use this, in conjunction with some additional scripts, to load images onto the RSK-RZ/A1 board.
  1. Download the scripts:

        git clone git://github.com/renesas-rz/rskrza1_bsp

  2. Install the J-Link drivers and applications included in your RSK Kit. You can also download the software directly from Segger: https://www.segger.com/jlink-software.html

  3. Once the J-Link software is installed, you must copy your new images into the script directory (Extra/J-Link_QSPI_Program). Please note that the names must change to match what the script expects.

        cp u-boot.bin rskrza1_bsp/Extra/J-Link_QSPI_Program/u-boot.bin
        cp xipImage-3.14-ts-armv7l rskrza1_bsp/Extra/J-Link_QSPI_Program/xipImage.bin
        cp rsk_rza1_xip.dtb rskrza1_bsp/Extra/J-Link_QSPI_Program/r7s72100-rskrza1.dtb.bin
        cp rootfs.axfs rskrza1_bsp/Extra/J-Link_QSPI_Program/rootfs.axfs.bin

  4. The J-Link_QSPI_Program directory contains scripts for both Linux and Windows. Both scripts perform the same operations and display detailed instructions.

    LINUX: Program_QSPI.sh WINDOWS: Program_QSPI.bat

    You will need to program all of the individual binary images to boot the kernel (except for the fact that you will choose only uImage or xipImage as your kernel binary)

NOTE: Whenever you program the SPI Flash using this method, you will need to remove power from the board to reset it (just using the RESET button will not work). However, you may program multiple images (run the BATCH file multiple times) without having to power cycle between each program session.

Preparing the Host

No additional host setup is required for booting using XIP.

Booting the Board

Set Environment Variables

You must set a few environment variables in order to boot using XIP images. On the target, set the following environment variables:

Variable Value
bootcmd run xa_boot

Example

> setenv bootcmd run xa_boot
> saveenv

Boot the Kernel

The command for running in XIP mode is built in to U-Boot, so you simply need to run run xa_boot to boot the board.

Example

=> run xa_boot
SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB
SF: 8192 bytes @ 0xc0000 Read: OK
Current Mode: Read Mode (3-byte Addr)
SF: Dual SPI mode
SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB
New Mode: Quad I/O Read Mode (4-byte Addr)
Booting Linux...
Booting Linux on physical CPU 0x0

Additional Information

Factory Documentation