Skip to main content

Flash System Image to UFS

This guide explains how to flash a system image to UFS storage using a USB Type-A to Type-A cable.

Prerequisites

  1. Install the UFS module into the board's eMMC & UFS combo card slot

  2. Put the board into EDL mode and connect it to your computer using a USB Type-A to Type-A cable --> Refer to the Entering EDL Mode guide

  3. Set up the EDL tool environment --> Refer to the Using EDL Tool guide

Download System Image

You need to visit the Downloads page to download the latest system image.

Image Note

The downloaded system image is a compressed file and needs to be extracted before use!

Flash System via USB

You need to copy the extracted system image file to the SPI boot firmware's \flat_build\spinor\dragon-q6a\ directory, then open a terminal in that folder and run the following command to flash the system image:

radxa@dragon-q6a$
# Method 1: Flash using rawprogram XML files (recommended)
edl-ng --loader <path-to-loader> --memory <storage-type> rawprogram rawprogram*.xml patch*.xml

# Method 2: Write raw sectors directly
edl-ng --loader <path-to-loader> --memory <storage-type> write-sector <start-sector> <path-to-image-file>

Parameter Description:

  • <path-to-loader>: Path to the bootloader, replace with the actual bootloader path.

  • <storage-type>: Storage type, replace with the actual storage type.

  • <start-sector>: Starting sector, replace with the actual starting sector.

  • <path-to-image-file>: Path to the system image file, replace with the actual system image file path.

Example:

edl-ng --loader prog_firehose_ddr.elf --memory ufs write-sector 0 radxa-dragon-q6a_noble_kde_t4.output_4096.img

How to tell whether flashing succeeded

After you run edl-ng ... rawprogram ..., the terminal will show the write progress for each partition. If flashing succeeds, you should see output similar to:

radxa@radxa-dragon-q6a:~$ sudo edl-ng --hostdev-as-target /dev/mtd0 rawprogram rawprogram0.xml patch0.xml
05:22:17.239 [INFO] Operating in host device mode (direct MTD access)
05:22:17.239 [INFO] — Processing LUN 0 using rawprogram0.xml —
05:22:17.241 [INFO] Host device initialized: /dev/mtd0
05:22:17.241 [INFO] Device size: 32.00 MiB (33554432 bytes)
05:22:17.242 [INFO] Erase block size: 4096 bytes
Writing cdt (cdt.bin): 100.0% ( 0.00 / 0.00 MiB) [N/A ]
Writing XBL (xbl.elf): 100.0% ( 0.80 / 0.80 MiB) [98.49 KiB/s]
Writing XblRamdump (XblRamdump.elf): 100.0% ( 0.19 / 0.19 MiB) [99.37 KiB/s]
Writing XBL_CONFIG (xbl_config.elf): 100.0% ( 0.31 / 0.31 MiB) [99.11 KiB/s]
Writing UEFI (uefi.elf): 100.0% ( 4.51 / 4.51 MiB) [99.45 KiB/s]
Writing AOP (aop.mbn): 100.0% ( 0.20 / 0.20 MiB) [97.24 KiB/s]
Writing TZ (tz.mbn): 100.0% ( 3.98 / 3.98 MiB) [97.76 KiB/s]
Writing DEVCFG (devcfg.mbn): 100.0% ( 0.05 / 0.05 MiB) [97.40 KiB/s]
Writing HYP (hypvm.mbn): 100.0% ( 1.46 / 1.46 MiB) [98.65 KiB/s]
Writing QUP (qupv3fw.elf): 100.0% ( 0.05 / 0.05 MiB) [103.01 KiB/s]
Writing CPUCP (cpucp.elf): 100.0% ( 0.18 / 0.18 MiB) [99.78 KiB/s]
Writing SHRM (shrm.elf): 100.0% ( 0.04 / 0.04 MiB) [102.88 KiB/s]
Writing ImageFv (imagefv.elf): 100.0% ( 0.02 / 0.02 MiB) [107.93 KiB/s]
05:24:19.602 [ERROR] Error: Image file '/home/radxa/Downloads/flat_build/spinor/dragon-q6a/fat12test.bin' for (Label: FATTEST) not found. Skipping this file.
Writing PrimaryGPT (gpt_main0.bin): 100.0% ( 0.02 / 0.02 MiB) [100.22 KiB/s]
Writing BackupGPT (gpt_backup0.bin): 100.0% ( 0.02 / 0.02 MiB) [100.70 KiB/s]
05:24:20.041 [INFO] — Patching LUN 0 using patch0.xml —
05:24:20.490 [INFO] 'rawprogram' command finished in 123.25s.
05:24:20.490 [INFO] 'rawprogram' command finished successfully.
radxa@radxa-dragon-q6a:~$

If you see output like this and it shows command finished successfully at the end, the image write is complete.

Note

If you see Error: Image file ... not found but it still shows command finished successfully at the end, you can ignore this error - it's just because some optional partition files don't exist.

Common failure signs

If the terminal doesn't show command finished successfully, or instead prints errors such as Error: / Operation Error: / IO Error: / Platform Error:, then the flash did not complete successfully. Common examples include:

Error: Input file '/path/to/image.img' not found.
Error: Sector range exceeds supported bounds.
An unexpected error occurred in 'write-sector': <specific error message>

If flashing fails, first check:

  1. Whether the board has actually entered EDL mode.
  2. Whether the prog_firehose_ddr.elf path is correct.
  3. Whether the storage type matches the target media (for example ufs, Sdcc --slot 0, or nvme).
  4. Whether the image file has been fully extracted and the path is correct.
  5. Whether the USB data cable and the board-to-host connection are stable.

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0