Gemtek XR1710G, sold by Brightspeed, is an AN7581 Wi-Fi 7 gateway.
It is a close relative of the Gemtek W1700K: the Silabs
Bluetooth/Zigbee radio and the Airoha GPS are gone, and the LEDs of
the two 1 GbE ports are driven by the internal switch PHYs instead of
GPIOs. The device tree shares an7581-gemtek-common.dtsi with
the W1700K and only adds these LEDs and the label MAC.
Specification:
- SoC : Airoha AN7581GT, 4x Cortex-A53
- RAM : 2 GiB DDR4-2666 (ESMT M16U8G16512A)
- Flash : 512 MiB SPI-NAND (Winbond W25N04KV)
- WLAN : MediaTek MT7996 (BE19000) on PCIe
- 2.4 GHz : 4x4, MT7976GN
- 5 GHz : 4x4, MT7977BN
- 6 GHz : 4x4, MT7977AN
- Ethernet : 2x 10 GbE (Realtek RTL8261BE, wan and lan2),
2x 1 GbE (AN7581 internal switch, lan3 and lan4)
- LEDs : 1x status, red/green/blue/white (GPIO),
2x2 lan3/lan4 green/amber (switch PHY)
- Button : reset
- Fan : PWM controlled by a Nuvoton NCT7802 on I2C
- UART : 5-pin header next to the case screw, 115200n8
- pinout : TX, GND, VCC, N/C, RX, starting at the screw
- Power : 12 VDC, 5 A, barrel jack, center positive
- Bootloader: U-Boot 2014.04-rc1 "AXON 1.6", signed, vendor BMT/BBT
The vendor bootloader verifies the image it boots by default and uses
Airoha BMT/BBT for bad block management, which Linux does not know
about. As on the W1700K, a U-Boot chainloader is therefore placed into
the "chainloader" partition (the start of the first vendor firmware
bank), which the vendor bootloader writes and loads, and everything
else lives in UBI, which handles bad blocks itself. The vendor
bootloader and its 66 MiB BMT pool at the end of flash are left alone.
The factory UBI volume holds the MT7996 EEPROM and the MAC addresses.
All of it comes from the vendor partition, which OpenWrt never writes:
the DSD block at 0x400000 holds the MACs, fan_id and the serial number
as text, the EEPROM is in the first good block from 0x405000. When the
volume is missing or holds no valid EEPROM and MACs, as on a new
install, sysupgrade builds it from there before writing the firmware.
The serial number has to match the board, and nothing is written when
the vendor data does not look right.
Installation (via serial console):
1. Open the case: there is a Torx T10 screw under the QR code label,
then pry the grey and white halves apart starting at the ports.
2. Connect to the UART header and interrupt the vendor bootloader with
any key.
3. Make the vendor bootloader boot the chainloader from flash, write
the chainloader with TFTP (server 192.168.1.254), and erase the rest
of the stock firmware. The vendor Ethernet driver is flaky, the
tftpboot may need a few attempts:
setenv serverip 192.168.1.254
setenv ipaddr 192.168.1.1
tftpboot 0x89000000 openwrt-airoha-an7581-gemtek_xr1710g-ubi-chainload-uboot.itb
setenv one flash read 0x600000 0x100000 \$loadaddr
setenv two "; bootm"
setenv bootcmd "$one$two"
saveenv
flash erase 0x600000 0x100000
flash write 0x600000 0x100000 0x89000000
flash erase 0x700000 0x1b700000
reset
The last erase matters: the stock firmware keeps its own UBI in this
area, which the chainloader would otherwise attach and keep.
If tftpboot keeps failing, load the chainloader over the serial
console instead: run "loady 0x89000000" in place of the tftpboot,
send the file with YMODEM (about 30 s at 115200 baud), then go on
with the setenv commands.
4. The chainloader creates UBI in the erased ubi partition with the
ubootenv, ubootenv2 and an empty factory volume, and saves its
environment. With nothing to boot, it lights the blue LED and loads
openwrt-airoha-an7581-gemtek_xr1710g-ubi-initramfs-recovery.itb via
TFTP from 192.168.1.254 until a server answers.
5. In the recovery system (192.168.1.1), copy over the sysupgrade.itb
image and run sysupgrade. It fills the factory volume with the Wi-Fi
calibration data and the MAC addresses from the vendor partition and
installs OpenWrt. The recovery volume is optional; without it, the
chainloader falls back to TFTP when the system does not boot.
6. Further updates use the sysupgrade.itb image.
Reverting to the stock firmware is not documented: the stock firmware
needs an ISP account to be useful.
MAC addresses ("factory" UBI volume):
- WAN : 0x5000 xx:xx:xx:xx:xx:xx
- LAN : 0x6000 xx:xx:xx:xx:xx:xx
- 2.4 GHz : 0x6000 + 1
- 5 GHz : 0x6000 + 2
- 6 GHz : 0x6000 + 3
Known issues:
- The 10 GbE ports (wan and lan2) may come up without link or lose
link: the AN7581 USXGMII PCS sometimes fails RX calibration ("No
FBCK Lock") with the RTL8261BE. The PCS and PHY fixes are being
worked on separately.
Based on the XR1710G support by Kenneth Kasilag (openwrt/openwrt#22397).
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Andrey Korshunov <razor1702@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/26296
Signed-off-by: Robert Marko <robimarko@gmail.com>
OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.
Sunshine!
Download
Built firmware images are available for many architectures and come with a package selection to be used as WiFi home router. To quickly find a factory image usable to migrate from a vendor stock firmware to OpenWrt, try the Firmware Selector.
If your device is supported, please follow the Info link to see install instructions or consult the support resources listed below.
An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:
Development
To build your own firmware you need a GNU/Linux, BSD or macOS system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.
Requirements
You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.8+ rsync subversion unzip which
Quickstart
-
Run
./scripts/feeds update -ato obtain all the latest package definitions defined in feeds.conf / feeds.conf.default -
Run
./scripts/feeds install -ato install symlinks for all obtained packages into package/feeds/ -
Run
make menuconfigto select your preferred configuration for the toolchain, target system & firmware packages. -
Run
maketo build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.
Related Repositories
The main repository uses multiple sub-repositories to manage packages of
different categories. All packages are installed via the OpenWrt package
manager called opkg. If you're looking to develop the web interface or port
packages to OpenWrt, please find the fitting repository below.
-
LuCI Web Interface: Modern and modular interface to control the device via a web browser.
-
OpenWrt Packages: Community repository of ported packages.
-
OpenWrt Routing: Packages specifically focused on (mesh) routing.
-
OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).
Support Information
For a list of supported devices see the OpenWrt Hardware Database
Documentation
Support Community
- Forum: For usage, projects, discussions and hardware advise.
- Support Chat: Channel
#openwrton oftc.net.
Developer Community
- Bug Reports: Report bugs in OpenWrt
- Dev Mailing List: Send patches
- Dev Chat: Channel
#openwrt-develon oftc.net.
License
OpenWrt is licensed under GPL-2.0
