For developers and hobbyists working with Allwinner SoC-based devices like the sunxi-tools
an essential command-line suite for low-level hardware manipulation
. While natively built for Linux, using these tools on Windows is a popular way to avoid the USB mounting issues often found in virtual machines when flashing firmware. Key Utilities in the Suite
The Windows version of sunxi-tools provides several critical functions for board configuration:
: The primary tool for communicating with the Allwinner BROM over USB. It allows you to put devices into
to load SPL (Secondary Program Loader), read/write memory, or flash SPI storage. sunxi-fexc (fex2bin / bin2fex)
: A compiler/decompiler for Allwinner's hardware description files. It converts human-readable files into the binary format used by legacy kernels.
: Used to manipulate and debug GPIO (General Purpose Input/Output) settings directly. sunxi-bootinfo
: Dumps technical information from Allwinner boot headers to help identify firmware versions or DRAM settings. Setting Up on Windows Because sunxi-tools depends on
, standard Windows drivers often won't recognize the device in FEL mode. Driver Installation Zadig USB tool to replace the default driver with libusb-win32 for the detected Allwinner device. Binary Acquisition : While you can find pre-compiled versions on , many users prefer compiling from source using Code::Blocks to ensure compatibility with the latest SoC versions. FEL Mode Activation
: Most boards require holding a specific physical button (often labeled "UBOOT" or "Recovery") during power-on to be detected by the Common Use Cases Firmware Recovery
: Rescuing "bricked" devices that cannot boot from an SD card by pushing a minimal bootloader over USB. Hardware Tweaking : Modifying script.bin
to change CPU voltages, DRAM timings, or HDMI settings without re-imaging the entire system. NAND Partitioning sunxi-nand-part
to reconfigure internal storage on older Allwinner tablets or development boards. to flash a specific board? sunxi-tools windows
Sunxi-Tools for Windows: A Comprehensive Guide to Allwinner Device Management
If you work with Allwinner-based single-board computers like the Orange Pi, Banana Pi, or Pine64, you likely need sunxi-tools to manage hardware configurations and low-level flashing. While these utilities are native to Linux, Windows users can still harness their power to modify script.bin files or interact with devices in FEL mode. What are Sunxi-Tools?
sunxi-tools is a collection of command-line utilities designed for devices based on the Allwinner SoC (System on Chip) family. Key utilities include:
sunxi-fexc (fex2bin/bin2fex): Compiles or decompiles the binary hardware description files (.bin) used by Allwinner kernels into human-readable text (.fex).
sunxi-fel: A powerful tool for interacting with the processor's low-level bootrom (FEL mode) via USB. It allows you to boot over USB OTG or program SPI flash without a functional OS.
sunxi-bootinfo: Dumps information from Allwinner boot headers (boot0/boot1).
sunxi-nand-part: Manages NAND partition tables on Allwinner devices. How to Get Sunxi-Tools on Windows
There is no "official" Windows installer, so users typically choose one of three paths: 1. Using Pre-Compiled Binaries
For a quick setup, you can find community-contributed Windows builds of specific tools like fexc.exe.
Source: Repositories like J-Rios/Sunxi-Tools-Win-src often provide ready-to-use binaries for basic tasks like FEX conversion.
Usage: Place your script.bin in the tool folder and run provided batch files like bin2fex.bat. 2. Installing via WSL (Recommended)
The most stable way to run the full suite is through the Windows Subsystem for Linux (WSL). Sunxi-tools - GitHub
The sunxi-tools suite is an essential open-source toolkit for developers and hobbyists working with Allwinner "sunxi" SoCs (like those in Orange Pi, Pine64, or Lichee Pi). While natively designed for Linux, a Windows version exists, though it comes with unique setup hurdles. Core Functionality Title: Working with Allwinner Devices on Windows: A
The Windows port typically bundles the most critical utilities from the linux-sunxi/sunxi-tools repository:
sunxi-fel: The "star" of the suite. It communicates with the CPU's internal BootROM (FEL mode) via USB to boot from RAM, flash SPI storage, or read/write memory.
fex2bin / bin2fex: Compilers for .fex files (Allwinner’s legacy hardware configuration format).
sunxi-bootinfo: Useful for inspecting the headers of Allwinner bootloader files. Windows Performance & UX
Using these tools on Windows is a mixed bag of powerful low-level access and driver frustration. Pros:
Portability: Allows you to unbrick or flash Allwinner devices without needing a full Linux environment or VM.
Batch Integration: Tools like J-Rios/Sunxi-Tools-Win include .bat scripts that simplify compiling complex boot configurations.
Lightweight: The binaries are tiny and require no formal installation beyond driver setup. Cons:
Driver Complexity: This is the biggest hurdle. You must use Zadig to replace the default Windows USB driver with WinUSB or libusb-win32 for sunxi-fel to recognize the device.
Remote Limitations: It is known to struggle with device detection when used through Remote Desktop or terminal-server sessions due to how USB redirection is handled.
Incomplete Port: Some newer features (like specific NAND image builders) are occasionally omitted from Windows builds or break during compilation due to Linux-specific dependencies. Final Verdict
For Windows users, sunxi-tools is a "must-have but handle with care" utility. It is indispensable for low-level "fel" mode operations that GUI tools like PhoenixSuit can't handle. However, if you are doing heavy development, using these tools via WSL2 (with USBIPD for device attachment) often provides a more stable and feature-complete experience than the standalone Windows .exe versions. J-Rios/Sunxi-Tools-Win-src - GitHub
Title: Working with Allwinner Devices on Windows: A Guide to sunxi-tools Launch MSYS2 MinGW64 from the Start Menu
Body:
If you're tinkering with Allwinner SoCs (like the A20, H3, H5, or V3s) on SBCs such as the Orange Pi, Banana Pi, or C.H.I.P., you've probably heard of sunxi-tools. This suite is essential for low-level operations—things like flashing bootloaders directly to NAND, generating secure boot images, or poking FEL mode.
But here's the catch: sunxi-tools is a native Linux tool. So what do you do when your daily driver is Windows?
The Short Answer: You have three solid options.
pacman -Syu
(Close and reopen the terminal if prompted.)pacman -S mingw-w64-x86_64-gcc make git libusb pkg-config
git clone https://github.com/linux-sunxi/sunxi-tools
cd sunxi-tools
make cross=mings-w64- CC=gcc
Note: The Makefile might require adjustments. If you get errors, force the toolchain:
make CC=gcc CROSS_COMPILE=
sunxi-fel.exe, sunxi-nand-image-builder.exe, and sunxi-pio.exe inside the sunxi-tools directory.Zadig is a universal driver installer for USB devices. It works perfectly with sunxi-tools.
Put your device into FEL mode:
Open Zadig (Run as Administrator).
Locate the device: From the dropdown menu, select "Unknown Device #1" or "USB-OTG (Interface 0)" with VID 1F3A and PID EFE8.
Install the driver: Select libusb-win32 (or libusbK) as the target driver.
sunxi-fel.exe compiled with MSYS2 expects libusb-1.0, which works best with the libusb-win32 driver.Click "Replace Driver" or "Install Driver". After installation, the device will appear as "libusb-win32 devices" in Device Manager.
1. "libusb could not open device" This is almost always a driver issue. Run Zadig again. Ensure you are selecting the device that appears only when the board is plugged in. Sometimes Zadig selects your mouse or keyboard by accident—be careful not to replace those drivers!
2. Slow Transfer Speeds USB FEL transfer speeds on Windows can sometimes be slower than on Linux. If you are writing a full OS image via FEL, be patient.
3. Script vs. Interactive
If you are scripting these tools in a .bat file, ensure you add pauses or error checks, as Windows will close the CMD window immediately upon completion if you double-click the script.