[Release] Custom OpenWrt U-Boot for Xiaomi BE5000 (AN7563)

Overview

This thread provides a custom U-Boot (including BL2 and BL31) for the Xiaomi BE5000.

Note on Compatibility: While the Airoha AN7563 platform is relatively standardized and this bootloader is designed to be generic for the SoC, I have only tested this on Xiaomi BE5000 hardware. If you intend to use this on other AN7563 devices, ensure you have a TTL serial console and a backup ready.

Download from here: https://github.com/xinyooo/openwrt/releases/tag/v2026.05-r2

:warning: Disclaimer

Flashing the bootloader is a high-risk operation. If the process is interrupted or the binary is incompatible, your device will be bricked. Proceed only if you know how to recover via TTL or a hardware programmer. I am not responsible for any damaged hardware.


Prerequisites

  1. Xiaomi BE5000 with SSH access (already unlocked via xmir-patcher or similar methods).

  2. The bootloader binary: openwrt-airoha-an7563-xiaomi_be5000-bl2-bl31-uboot.bin.


Installation Procedure

1. Verify Partition Table

Login via SSH and confirm your bootloader partition exists:

cat /proc/mtd

Look for the partition named "bootloader". Typically it is mtd0, but double-check your output.

2. Backup Stock Bootloader (Recommended)

Before overwriting, save a copy of your original bootloader to /tmp:

dd if=/dev/mtd0 of=/tmp/stock_bootloader.bin

(Replace mtd0 if your bootloader is on a different index.)

3. Flash the New U-Boot

Place the new binary into /tmp (via wget, curl, or your preferred method) and execute:

mtd erase bootloader
mtd write /tmp/openwrt-airoha-an7563-xiaomi_be5000-bl2-bl31-uboot.bin bootloader

4. Reboot

reboot


Post-Flash Info

  • Default U-Boot IP: 192.168.1.1

Feel free to share your results or report issues if you are testing this on other AN7563-based boards!

since this is an unsupported device, here, what's the use case ?

please describe the recovery procedure over TTL if u-boot's b0rked.

Why Custom U-Boot? Transforming the BE5000 from "Unsupported" to "Community Standard"

The release of this custom U-Boot stack (including BL2 and BL31) for the Xiaomi BE5000 is a strategic milestone designed to transition this hardware into a developer-friendly, open-source target.

The Strategic Vision

  • Path to Formal Support: No device reaches "Supported" status in the OpenWrt or upstream community without a reliable, open-source bootloader. This release provides the essential low-level primitives required for the BE5000 to become a first-class open-source citizen.

  • Persistent Failsafe (Web UI): Our primary goal is to establish a Web-based Recovery UI. Once this bootloader is installed, the user no longer needs to disassemble the router for routine debugging or firmware updates. You can safely iterate on sysupgrade binaries; even if a kernel fails, the Failsafe UI allows for a software-only recovery.

  • Hardware Protection: We want to move away from the "Risky Hack" phase. This approach ensures that once the bootloader is in place, the device is shielded from permanent bricks during the iterative development of the OpenWrt firmware.


Technical Recovery Procedure via TTL (Serial)

If the U-Boot environment becomes corrupted, recovery is possible through the SoC's hardware-level bootstrap mode. Since the BE5000 does not have a dedicated boot button for GPIO0, manual hardware intervention is required.

1. Triggering the BootROM (BROM) Mode

In this architecture, "pressing a button" on a development board typically pulls the signal LOW (Short to GND). On the retail BE5000:

  • Action: Locate the GPIO0 pad and short it to Ground (GND) using tweezers or a jumper wire.

  • Power On: While keeping the short in place, power on the device.

  • Handshake: Watch your serial console (115200 8-N-1). When the message press 'x' appears, immediately press 'x' on your keyboard to enter the Xmodem upload mode.

2. The Xmodem Upload Sequence

Once the device is ready, use the Xmodem protocol in your terminal emulator (e.g., Tera Term, Minicom) to upload the files in the following strict order:

  1. Stage 1 (Preloader): Upload openwrt-airoha-an7563-xiaomi_be5000-preloader.bin.

    • This initializes the DRAM and hardware clocks.
  2. Stage 2 (Bootloader Stack): Immediately after the preloader finishes, upload: openwrt-airoha-an7563-xiaomi_be5000-bl2-bl31-uboot.bin

    • This writes the full functional environment to the flash.

3. Finalizing Recovery

Once the transfer is complete and the flash is written, remove the GPIO0 short and reboot the device. The router will now boot into the custom U-Boot, allowing you to access the Web Recovery UI for all future firmware operations without opening the case again.

Guess we should remove all Qualcomm devices from the supported list.

Fair point, and I apologize for the imprecise wording. You’re right that 'unsupported' wasn't the best choice of words here.

What I specifically meant is that by providing this custom U-Boot, we are moving the device toward full bootloader openness and customizability. The main advantages of this approach are:

  • Transparency: Replacing the proprietary, closed-source blobs with a community-driven bootloader stack (BL2/BL31/U-Boot).

  • Safety & Accessibility: The inclusion of a Failsafe Web UI significantly lowers the barrier for other developers to experiment with the BE5000. It turns a 'hardware-intensive' debug process (serial/disassembly) into a 'software-friendly' one.

  • Upstream Readiness: This is essentially the 'bootstrapping' phase to ensure that when the device eventually gets formal support, it has a robust and open foundation.

My goal isn't to gatekeep what 'supported' means, but rather to provide the community with a tool that makes this specific hardware more transparent and easier to recover than the stock configuration.

1 Like

If you don't mind, i see a be5000 firmware in ur github, what's not work in your BE5000 openwrt port ? I don't see any information regarding the ported firmware.
I'm interested to buy this device :smiley:
Thanks

Current firmware is WIP, only support most of SoC driver and basic ethernet LAN, and without NPU, WIFI support.

1 Like