openwrt/package/boot
Roland Reinl b3ce08e0b6 mediatek: filogic: Add support for D-Link AQUILA PRO AI M60
Specification:
 - MT7986 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - MT7531 switch
 - 512MB RAM
 - 128MB NAND flash (MX35LF1GE4AB-Z4I) with two UBI partitions with identical size
 - 1 multi color LED (red, green, blue, white) connected via GCA230718 (Same as D-Link M30 A1)
 - 3 buttons (WPS, reset, LED on/off)
 - 1x 2.5 Gbit WAN port with Maxlinear GPY211C
 - 4x 1 Gbit LAN ports

Disassembly:
 - There are five screws at the bottom: 2 under the rubber feet, 3 under the label.
 - After removing the screws, the white plastic part can be shifted out of the blue part.
 - Be careful because the antennas are mounted on the side and the top of the white part.

Serial Interface
 - The serial interface can be connected to the 4 pin holes next to/under the antenna cables.
 - Note that there is another set of 4 pin holes on the side of the board, it's not used.
 - Pins (from front to rear):
   - 3.3V (do not connect)
   - TX
   - RX
   - GND
 - Settings: 115200, 8N1

MAC addresses:
 - MAC address is stored in partition "Odm" at offset 0x81 (for example XX:XX:XX:XX:XX:52)
 - MAC address on the device label is ODM + 1 (for example XX:XX:XX:XX:XX:53)
 - WAN MAC is the one from the ODM partition (for example XX:XX:XX:XX:XX:52)
 - LAN MAC is the one from the ODM partition + 1 (for example XX:XX:XX:XX:XX:53)
 - WLAN MAC (2.4 GHz) is the one from the ODM partition + 2 (for example (XX:XX:XX:XX:XX:54)
 - WLAN MAC (5 GHz) is the one from the ODM partition + 5 (for example (XX:XX:XX:XX:XX:57)

Flashing via OEM web interface:
 - Currently not supported because image crypto is not known

Flashing via recovery web interface:
 - This is only working if the first partition is active because recovery images are always flashed to the active partition and OpenWrt can only be executed from the first partition
 - Use a Chromium based browser, otherwise firmware upgrade might not work
 - Recovery web interface is accessible via 192.168.200.1 after keeping the reset button pressed during start of the device until the LED blinks red
 - Upload the recovery image, this will take some time. LED will continue flashing red during the update process
 - The after flashing, the recovery web interface redirects to http://192.168.0.1. This can be ignored. OpenWrt is accessible via 192.168.1.1 after flashing
 - If the first partition isn't the active partition, OpenWrt will hang during the boot process. In this case:
   - Download the recovery image from https://github.com/RolandoMagico/openwrt/releases/tag/M60-Recovery-UBI-Switch (UBI switch image)
   - Enable recovery web interface again and load the UBI switch image. This image works on the second partition of the M60
   - OpenWrt should boot now as expected. After booting, flash the normal OpenWrt sysupgrade image (for example in the OpenWrt web interface)
   - Flashing a sysupgrade image from the UBI switch image will make the first partition the active partition and from now on, default OpenWrt images can be used

Flashing via Initramfs:
- Before switching to OpenWrt, ensure that both partitions contain OEM firmware.
  - This can be achieved by re-flashing the same OEM firmware version again via the OEM web interface.
  - Flashing via OEM web interface will automatically flash the currently not active partition.
- Open router, connect serial interface
- Start a TFTP server at 192.168.200.2 and provide the initramfs image there
- When starting the router, select "7. Load Image" in U-Boot
- Settings for load address, load method can be kept as they are
- Specify host and router IP address if you use different ones than the default (Router 192.168.200.1, TFTP server 192.168.200.2)
- Enter the file name of the initramfs image
- Confirm "Run loaded data now?" question after loading the image with "Y"
- OpenWrt initramfs will start now
- Before flashing OpenWrt, create a backup of the "ubi" partition. It is required when reverting back to OEM
- Flash sysupgrade image to flash, during flashing the U-Boot variable sw_tryactive will be set to 0
  - During next boot, U-Boot tries to boot from the ubi partition. If it fails, it will switch to the ubi1 partition

Reverting back to OEM:
- Boot the initramfs image as described in "Flashing via Initramfs" above
- Copy the backed up ubi partition to /tmp (e.g. by using SCP)
- Write the backup to the UBI partition: mtd write /tmp/OpenWrt.mtd4.ubi.bin /dev/mtd4
- Reboot the device, OEM firmware will start now

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17296
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-23 23:23:18 +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 include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack 2024-12-22 23:48:53 +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 include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack 2024-12-22 23:48:53 +01:00
arm-trusted-firmware-stm32 arm-trusted-firmware-stm32: bump to v2.12 2024-12-22 23:48:53 +01:00
arm-trusted-firmware-sunxi include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack 2024-12-22 23:48:53 +01:00
arm-trusted-firmware-tools arm-trusted-firmware-tools: fix build on macOS/Darwin 2023-08-12 16:45:47 +02:00
at91bootstrap at91bootstrap: update PKG_MIRROR_HASH to zstd for v3 at91bootstrap 2024-04-07 17:10:30 +02:00
fconfig treewide: unify OpenWrt hosted source via @OPENWRT 2021-02-05 12:00:24 -10:00
grub2 grub2: add EFI support for loongarch64 2024-05-04 14:14:24 +08:00
imx-bootlets imx-bootlets: Mark as nonshared to build in step 1 2024-07-30 21:42:33 +02:00
kexec-tools kexec-tools: fix multiple compile errors 2024-06-08 14:08:38 +02: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: bump to 1.4 2024-05-03 11:09:22 +02:00
optee-os-stm32 optee-os-stm32: bump to 4.4.0 2024-12-22 23:48:52 +01:00
rkbin include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack 2024-12-22 23:48:53 +01:00
tfa-layerscape include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack 2024-12-22 23:48:53 +01:00
uboot-armsr uboot-armsr: add support for QEMU armv7/armv8 2023-06-10 21:50:22 +02:00
uboot-at91 treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
uboot-ath79 uboot-ath79: refresh patches 2024-10-19 17:56:46 +02:00
uboot-bcm53xx uboot-bcm53xx: bump to 2024.01 2024-01-20 19:38:20 +01:00
uboot-bcm4908 packages: refresh patches 2024-05-31 11:30:06 +02:00
uboot-bmips uboot-bmips: Add U-Boot for the BMIPS target 2024-05-01 21:30:32 +02:00
uboot-d1 uboot-d1: Adapt BUILD_DEVICES to renamed boards 2024-12-23 01:49:04 +01:00
uboot-envtools mediatek: filogic: Add support for D-Link AQUILA PRO AI M60 2024-12-23 23:23:18 +01:00
uboot-fritz4040 treewide: package: update missed hashes after switch to ZSTD 2024-04-07 14:56:04 +02:00
uboot-imx treewide: replace AUTORELEASE with real PKG_RELEASE 2023-05-18 11:35:29 +02:00
uboot-kirkwood uboot-kirkwood: fix compilation with GCC14 2024-09-25 22:50:09 +02:00
uboot-lantiq uboot-laniq: fix compilation with GCC14 2024-09-08 11:49:20 +02:00
uboot-layerscape uboot-layerscape: bump to lf-6.6.23-2.0.0 2024-09-22 16:21:02 +02:00
uboot-mediatek uboot-mediatek: increase USB probe delay on OpenWrt One 2024-12-02 13:55:36 +01:00
uboot-mvebu uboot-mvebu: update to version 2024.10 2024-10-19 22:54:12 +02: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-rockchip uboot-rockchip: fix build with swig 4.3.0 2024-12-23 21:21:49 +01:00
uboot-sifiveu packages: refresh patches 2024-05-31 11:30:06 +02:00
uboot-stm32 uboot-stm32: bump to 2024.10 2024-12-22 23:48:53 +01:00
uboot-sunxi sunxi: add support for Lichee Pi Zero Dock (V3s) board 2024-05-04 00:41:02 +02:00
uboot-tegra uboot-tegra: Set UBOOT_USE_INTREE_DTC 2024-06-02 18:06:39 +02:00
uboot-zynq packages: refresh patches 2024-05-31 11:30:06 +02:00