My understanding is that flashing overwrites the backup - not the booted image.
Pasted from the V1 commit page:
If booted from 'A',
flashing over 'B' won't work. To get around this, you should flash the
OEM image over itself. This will then boot the router from 'B' and
allow you to flash OpenWRT without problems.
I not sure, if you are running OpenWrt on 'A', that you can reflash OpenWrt to 'B' using the OpenWrt interfaces. There may be a way to ID the 'B' partition and use mtd but I actually like having OEM as a backup.
Yes, understand your point (OEM as a backup) - it's not bad, agreed there. What has been confusing me is that my Linksys EA3500 is also dual partition, and it behaves differently => always flashes the backup (non-active) partition.
So I tried something ... updated and re-built OpenWrt, flashed it. It should flash the backup partition, as you noted - but it doesn't! Confirmed, it flashes the active (OpenWrt) partition. Then it reboots to the alternative partition (which is OEM) ... so a bit odd and confusing. I then told Linksys OEM firmware to swap back (no flash) => it did, and I can confirm, the sysupgrade was applied to the active partition, not backup.
Seems the notes need to change, or modify the code to flash the alternative partition?
Staying with the A/B syntax, it appears that only 'A' can be flashed with OpenWrt, I agree that it would be useful to have documentation to that effect for the multiple Linksys devices that use this scheme. If you are successful reaching the V1 committer, getting his buy-in would be nice. I previously emailed him but did not get a response.
Sure, will let you know. I can see an upside of this as well - it was just confusing me to start, given how the EA3500 works. And also a bit confusing to upgrade OpenWrt, then boot to OEM ... .
Want to try to see if settings are saved - I have a bad feeling this won't work, as they are restored on reboot. Hmmm ... then again, they may, given how they are stored.
Yes, sorry - I wasn't very clear (not even close ). I see that in the EA3500 (and some other Linksys dual partition devices), inside platform.sh, the dual platform devices call,
platform_do_upgrade_linksys "$1"
vs. other devices, that call,
nand_do_upgrade "$1"
In the EA7300v2 (the commit you mention), platform.sh calls,
nand_do_upgrade "$1"
So this needs to be updated, to match the other dual partition devices, agreed?
Most of this is over my head but when doing pre-purchase research, I was looking at different u-boot setups. The Xiaomi Mi Router 4A thread may be helpful. I think most boot loader partitions are mounted read only. In that thread, initial access to the boot loader was gained by copying the partition, using a hex editor to change the boot delay and then using mtd to overwrite the partition. A backup of the original, unedited boot partition would be prudent. https://forum.openwrt.org/t/xiaomi-mi-router-4a-gigabit-edition-r4ag-r4a-gigabit-fully-supported-and-flashable-with-openwrtinvasion/36685
I've seen this likened to a nuclear option and it is considered risky.
Yes, sorry - I wasn't very clear. I meant because it was in the router as read-only, I wasn't sure how to get back to OEM to re-flash. I got back though with 3x power cycles, then re-flashed with read-only removed. Now I can use advanced reboot, selectively go back and forth between partitions. Perfect - thanks!
Now, to figure out why sysupgrade isn't writing to the alternative partition. Hmmm.
I have a Linksys EA7300, I did the update to OpenWRT, however in partition B it continues in OEM and every time the router is turned off and on it starts up with partition B OEM. Could you please help me.
I haven't understood the flashing instruction in git.
Anybody can better explain the meaning of When flashing, OEM firmware writes over the non-booted partition. If booted from 'A', flashing over 'B' won't work. To get around this, you should flash the OEM image over itself. This will then boot the router from 'B' and allow you to flash OpenWRT without problems
I'm not sure about the sequence of operations.