How to flash OpenWrt on an Orange Pi R2S from Linux?

Hi everyone,

I’m trying to replace the factory Ubuntu image that ships with the Orange Pi R2S (RISC‑V) with OpenWrt, but I only have a Linux Mint machine – no Windows. The board has an 8 GB eMMC and no microSD slot; the only way to get into firmware mode is by holding the BOOT button while powering it on. In that state the kernel shows:

USB download gadget / DFU USB download gadget

I’ve downloaded the official OpenWrt images for this board:

  • openwrt-ky-riscv64-x1_orangepi-r2s-ext4-sysupgrade_20250515.img.gz
  • openwrt-ky-riscv64-x1_orangepi-r2s-squashfs-sysupgrade_20250515.img.gz

After un‑compressing I have the .img files.


What I’ve tried

Step Result
Write image to a USB stick with BalenaEtcher and plug it into the blue (USB 3.0 host) port Still boots Ubuntu – USB boot is not working.
Hold BOOT + power via USB‑C, then run dmesg Shows “DFU USB download gadget”.
Run lsusb Device appears as a DFU gadget (ID xxxx:xxxx).
Run sudo dfu-util -l No interfaces listed – nothing is detected.
Try rkdeveloptool No devices found (not Rockchip Maskrom).

The board clearly enters DFU mode, but neither dfu-util nor the Rockchip tools can talk to it.


What I need help with

  1. Is there a Linux‑only method to flash OpenWrt onto this board?

    • If so, what exact command(s) do you use (including any loader files or special flags)?
  2. Does anyone know of a Linux equivalent for the Windows KyDevTool.exe?

    • A CLI/GUI tool that can talk to the “DFU USB download gadget”.
  3. If dfu-util does work, what are the correct alt‑setting numbers or any additional steps required?

  4. Any other open‑source flasher or workaround (e.g., using a virtual machine with Windows) that you have used successfully?


Additional details

  • Host OS: Linux Mint 21 (Ubuntu 22.04 base).
  • dfu-util version: 0.9.
  • Board shows as “DFU USB download gadget” when BOOT is held.
  • eMMC currently boots Ubuntu normally; I want to replace it with OpenWrt.

If anyone from the Orange Pi or OpenWrt community has experience flashing this board on Linux, please share your steps, any scripts, loader files, or useful links.

Thanks in advance!

1 Like

Hey there,
it’s pretty easy actually, since KyDevTool just calls fastboot and nothing more.

  1. Extract KydevTool.zip from OrangePi, we will need the files in the factory subfolder
  2. Download Android SDK Platform Tools for Linux and extract
  3. Connect the board via the USB-A male-to-male cable and plug in the USB-C power while holding the BOOT button
  4. Verify the DFU USB device is present with lsusb and ./fastboot devices
  5. Run these commands (with sudo and paths adjusted as needed):
    ./fastboot stage ../KydevTool/factory/FSBL.bin
    ./fastboot continue
    ./fastboot stage ../KydevTool/factory/u-boot.itb
    ./fastboot continue
    ./fastboot flash gpt ../KydevTool/factory/partition_universal.json
    ./fastboot flash bootinfo ../KydevTool/factory/bootinfo_sd.bin
    ./fastboot flash fsbl ../KydevTool/factory/FSBL.bin
    ./fastboot flash emmc ../../openwrt/openwrt-*.img
    
    Note: it's probably not needed to always flash gpt, bootinfo and fsbl
  6. Unplug the USB-A male-to-male cable, unplug and replug the USB-C power

Note about the bootinfo partition: bootinfo_sd.bin tries to boot from the SD card and falls back to eMMC, bootinfo_emmc.bin probably does vice versa

Enjoy!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.