immortalwrt/target/linux
Roland Reinl fdb87a91b4 mediatek: Add support for D-Link EAGLE PRO AI R32
R32 is like the M32 part of the EAGLE PRO AI series from D-Link.

Specification:
 - MT7622BV SoC with 2.4GHz wifi
 - MT7975AN + MT7915AN for 5GHz
 - MT7531BE Switch
 - 512MB RAM
 - 128 MB flash
 - 2 LEDs (Status and Internet, both can be either orange or white)
 - 2 buttons (WPS and Reset)

Compared to M32, the R32 has the following differences:
 - 4 LAN ports instead of 2
 - The recory image starts with DLK6E6015001 instaed of DLK6E6010001
 - Individual LEDs for power and internet
 - MAC address is stored at another offset in the ODM partition

MAC addresses:
 - WAN MAC is stored in partition "Odm" at offset 0x81
 - LAN (as printed on the device) is WAN MAC + 1
 - WLAN MAC (2.4 GHz) is WAN MAC + 2
 - WLAN MAC (5GHz) is WAN MAC + 3

Flashing via Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the internet LED blinks fast
 - Open a Chromium based and goto http://192.168.0.1
 - Download openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-recovery.bin

Flashing via uBoot:
 - Open the case, connect to the UART console
 - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-initramfs-kernel.bin.
 - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
 - Power on the device and select "1. System Load Linux to SDRAM via TFTP." in the boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
 - The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
 - Create a backup of the Kernel1 partition, this file is required if a revert to stock should be done later
 - Perform a sysupgrade using openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-squashfs-sysupgrade.bin
 - Reboot the device. OpenWrt should start from flash now

Revert back to stock using the Recovery Web Interface:
 - Set your IP address to 192.168.0.10, subnetmask 255.255.255.0
 - Press the reset button while powering on the deivce
 - Keep the reset button pressed until the internet LED blinks fast
 - Open a Chromium based and goto http://192.168.0.1
 - Flash a decrypted firmware image from D-Link. Decrypting an firmware image is described below.

Decrypting a D-Link firmware image:
 - Download https://github.com/RolandoMagico/firmware-utils/blob/M32/src/m32-firmware-util.c
 - Compile a binary from the downloaded file, e.g. gcc m32-firmware-util.c -lcrypto -o m32-firmware-util
 - Run ./m32-firmware-util R32 --DecryptFactoryImage <OriginalFirmware> <OutputFile>
 - Example for firmware R32A1_FW103B01: ./m32-firmware-util R32 --DecryptFactoryImage R32A1_FW103B01.bin R32A1_FW103B01.decrypted.bin

Revert back to stock using uBoot:
 - Open the case, connect to the UART console
 - Set your IP address to 10.10.10.3, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
 - Run a tftp server which provides the previously created backup of the Kernel1 partition.
 - You can rename the file to iverson_uImage (no extension), then you don't have to enter the whole file name in uboot later.
 - Power on the device and select "2. System Load Linux Kernel then write to Flash via TFTP." in the boot menu
 - Enter image file, tftp server IP and device IP (if they differ from the default).
 - TFTP download to FLASH will start. After a few seconds the stock firmware should start again

There is also an image openwrt-mediatek-mt7622-dlink_eagle-pro-ai-r32-a1-squashfs-tftp.bin which can directly be flashed via U-Boot and TFTP.
It can be used if no backup of the Kernel1 partition is reuqired.

Flahsing via OEM web interface is currently not possible, the OEM images are encrypted. Creating images is only possible manually at the moment.
The support for the M32/R32 already includes support for flashing from the OEM web interface:
 - The device tree contains both partitions (Kernel1 and Kernel2) with conditions to select the correct one based on the kernel command line
 - The U-Boot variable "boot_part" is set accordingly during startup to finish the partition swap after flashing from the OEM web interface
 - OpenWrt sysupgrade flashing always uses the partition where it was initially flashed to (no partition swap)

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
2024-01-02 21:22:46 +01:00
..
airoha
apm821xx
archs38
armsr kernel: bump 6.1 to 6.1.69 2023-12-21 11:26:35 +01:00
at91
ath25
ath79 ath79: generic: disable SPI-NOR write protect unconditionally 2023-12-24 12:42:12 +01:00
bcm27xx kernel: bump 6.1 to 6.1.70 2024-01-02 18:28:58 +01:00
bcm47xx
bcm53xx kernel: backport upstream brcm_nvram fix for NAND controller 2023-12-18 08:33:04 +01:00
bcm63xx
bcm4908
bmips
gemini
generic kernel: bump 6.1 to 6.1.70 2024-01-02 18:28:58 +01:00
imx imx: enable CONFIG_CPU_FREQ_THERMAL 2023-12-12 19:35:03 +01:00
ipq40xx ipq40xx: update ASUS RT-AC58U leds DTS nodes 2023-12-02 21:57:38 +01:00
ipq806x kernel: bump 6.1 to 6.1.70 2024-01-02 18:28:58 +01:00
ixp4xx ixp4xx: add Generic subtarget definition 2023-12-09 14:45:50 +01:00
kirkwood kirkwood: backport fix Ctera C200 V1 ubi part name to 6.1 2023-12-15 17:59:35 +01:00
lantiq kernel: bump 5.15 to 5.15.143 2023-12-19 14:18:55 +01:00
layerscape kernel: bump 5.15 to 5.15.142 2023-12-11 17:39:57 +01:00
malta
mediatek mediatek: Add support for D-Link EAGLE PRO AI R32 2024-01-02 21:22:46 +01:00
mpc85xx mpc85xx: fix reserved-memory node name 2023-12-28 23:37:51 +01:00
mvebu mvebu: fix RTC of IEI-World Puzzle M90x devices 2023-12-18 22:17:09 +00:00
mxs
octeon kernel: bump 6.1 to 6.1.68 2023-12-19 14:12:25 +01:00
octeontx kernel: bump 5.15 to 5.15.140 2023-11-29 23:41:33 +01:00
omap
oxnas oxnas: do not use pcie-controller 2024-01-01 02:34:48 +01:00
pistachio
qoriq qoriq: pad rootfs with zeros 2023-12-02 14:06:56 +02:00
qualcommax qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS 2023-12-25 19:14:26 +01:00
ramips ramips: fix label-mac for Xiaomi RA75 2023-12-28 14:14:34 +01:00
realtek realtek: Use hex for "soc" identifier in debugfs 2023-12-31 14:13:43 +01:00
rockchip rockchip: make SMP affinity of RTL8152 on XHCI more robust 2023-12-15 18:02:43 +01:00
sifiveu
sunxi sunxi: mark upstreamed patches as such 2023-12-19 16:02:05 +01:00
tegra
uml
x86 Revert "x86: add support for Mellanox Spectrum SN2000 Switches" 2023-12-23 07:52:05 +00:00
zynq
Makefile