openwrt/target/linux
Foica David 6729fa2dd2 ath79: add support for TP-Link Deco M4R v1 and v2
This commit adds support for the TP-Link Deco M4R (it can also be M4,
TP-Link uses both names) v1 and v2. It is similar hardware-wise to the
Archer C6 v2. Software-wise it is very different. V2 has a bit different
layout from V1 but the chips are the same and the OEM firmware is the same
for both versions.

Specifications:
SoC: QCA9563-AL3A
RAM: Zentel A3R1GE40JBF
Wireless 2.4GHz: QCA9563-AL3A (main SoC)
Wireless 5GHz: QCA9886
Ethernet Switch: QCA8337N-AL3C
Flash: 16 MB SPI NOR

Flashing:

The device's bootloader only accepts images that are signed using
TP-Link's RSA key, therefore this way of flashing is not possible. The
device has a web GUI that should be accessible after setting up the device
using the app (it requires the app to set it up first because the web GUI
asks for the TP-Link account password) but for unknown reasons, the web
GUI also refuses custom images.

There is a debug firmware image that has been shared on the device's
OpenWrt forum thread that has telnet unlocked, which the bootloader will
accept because it is signed. It can be used to transfer an OpenWrt image
file over to the device and then be used with mtd to flash the device.

Pre-requisites:

- Debug firmware.
- A way of transferring the file to the router, you can use an FTP server
  as an example.
- Set a static IP of 192.168.0.2/255.255.255.0 on your computer.
- OpenWrt image.

Installation:

- Unplug your router and turn it upside down. Using a long and thin object
  like a SIM unlock tool, press and hold the reset button on the router and
  replug it. Keep holding it until the LED flashes yellow.
- Open 192.168.0.1. You should see the bootloader recovery's webpage.
  Choose the debug firmware that you downloaded and flash it. Wait until the
  router reboots (at this stage you can remove the static IP).

- Open a terminal window and connect to the router via telnet (the primary
  router should have a 192.168.0.1 IP address, secondary routers are
  different).
- Transfer the file over to the router, you can use curl to download it
  from the internet (use the insecure flag and make sure your source accepts
  insecure downloads) or from an FTP server.
- The router's default mtd partition scheme has kernel and rootfs
  separated. We can use dd to split the OpenWrt image file and flash it with
  mtd:

   dd if=openwrt.bin of=kernel.bin skip=0 count=8192 bs=256
   dd if=openwrt.bin of=rootfs.bin skip=8192 bs=256

- Once the images are ready, you have to flash the device using mtd
  (make sure to flash the correct partitions or you may be left with a
  hard bricked router):

   mtd write kernel.bin kernel
   mtd write rootfs.bin rootfs

- Flashing is done, reboot the device now.

Signed-off-by: Foica David <superh552@gmail.com>
(cherry picked from commit 063e9047cc)
2022-05-17 21:14:46 +02:00
..
apm821xx kernel: bump 5.10 to 5.10.114 2022-05-17 20:50:27 +02:00
archs38 kernel: delete Linux 5.4 config and patches 2022-03-21 13:11:56 +00:00
armvirt kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
at91 kernel: bump 5.10 to 5.10.113 2022-05-01 14:13:15 +02:00
ath25 ath25: drop Linux 5.4 support 2022-02-17 11:08:58 +01:00
ath79 ath79: add support for TP-Link Deco M4R v1 and v2 2022-05-17 21:14:46 +02:00
bcm27xx kernel: bump 5.10 to 5.10.114 2022-05-17 20:50:27 +02:00
bcm47xx kernel: delete Linux 5.4 config and patches 2022-03-21 13:11:56 +00:00
bcm53xx kernel: bump 5.10 to 5.10.110 2022-04-10 16:31:42 +01:00
bcm63xx bcm63xx: fix description fix name case 2022-05-01 13:23:12 +02:00
bcm4908 kernel: delete Linux 5.4 config and patches 2022-03-21 13:11:56 +00:00
bmips kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
gemini kernel: bump 5.10 to 5.10.94 2022-02-01 23:34:07 +00:00
generic kernel: Add missing devm_regulator_get_exclusive() 2022-05-17 21:14:23 +02:00
imx imx: fix USB support 2022-03-11 00:04:05 +01:00
ipq40xx kernel: bump 5.10 to 5.10.115 2022-05-17 20:50:34 +02:00
ipq806x kernel: bump 5.10 to 5.10.111 2022-04-17 21:47:11 +02:00
kirkwood target/linux: replace egrep with grep -E 2022-02-07 00:03:27 +01:00
lantiq kernel: bump 5.10 to 5.10.114 2022-05-17 20:50:27 +02:00
layerscape kernel: delete Linux 5.4 config and patches 2022-03-21 13:11:56 +00:00
malta kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
mediatek mediatek: add patches for MT7622 WED (wireless ethernet dispatch) 2022-05-06 19:57:57 +02:00
mpc85xx mpc85xx: Fix output location of padded dtb 2022-05-01 13:23:12 +02:00
mvebu mvebu: udpu: fix initramfs booting 2022-03-24 08:19:47 +01:00
mxs kernel: 5.10: consolidate mac80211 crypto options 2021-12-17 16:16:34 +01:00
octeon Revert "octeon: mark source-only" 2022-04-03 19:30:09 +03:00
octeontx kernel: bump 5.10 to 5.10.110 2022-04-10 16:31:42 +01:00
omap kernel: delete Linux 5.4 config and patches 2022-03-21 13:11:56 +00:00
oxnas kernel: bump 5.10 to 5.10.112 2022-05-01 14:13:14 +02:00
pistachio kernel: bump 5.10 to 5.10.95 2022-02-01 23:34:07 +00:00
qoriq qoriq: enable support for Marvell Alaska PHYs 2022-04-05 23:33:35 +02:00
ramips ramips: add led_source for Asus RT-AC1200 devices 2022-05-17 21:14:46 +02:00
realtek kernel: bump 5.10 to 5.10.114 2022-05-17 20:50:27 +02:00
rockchip kernel: include CONFIG_KEXEC_SIG in configs 2022-03-15 08:33:45 +01:00
sunxi sunxi: cortexa7: fix ethernet link detection on a20-olinuxino-lime2 2022-03-24 08:18:46 +01:00
tegra kernel: delete Linux 5.4 config and patches 2022-03-21 13:11:56 +00:00
uml uml: make use of 'rootfs-part' feature 2022-01-23 19:48:31 +00:00
x86 x86: Add support for Sophos XG 85 and XG 86 devices 2022-03-27 16:14:00 +01:00
zynq kernel: delete Linux 5.4 config and patches 2022-03-21 13:11:56 +00:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00