You have two options, I guess.
Either try to flash it directly, using option 2, or use option 1 to load the initramfs, then fash the sysupgrade image from the initramfs.
What one works ? No idea ...
Plus you also have the recovery you already posted about.
Thanks @frollic, I tried option 2 in uboot. Looks promising, the initramfs image is now started afer a reset without using TFTP.
Tried to flash the sysupgrade after booting, but it fails:
Fri Jul 7 18:15:30 UTC 2023 upgrade: Sending TERM to remaining processes ...
Fri Jul 7 18:15:30 UTC 2023 upgrade: Sending signal TERM to ntpd (2328)
Fri Jul 7 18:15:30 UTC 2023 upgrade: Sending signal TERM to ntpd (2331)
Fri Jul 7 18:15:34 UTC 2023 upgrade: Sending KILL to remaining processes ...
[ 92.403637] stage2 (3094): drop_caches: 3
Fri Jul 7 18:15:40 UTC 2023 upgrade: Switching to ramdisk...
Fri Jul 7 18:15:41 UTC 2023 upgrade: Performing system upgrade...
[ 93.310195] do_stage2 (3094): drop_caches: 3
Could not open mtd device: firmware
Can't open device for writing!
cat: write error: Broken pipe
sysupgrade aborted with return code: 256
Ok, i have now an setup where the sysupgrade is accepted and sysupgrade itself is doing something. After sysupgrade, booting is still working but Luci shows me that I'm still in recovery (initramfs) mode.
For me it's not yet clear which partitions are required for sysupgrade (firmware/kernel/rootfs/ubi??) and how the sysupgrade image must look like to flash it correctly. And is a call to nand_do_upgrade always required in platform.sh as soon as NAND memory is used?
Not sure if it is related to flashing the initramfs to flash. As @frollic already stated, that's probably not the best idea...
Any help is appreciated
there's no guarantee you will be able to figure it out, there's a reason why sometimes flashing using initramfs is required, you're bypassing the recovery checks.
check with similar devices from dlink, see how they are flashed.
I checked with other D-Link devices but didn't find any solution for it. So I have to go with the initramfs/sysupgrade approach unitl I figure out which data the recovery mode expects.
If anybody wants to try OpenWrt on the M32 Mesh, perform the following steps:
Note that I tested it on my devices only, I cannot guaratee that it works for all devices out there
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-m32-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-m32-squashfs-sysupgrade.bin
Reboot the device. OpenWrt should start from flash now
If you want to revert back to stock firmware:
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
If you want to build your own image, you can apply this patch to OpenWrt main:
If you don't want to build images manually, you can use the one from https://github.com/RolandoMagico/openwrt-build/releases/tag/EAGLE_PRO_AI_M32_Build_20230710_1112
The images contain LuCI (also in the initramfs) which should it make easy to create a backup of the Kernel1 partition and flash the sysupgrade image.
As there is no long term experience with this device, the images still can contain bugs.
On 2.4GHz I can scan available WLANs, but cannot connect to them. If I configure 2.4GHz für AP mode, I don't see the SSID in my clients.
On 5GHz, AP mode works but connecting to another wifi is also not possible.
Update: Looks like the OpenWrt TX power settings for the 2.4GHz Wifi are not applied correctly. Increasing the transmit power works around the problem and WiFi is working but it's not the solution of the problem. There are also open issues regarding this topic (TX power setting using MT76), for example https://github.com/openwrt/mt76/issues/787
Hello @mk24, I saw your post (Trouble with Wi-Fi on Belkin RT3200 & 23.05.0-rc2 - #5 by mk24) and was wondering if I face the same issue with the M32 (wich is similar to Belkin RT3200 and Linksys E8450).
In my setup, 2.4GHz doesn't work but 5GHz does. Both calibration data are in the same partition.
If this can be the case: Is it possible to check for ECC errors somehow?
Thanks
Roland
I also tried the calibration data from https://github.com/ericwoud/buildR64arch/blob/main/rootfs/boot/dtbos-BPIR64/wmac-eeprom.dts
At least the wifi signal gets better (from 10% to 50%) but still far away from the expected signal strength.
Then I tried to add the calibration data from my device as mediatek,eeprom-data entry in the DTS instead of referencing the factory partition, no improvement. At least that indicatees that the previously mentioned ECC topic is not my problem.
2.4GHz is finally working. Not an issue in the MT76 component or reading the calibration data, only my own incompetence in writing DTS files. Required changes:
I figured out how to decrypt the D-Link images (tested with two different firmware versions). So I have the unencrypted files with the header. Useful to investigate further regarding the headers/checksums.
The data for decryption are stored in the ODM partition. There is also a private key, some hope that encrypted images for the stock web interface can be provided as well.
FYI, in D-Link DAP-1620 the AES key is generated using the following: echo -n DAP-1620 | openssl dgst -sha1 -hmac MT76XMT7621-RP-PR2475-NA
(MT76XMT7621-RP-PR2475-NA is a string that appears in the firmware, similar to your DLK6E6010001)