The rom layout differences are indeed why the release sysupgrade.bin doesn't work on the r4ac international version.
If you apply this patch,
--- a/target/linux/ramips/dts/mt7628an_xiaomi_mir4a-100m.dts
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mir4a-100m.dts
@@ -90,13 +90,13 @@
partition@60000 {
label = "overlay";
- reg = <0x60000 0x100000>;
+ reg = <0x60000 0x200000>;
read-only;
};
- partition@160000 {
+ partition@260000 {
label = "firmware";
- reg = <0x160000 0xea0000>;
+ reg = <0x260000 0xda0000>;
compatible = "denx,uimage";
};
};
The resultant sysupgrade.bin works.
This is the sequence I used to install openwrt on an International version R4AC running 3.0.5 firmware:
Apply patch above to openwrt source tree.
Build openwrt
Get ssh access to r4ac router using OpenWRTInvasion
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -c 3des-cbc -o UserKnownHostsFile=/dev/null root@192.168.31.1 'cat > /tmp/sysupgrade.bin' < ~/openwrt/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-xiaomi_mir4a-100m-squashfs-sysupgrade.bin
md5 ~/openwrt/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-xiaomi_mir4a-100m-squashfs-sysupgrade.bin
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -c 3des-cbc -o UserKnownHostsFile=/dev/null root@192.168.31.1
md5sum /tmp/sysupgrade.bin
confirm the two checksums match
write the image
mtd -e OS1 -r write /tmp/sysupgrade.bin OS1
This is a lot simpler than downgrading the router to the Chinese language firmware.
openwrt probably needs a new target to accommodate the two variants.
- Mark