Dynalink DL-WRX36 Askey RT5010W IPQ8072A technical discussion

I have been working on implementing dual-partition support for this device and I have some proof of concept.
@robimarko, @clayface, any feedback is appreciated.

A snippet with sysupgrade's platform.sh and bootcount is at:

It implements an "OpenWrt u-boot env" with 2 boot slots + recovery by loading initramfs image from USB.
Steps are:

  1. Attempt to boot from current slot
  2. If it fails, attempt to boot from other slot
  3. If it fails, attempt to boot an initramfs image from USB

If the required env variables are not detected during sysupgrade, they are created.
Current OEM slot is detected and variables set accordingly.
We might be able to simplify this detection by assuming certain things.

Sysupgrade works but there is an issue if the alternate slot contains the OEM firmware.
UBI from OEM firmware contains a volume called ubi_rootfs which is not removed during sysyupgrade as is assigned /dev/ubiblock0_1 on next boot (from devicetree).
It can be avoided by doing a ubiformat on both mtd18 and mtd20 while installing.
This could be automated if we find a way to remove the volume during sysupgrade.