gemini: Fix up sysupgrade platform.sh script
authorLinus Walleij <linusw@kernel.org>
Sun, 25 Jan 2026 18:01:45 +0000 (19:01 +0100)
committerLinus Walleij <linusw@kernel.org>
Thu, 29 Jan 2026 09:15:14 +0000 (10:15 +0100)
commit04bc0b6d3f440cc139d6e320cba165b37cda9c9b
tree0f037bfa293de2770a6565b2bb5f89be8d00efc3
parent42f9b095d68e807100c45edff019eb37dccdd2f0
gemini: Fix up sysupgrade platform.sh script

The Storlink reference designs sometimes fail upgrade because
not the entire partition is used, so the size isn't equal to
the actual flash space available for the partition.

Fix this by calculating the actual partition sizes by measuring
across the partition offsets instead.

Link: https://github.com/openwrt/openwrt/pull/21750
Signed-off-by: Linus Walleij <linusw@kernel.org>
target/linux/gemini/base-files/lib/upgrade/platform.sh