Repository navigation
airoha: add support for Gemtek W1700K - #17869
Conversation
|
Hi! Thanks for your contribution. Thanks! |
|
If this device makes trough I can see the price of the thing sky rocket on ebay... (or the ISP starting to lock down the device...) |
0a4fa54 to
4e1d085
Compare
Yes, as soon as I have them ready I will add them. |
4e1d085 to
9296382
Compare
|
Worth mention (working on USB support) One USB port can be shared for HSGMII... The other port can be shared for PCIE2... It's possible some register are not correctly set to support this... Just giving clue of why PCIE2 might be silent. |
9296382 to
34df4e4
Compare
f0798fe to
4ec184d
Compare
1FB0009C bit 3 needs to be 0 to enable PCIE2. Reset value is 1 (USB mode). |
4ec184d to
6b9ae68
Compare
9cf53b7 to
e62547f
Compare
|
For the fan,
Other interesting peripherals:
|
9178f0c to
a40312b
Compare
|
@andrewjlamarche I mean that the driver needs to be patched with some additional debug log to understand why it's not getting trough. |
|
Looks like that describes our problem with the wiphy mac-addresses: |
We don't use this hotplug script, as userspace MAC handling is deprecated. MAC is set in mt76_eeprom_override and it is supposedly multi-band radio aware... |
|
@Ansuel MAC addresses are fixed, was missing |
|
@andrewjlamarche stupid me for not noticing that. |
|
@andrewjlamarche I was merging but... latest commit no SoB line... :(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( Please fix. |
|
Oops, fixed. |
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 <[email protected]> Link: openwrt#17869 Signed-off-by: Christian Marangi <[email protected]>
Add uboot-envtools to default packages to facilitate modifying the u-boot environment. Signed-off-by: Andrew LaMarche <[email protected]> Link: openwrt#17869 Signed-off-by: Christian Marangi <[email protected]>
Most, if not all Airoha devices will have LEDs and buttons. Add them to default packages. Signed-off-by: Andrew LaMarche <[email protected]> Link: openwrt#17869 Signed-off-by: Christian Marangi <[email protected]>
Remove source-only from an7581. Signed-off-by: Andrew LaMarche <[email protected]> Link: openwrt#17869 Signed-off-by: Christian Marangi <[email protected]>
|
Hi, apologies for posting on this thread , I couldn't find a more appropriate place to raise this. I've been porting the EIP93 crypto engine support to the econet EN7528 (MIPS) target, which uses the same After enabling
causes a kernel panic Could someone with an AN7581device try running the above |
|
@naseef Check this: namiltd#113 and namiltd#116. |
|
in an7523 |
Thank you. Will check this out |
Seems like openssl not using the hw engine ( see |
This comment was marked as off-topic.
This comment was marked as off-topic.
There is something wrong with your configuration. The |
I would say that in eip93_crypto_probe, struct device *dev = &pdev->dev; is null - maybe something wrong with device tree? |
I forgot to enable the module in the kernel, I'll add it here and test again |
|
loaded but now get kernel panic |
Thanks for confirming. That's the exact same crash. Could you try applying this patch and see if it fixes it for you as well? (I'm not 100% sure this is the exact right fix, but it resolves the crash on my EN7528 setup) |
|
|
|
now with patch |
|
@naseef These bugs have already been fixed in the upstream driver. |
|
Any chance to get support for this device in openwrt-25.12? |
Please refer to #22374 for progress on adding this target to 25.12. |
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
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.
0x89000000 openwrt-airoha-an7581-gemtek_w1700k-ubi-chainload-uboot.itb
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
process is automatic, though you may be prompted to answer some
questions.
Depends:
#20450and#20475