ipq806x: switch to full dual-boot for the nbg6817 sysupgrade support
authorStefan Lippers-Hollmann <s.l-h@gmx.de>
Thu, 18 Jan 2018 21:41:44 +0000 (22:41 +0100)
committerJohn Crispin <john@phrozen.org>
Tue, 13 Feb 2018 11:45:00 +0000 (12:45 +0100)
commit4baffa02ce2f3b04be37628f0965b0bade5019cf
tree01a901999bd054844bf4b0707045773d95c67fef
parent42fe7b3bbe682fc7902580226986abe10ffee8ea
ipq806x: switch to full dual-boot for the nbg6817 sysupgrade support

Instead of writing to the currently booted partition set, this
implements full dual-boot support for sysupgrade by always writing to
the other, currently inactive, partition set and toggling the dualflag
after a successful flash.

The currently active/ booted partition set is determined by parsing
/proc/cmdline for its rootfs parameter (supplied by the DTS), instead
of reading from the 0:DUAL_FLAG mtd, in order to prevent (potentially)
bricking both partition sets.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh