Skip to main content

Flashing Firmware over Serial

Flashing firmware through the bootloader’s YMODEM serial transfer is handy when your device lacks Ethernet or you’re recovering a bricked Omega2 that can’t boot into Linux.

MethodLink to GuideTypical Transfer Time*
Ethernet (TFTP)Flash Firmware over Ethernet~10 seconds
Serial (YMODEM)you’re here~10–15 minutes

*Measured with a 7 MB firmware image. Time varies with image size and link quality.

Step 1: Gather Requirements

  • Target device: Omega2/2+ with
    • Serial console access (UART0)
    • Reset button (GPIO 38)
  • Host computer with a USB-UART adapter
  • USB cable for power & serial

Step 2: Host Computer Setup

First, ensure your computer has the necessary USB-serial drivers:

Follow the instructions in step 1 of the connecting to serial command line article to install the drivers required to use the serial command line.

Before installing the flashing utilities, install the Homebrew package manager if it isn’t already present. Follow the instructions on the Homebrew website for details.

With Homebrew ready, install lrzsz (YMODEM tools) and minicom:

brew install lrzsz minicom

Next, open Minicom’s configuration menu:

minicom -s

In the Serial port setup menu, set:

  • Bps/Par/Bits to 115200 8N1
  • Hardware Flow Control to No
  • Software Flow Control to No
tip

See the Getting Started with Minicom Guide for more information on using Minicom.

Step 3: Download the Firmware Image

To start, use a browser to navigate to http://repo.onioniot.com/omega2/images/openwrt-23.05/

Next, you'll need to find the firmware for your device:

  • Firmware for Omega2 (OM-O2) and Omega2S (OM-O2S) starts with onion_omega2-
  • Firmware for Omega2+ (OM-O2P) and Omega2S+ (OM-O2SP) starts with onion_omega2p-.

Then, you'll want to select the highest OpenWRT release and the latest build date. This will ensure you're using the very latest available firmware.

Save the chosen image in an easy-to-find folder and note its exact filename.

Step 4: Activate the Bootloader Command Line

Power-cycle the Omega2 while watching the serial console and press the reset button (GPIO 38) to interrupt autoboot.

Make sure the Omega2 device is plugged in to the host computer. Follow the instructions in the "Check for the serial device" section in step 2 of the connecting to serial command line article to find the serial device name.

Use Minicom to connect to the Omega2 command line through serial:

minicom -D <SERIAL-DEVICE-NAME> 115200

Power on the device and press the SW Reset button at the same time.

info

The Reset button on the Omega2 Eval Boards and Omega2 Docks is connected to the active-high FW_RST/GPIO38 pin. Pressing the reset button sends a digital-high signal to the FW_RST/GPIO38 pin.

Autoboot will be disabled and the bootloader command line will be visible in the serial command line output.

Step 5: Prepare for Serial Transfer

At the U-Boot prompt set the baud rate and launch the YMODEM receiver:

setenv baudrate 115200
loady $loadaddr $baudrate

U-Boot will display:

## Ready for binary (ymodem) download to 0x81800000 at 115200 bps...

Step 6: Transfer the Firmware Image (YMODEM)

Start transfer of the file:

  1. In Minicom, press Meta-Z, then S to open the Send File dialog.
  2. Navigate with Space (to enter directories) until you highlight the firmware image.
  3. Press Space to mark the file, then Enter to start the transfer.

During the upload you’ll see a progress bar similar to:

+----------------[ymodem upload - Press CTRL-C to quit]----------------+
|Sending: onion_omega2p-23.05.3-20250121.bin |
|Ymodem sectors/kbytes sent: 12425/1553k |
+----------------------------------------------------------------------+
note

If the transfer is interrupted, rerun loady $loadaddr $baudrate and restart the Minicom upload.

When finished U-Boot reports:

## Total Size      = 0x006d0329 = 7144233 Bytes
## Start Addr = 0x81800000

Step 7: Write the Firmware Image to Flash

sf probe
sf update $loadaddr firmware $filesize

Writing takes 30-45 seconds.

Step 8: Boot into the Firmware

boot

Alternative options:

  • Run reset at the U-Boot prompt
  • Power-cycle the device

Step 9: Confirm Booting

If the process was successful, Omega will boot normally. The boot log will look like the following:

U-Boot SPL 2025.04-ga92da3b468ea (Apr 23 2025 - 19:14:37 +0000)
Trying to boot from NOR


U-Boot 2025.04-ga92da3b468ea (Apr 23 2025 - 19:14:37 +0000)

CPU: MediaTek MT7688A ver:1 eco:2
Boot: DDR2, SPI-NOR 3-Byte Addr, CPU clock from XTAL
Clock: CPU: 580MHz, Bus: 193MHz, XTAL: 40MHz
Model: Onion Omega2+
DRAM: 128 MiB
Core: 52 devices, 13 uclasses, devicetree: separate
Loading Environment from SPIFlash... SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiBB
OK
In: uartlite@c00
Out: uartlite@c00
Err: uartlite@c00
Initializing MT7688 GPIO system.
Net: eth0: eth@10110000
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
Reading 4194304 byte(s) at offset 0x00000000
## Booting kernel from Legacy Image at 81800000 ...
Image Name: MIPS OpenWrt Linux-5.15.150
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2348656 Bytes = 2.2 MiB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Working FDT set to 0
Uncompressing Kernel Image to 80000000
[ 0.000000] Linux version 5.15.150 (builder@buildhost) (mipsel-openwrt-linux-musl-gcc (OpenWrt GC4
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[ 0.000000] MIPS: machine is Onion Omega2+
...