openwrt/package/boot
Andrew LaMarche 99307582de
airoha: add support for Gemtek W1700K
This commit adds support for Gemtek (Centurylink/Lumen/Quantum Fiber)
W1700K.

Device specification
--------------------
SoC Type:	Airoha AN7581
RAM:		ESMT M16U8G16512A (2GB)
Flash:		Winbond 25N04KVZEIR (512MB)
Ethernet:	2x gigabit via AN7581, 2x 10g via RTL8261N
Wi-Fi:		MT7996 - BE19000
LEDs:		1 LED, power/status
Button:		Reset
USB ports:	None
Bootloader:	U-Boot 2014.04-rc1 (Jun 12 2024 - 08:14:34) AXON 2.0
Fan:		1x controlled by Nuvoton NCT7511Y

This device is pretty useless with the stock firmware as it requires an
account to completely set it up. Additionally, the vendor bootloader is
signed and uses Airoha/Mediatek's BBT/BMT for bad block management on
the flash. It does not support UBI, thus kernel updates are subject to
BMT/BBT which OpenWrt does not support. In turn, if a kernel update
happens and a block is marked bad in the process, the device will fail
to boot and will need to be recovered via serial.

The workaround is to chainload U-Boot in place of the kernel, as it
should not need frequent updates and thus should not cause BBT/BMT to
misbehave and soft-brick the device. Upstream U-Boot supports loading
a FIT image from UBI, so we create a UBI partition for the new u-boot
env, FIT image and factory data. This way, bad blocks are managed by UBI
instead, which will not soft-brick the device should a block be marked
bad during a normal OpenWrt update. Users wishing to update U-Boot can
do so, but should be prepared to recover if a block goes bad.

Because the device is not useful with stock firmware, this is a one-way
ticket for most users and reverting will not be documented.

The following steps can be used to install OpenWrt on the W1700K.

Connect to serial console. There is a Torx T10 screw underneath the QR
code printed onto the label. Then, pry between the gray and white
plastic, starting by the ports on the back. There are clips arount the
entire device. Starting closest to the screw next to the UART header,
TX - GND - VCC - N/A - RX. The bootloader can be interrupted by
pressing any key.

Configuring Vendor Bootloader and Installing U-Boot Chainloader:
The bootloader's default bootcmd will only run a signed image. However,
we can still bootm our own image from flash.

NOTE: The vendor's ethernet drivers are flaky. You may have to reboot
and try the tftpboot part several times for it to work.

- setenv one flash read 0x600000 0x1000000 \$loadaddr
- setenv two "; bootm"
- setenv bootcmd "$one$two"
- setenv one
- setenv two
- saveenv
- setenv serverip 192.168.1.10; setenv ipaddr 192.168.1.1; tftpboot
0x89000000 openwrt-airoha-an7581-gemtek_w1700k-ubi-chainload-uboot.itb
- flash erase 0x600000 0x100000
- flash write 0x600000 0x100000 0x89000000
- reset

The device will now reboot into the U-Boot chainloader.

Loading the W1700K UBI Installer:
The installer can be downloaded at
https://github.com/hurrian/w1700k-ubi-installer/releases

- Boot the installer via the TFTP option in the U-Boot menu. This
  process is automatic, though you may be prompted to answer some
  questions.
- Once it is done, you may upgrade to your preferred build.
- For more information: https://github.com/hurrian/w1700k-ubi-installer

For those wishing to explore the stock firmware:

Rooting Stock FW (for making backups, recommended):
- Boot the router and watch serial console until presented with failsafe
  mode. Enter it (f + enter).
- mount_root
- Change the root password (passwd).
- Open /etc/config/axon_platform_manager and set sshServerEnable,
  localAccessEnable and remoteAccessEnable to 1.
- Search for "SSH". You'll find a long string with 3 matches such as
  Enabled%25252c1%25252cSSH%Drop. Change any instances of "Disabled"
  preceding SSH to "Enabled" and any instances of "Drop" to "Accept"
  that follow SSH. Same for "Local SSH" and "Remote SSH".
- Set /etc/config/dropbear to:

config dropbear
	option PasswordAuth 'on'
	option RootPasswordAuth 'on'
	option Port '22'

- Reboot.
- Connect 10g WAN port to existing network and SSH in with the password
  you set.
- SSH into rooted stock fw.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17869
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-11 00:42:34 +01:00
..
apex treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
arm-trusted-firmware-bcm63xx include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack 2024-12-22 23:48:53 +01:00
arm-trusted-firmware-mediatek uboot-mediatek: add support for Zyxel WX5600-T0 2026-03-02 11:43:43 +01:00
arm-trusted-firmware-microchipsw boot: arm-trusted-firmware-microchipsw: depend on host Ruby 2026-01-12 18:01:17 +01:00
arm-trusted-firmware-mvebu include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack 2024-12-22 23:48:53 +01:00
arm-trusted-firmware-rockchip arm-trusted-firmware-rockchip: bump to 2.14.0 2026-01-15 16:33:26 +02:00
arm-trusted-firmware-stm32 arm-trusted-firmware-stm32: bump to v2.14 2026-02-26 23:34:10 +01:00
arm-trusted-firmware-sunxi arm-trusted-firmware-sunxi: bump to 2.14 2026-02-08 00:56:16 +01:00
arm-trusted-firmware-tools arm-trusted-firmware-tools: update to version 2.12 2025-02-13 03:16:40 +00:00
at91bootstrap at91bootstrap: put at91bootstrap images into image staging directory 2025-04-04 14:39:00 +02:00
fconfig treewide: unify OpenWrt hosted source via @OPENWRT 2021-02-05 12:00:24 -10:00
grub2 treewide: use HTTPS URL for GNU websites 2026-01-02 18:07:02 +01:00
imx-bootlets imx-bootlets: bump to 10.12.01 2025-02-05 22:00:09 +01:00
kexec-tools kexec-tools: add zstd to package dependencies 2026-01-28 23:56:15 +01:00
kobs-ng kobs-ng: Mark as nonshared to build in step 1 2024-07-30 21:42:33 +02:00
mt7623n-preloader mt7623n-preloader: remove mt7622-preloader 2021-02-28 04:12:23 +00:00
opensbi opensbi: update tarball hash compressed by the zstd 1.5.7 2025-07-13 16:24:10 +02:00
optee-os-stm32 optee-os-stm32: bump to 4.9.0 2026-02-26 23:34:10 +01:00
rkbin rkbin: pack rk3528 atf/tpl blobs 2025-11-15 19:56:27 +01:00
tfa-layerscape tfa-layerscape: Bump to lf-6.12.20-2.0.0 2025-08-17 19:00:58 +02:00
uboot-airoha uboot-airoha: add a label to the spi node 2026-03-05 11:17:47 +01:00
uboot-armsr boot: uboot-armsr: update to U-Boot 2025.04 2025-05-22 18:50:24 +02:00
uboot-at91 at91: put u-boot images into image staging directory 2025-04-04 14:39:00 +02:00
uboot-ath79 uboot-ath79: add FE profile for NEC Aterm series (AR9344) 2025-12-01 00:17:47 +01:00
uboot-bcm53xx uboot-bcm53xx: bump U-Boot to 2025.10 2026-01-06 01:15:46 +01:00
uboot-bcm4908 uboot-bcm4908: fix build with GCC14 2025-05-23 00:10:23 +02:00
uboot-bmips uboot-bmips: drop usage of AUTORELEASE 2025-10-29 21:09:56 +01:00
uboot-d1 uboot-d1: update to 2024.01 2026-01-23 10:35:35 +01:00
uboot-fritz4040 uboot-fritz4040: add Huawei AP4050DN support 2026-03-07 18:48:57 +01:00
uboot-imx treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uboot-kirkwood kirkwood: add support for D-Link DNS-325 A1 2025-11-25 15:41:38 +01:00
uboot-lantiq boot-lantiq: Fix compilation with GCC 14 2025-05-03 22:04:13 +02:00
uboot-layerscape uboot-layerscape: do not build efimkcapsule tool 2025-08-22 11:24:43 +02:00
uboot-mediatek uboot-mediatek: port RNG drivers and enable them 2026-03-05 02:28:32 +00:00
uboot-microchipsw uboot-microchipsw: add FIP update flashing shortcut 2026-01-23 11:07:23 +01:00
uboot-mvebu mvebu: add support for RIPE Atlas Probe v5 2026-02-12 22:21:51 +01:00
uboot-mxs packages: refresh patches 2024-05-31 11:30:06 +02:00
uboot-omap treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uboot-qoriq package: uboot-qoriq: fix T4240RDB u-boot selection 2026-01-12 13:59:30 +01:00
uboot-rockchip uboot-rockchip: add HINLINK H66K / H68K support 2026-01-24 23:46:23 +01:00
uboot-sifiveu uboot-sifiveu: fix build with swig 4.3.0 2025-10-25 22:33:53 +02:00
uboot-stm32 uboot-stm32: bump to 2026.01 2026-02-26 23:34:10 +01:00
uboot-sunxi uboot-sunxi: bump to 2025.10 2026-02-08 00:56:16 +01:00
uboot-tegra uboot-tegra: disable mkeficapsule build 2025-07-13 17:18:15 +02:00
uboot-tools airoha: add support for Gemtek W1700K 2026-03-11 00:42:34 +01:00
uboot-zynq packages: refresh patches 2024-05-31 11:30:06 +02:00