Support for Victure WR1200 (AC1200)

I checked your bootloader and firmware. Bootloader works. I was able to boot form memory using initramfs-kernel.bin. However I wasn't able to flash sysupgrade version for some reason. Flashing process looks ok. But it's not booting afterwards.

This is what I get in serial console:

-Boot SPL 2022.10-rc1 (Sep 05 2022 - 18:46:13 +0200)
Trying to boot from NOR
mt7621-pinctrl pinctrl@1e000060: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
serial_mtk uart1@1e000c00: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19CCβ–’H▒▒▒▒с2022.10-rc1 (Sep 05 2022 - 18:46:13 +0200)

CPU:   MediaTek MT7621A ver 1, eco 3
Boot:  DDR3, SPI-NOR 3-Byte Addr
Clock: CPU: 880MHz, DDR: 1200MT/s, Bus: 220MHz, XTAL: 40MHz
Model: MediaTek MT7621 RFB (SPI-NOR)
DRAM:  128 MiB
Core:  32 devices, 13 uclasses, devicetree: separate
Loading Environment from SPIFlash... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Loading Environment from nowhere... OK
Net:
Warning: eth@1e100000 (eth0) using random MAC address - b6:c0:c1:dd:46:6c
eth0: eth@1e100000

Probable because of:
*** Warning - bad CRC, using default environment

It looks like the env partition was overwritten. I dont have my device or my main computer with me, so i cant look into it. you could run saveenv from uboot to write the default config into flash and then edit as needed, i think my default config is missing the bootcmd variable for autoboot. It should be:bootm 0xbfc50000. the address might not be right though, as i dont have my device to look it up. To see if the address is correct you can use iminfo.

PS. You have a working uboot with full access, so everything is fixable.

Fails with this message:

Saving Environment to nowhere... not possible

Noticed CONFIG_ENV_IS_NOWHERE=y in your u-boot config. I guess this could cause this issue. I tried to re-compile bootloader. However I'm unable to transfer it over tftp for some reason.
The transfer process fails with "UDP wrong checksum" messages at 99% of transfer. The weird thing is - I get the same issue if I try to transfer sysupgrade image into memory while initramfs-kernel is transferred without issues.

I'm using tftpd64.exe server on Windows and tftpboot over serial.

You are correct about bootm 0xbfc50000. It loads without issues from this address.

Small update to this. I managed to transfer new u-boot.bin into memory via tftp. Tried using default sequence of erase + cp.b to flash it without success. Have a feeling that it's impossible without flash programmer.

use sf update uboot utility to update flash sections. My uboot env is as follows:

baudrate=57600
bootcmd=bootm ${firmwareaddr} ; bootp
bootdelay=5
bootretry=60
ethact=eth@1e100000
ethaddr=00:00:00:00:00:00
fdtcontroladdr=87cfe470
firmwareaddr=0xbfc50000
ipaddr=192.168.16.3
loadaddr=0x83000000
mtdids=nor0=raspi
mtdparts=mtdparts=raspi:192k(u-boot),64k(u-boot-env),64k(factory),-(firmware)
serverip=192.168.16.1
stderr=uart1@1e000c00
stdin=uart1@1e000c00
stdout=uart1@1e000c00

I uploaded my working uboot image and the old config to the github recovered from my router. You can recompile with this config and see if it works.
I use dnsmasq as my tftp server.

1 Like

Checked your backup version. Works like a charm after editing env. Thank you :slight_smile:

I guess we could come up with installation guide and precompiled bootloader + firmware for anyone who wants to try it. For advanced users with UART access. It's probably impossible to flash it from default firmware unless there is some hidden recovery interface (I didn't find any).

1 Like

im in, bought 3 for fun :slight_smile:

@Reese Any chance of you writing the installation guide and sharing the bootloader + firmware.

@Reese reading the MTK U-Boot (MT7621) User’s Manual PDF that cd4046bf posted, section 2.2.3.11 Dual image support talks about what they did. So was comparing the firmware to firmware2 (does same for rootfs+rootfs2) mtd's. Basically stock bootloader copies back in one or other if mismatch, figures corrupt. This is the stock U-Boot output (stock partition compares) where it takes place in stage2 boot, just before boot menu for options.

=================================================

Check image validation:

Image1 Header Magic Number --> OK

Image2 Header Magic Number --> OK

Image1 Header Checksum --> OK

Image2 Header Checksum --> OK

Image1 Data Checksum --> OK

Image2 Data Checksum --> OK

Image1 rootfs Checksum --> OK

Image2 rootfs Checksum --> OK

Image1: OK Image2: OK

=================================================

Hope helps clear that up, bit late but here. Also, posting a guide of how I ended up upgrading my router using stock bootloader + sysupgrade. In case someone doesn't want to risk bootloader flashing w/ no flash programmer handy.

to ALL and @donny , here's how ended up doing it solderless. a guide, firmware, build files, logs in repo and creds for all ya' OW's :sunglasses: