mediatek: mt7623: re-write sysupgrade uImage.FIT on MMC
authorDaniel Golle <daniel@makrotopia.org>
Fri, 12 Nov 2021 11:50:26 +0000 (11:50 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 12 Nov 2021 15:03:02 +0000 (15:03 +0000)
Re-reading the partition table doesn't work reliably, it fails if
anything on the device is still in use and it's not trivial to prevent
every possible case of a block device still being in use somehow.

Therefore, instead of relying on the in-kernel partition parser to know
where to write the configuration backup, use OpenWrt's format-agnostic
fwtool to strip off all metadata from the image and count its blocks
while writing. In that way we can know where to write the config backup
without needing the kernel to parse the MBR and FIT structures.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

No differences found