This is a platform agnostic utility used to flash the RZBoard. This utility is used to flash the bootloaders to eMMC or QSPI and system image to eMMC.
Note
Get started with pre-compiled binaries: check out RZBoard's latest releases
This utility is written in python3 with (minimal) dependencies managed using pip.
On Ubuntu, python3 and pip can be installed by running:
sudo apt install -y python3 python3-pip
Mac and Windows can install by using one of the manage package managers for your platform or by downloading an installer from https://www.python.org/downloads/.
git clone https://github.com/Avnet/rzboard_flash_util.git
The script has a couple dependencies that can be installed by running the following:
cd rzboard_flash_util
pip3 install -r requirements.txt
Tip
Running ./flash_rzboard.py -h
will print usage information. A more detailed description of the arguments is detailed below.
Tip
Flashing the bootloaders will require SCIF download mode. See the RZBoard Yocto Build guide, or the following reminder below on how to configure BOOT switches for flashing eMMC. QSPI flashing (for SD card use) requires a different BOOT switch configuration. Remember to turn your RZBoard off before entering SCIF download mode.
The utility can be used to flash the bootloader, rootfs, or both at the same time:
./flash_rzboard.py --bootloader # Flash bootloader to eMMC (includes flash image writer, BL2 image writer, FIP image)
./flash_rzboard.py --bootloader --qspi # Flash bootloader to QSPI
./flash_rzboard.py --rootfs # Flash system image only
./flash_rzboard.py --full # Flash bootloader and system image
By default, the utility uses /dev/ttyUSB0
as the serial port to communicate with the RZBoard. This can be changed with --serial_port
. Additionally the default baud rate of 115200
can be chaged with --serial_port_baud
:
./flash_rzboard --serial_port DESIRED_SERIAL_PORT --serial_port_baud DESIRED_BAUD_RATE
By default, the utility looks for the required images in the directory that flash_rzboard.py
is located. The required images, along with the override flag and default location and name is listed below:
Image | Flag | Default | Description |
---|---|---|---|
Flash Image Writer | --image_writer |
<SCRIPT_DIR>/Flash_Writer_SCIF_rzboard.mot |
Application loaded in to received bootloader images over serial and write to eMMC |
BL2 Image | --image_bl2 |
<SCRIPT_DIR>/bl2_bp-rzboard.srec |
Bootloader |
FIP Image | --image_fip |
<SCRIPT_DIR>/fip-rzboard.srec |
Bootloader, ARM TFA (Trusted Firmware-A) BL31, and u-boot in a combined image |
System Image | --image_rootfs |
<SCRIPT_DIR>/avnet-core-image-rzboard.wic |
Contains the linux kernel, device tree (dtb), and root filesystem (rootfs) in a minimized format. |
NOTE: If only flashing the system image, the image writer, bl2, and FIP images are not required/