Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lantiq: [WIP] Add support for Archer D2 v1 #4059

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lantiq: add support for TP-Link Archer D2
This router is very similar to the TP-Link Archer VR200, with the
exception of having the newer SoC
Hardware:
- SoC: Lantiq ARX 368
- CPU: 2x MIPS 34Kc 500 MHz
- RAM: Zentel A3R12E40CBF-8E 64MB DDR2 16-bit
- Flash: Winbond W25Q128 16MB SPI 16-pin SOIC
- Ethernet: 4x 10/100/1000 BASE-TX Ethernet Interface (3x SoC & 1x XWAY PEF7071V via RGMII)
- WiFi 2.4GHz: 	Lantiq XWAY WAVE300 (SoC)
- WiFi 5GHz: MT7610EN 802.11ac 1×1:1
- Switch: Internal Infineon
- ADSL: Lantiq XWAY ARX368(SoC) (PSB 50368)
- USB: 1x USB 2.0
- LEDs: Power, DSL, Internet, LAN, Wireless, USB, WPS
- Buttons: Reset, WiFi, WPS

Backup:
- Boot up OpenWRT initramfs image (see below)
- Create full MTD backup from OpenWRT via ssh:
  https://openwrt.org/docs/guide-user/installation/generic.backup

Booting initramfs image:
- Set tftp server on some static ip, preferably 192.168.1.100 (or use dynamic, but beware of
  possible ip conflicts)
- Copy initramfs image to the main tftp directory:
  $ sudo cp openwrt-lantiq-xrx200-tplink_archer-d2-initramfs-kernel.bin /srv/tftp/
- Connect the ethernet cable to the router
- Connect serial
- Power on the router
- Immediately stop the uBoot autoboot by pressing 't'
- (Optional, if your ip address is different from 192.168.1.100) Set
  tftp server ip:
  $ setenv serverip 192.168.1.100
- (Optional, if 192.168.1.1 conflicts with you lan) Set router ip:
  $ setenv ipaddr 192.168.1.1
- Boot the initramfs image:
  $ tftpboot openwrt-lantiq-xrx200-tplink_archer-d2-initramfs-kernel.bin
  $ bootm

Installation:
- Boot the initramfs image
- Upload sysupgrade image to the router:
  (on your computer) $ scp openwrt-lantiq-xrx200-tplink_archer-d2-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
- Apply update:
  (from serial console or ssh) $ sysupgrade /tmp/openwrt-lantiq-xrx200-tplink_archer-d2-squashfs-sysupgrade.bin

Restoring original firmware:
- Obtain the original firmware
- Unzip it and strip the header:
  $ unzip Archer_D2\(EU\)_V1_160216.zip
  $ dd if=Archer_D2v1_1.4.0_0.8.0_up_boot\(160216\)_2016-02-16_15.44.20.bin of=tplink-stripped.bin skip=257 bs=512
- Set up tftp server and copy the stripped firmware:
  $ sudo cp tplink-stripped.bin /srv/tftp
- Connect the router to ethernet and serial
- Turn on the router and stop uBoot autobooting by pressing 't'
- Optionaly set the devices ip (default is 192.168.1.1):
  $ setenv ipaddr 192.168.1.1
- Optionally change the tftp server address (default is 192.168.1.100):
  $ setenv serverip 192.168.1.100
- Copy the stripped image to router's memory:
  $ tftpboot tplink-stripped.bin
- Erase rootfs flash area:
  $ sf erase 0x20000 0xf00000
- Write the image from memory to flash:
  $ sf write 0x80800000 0x20000 0xf00000
- Once finished, reboot the device:
  $ reset

Known issues:
- 2.4Ghz WiFi doesn't work because of the lack of WAVE300 drivers
- 5GHz WiFi is effectively useless as for some reason mt76 driver
  would not allow transmission power higher than 11 dBm
- ADSL is untested and might be broken
- LAN3 port sometimes fails to initialize during the boot

Signed-off-by: Mikhail Kovalev <mkm12342001@gmail.com>
  • Loading branch information
ThatMishakov committed Dec 11, 2021
commit d6bf52a355c3ef9bbed5d7bda77e34bed7ce3393
Loading