[OpenWrt-Devel] sysupgrade broken by 30f61a34b4cf ("base-files: always use staged sysupgrade")

Rafał Miłecki zajec5 at gmail.com
Sat Jun 9 08:54:54 EDT 2018

brcm47xx and bcm53xx targets support multiple firmware formats, most
of them are TRX files with vendor-specific header prepended.

They are handled in [0]
by the platform_do_upgrade() which builds a proper command for
extracting TRX out of vendor-specific format.

To sysupgrade using Linksys's CyberTAN format something like this is called:
default_do_upgrade "/tmp/linksys-foo.bin" "dd bs=64 skip=1"

The problem is above commit introduced a regression breaking
sysupgrade using all these formats. The string returned by get_image()
has changed

cat /tmp/linksys-foo.bin | dd skip=32 iflag=skip_bytes

dd skip=32 iflag=skip_bytes /tmp/linksys-foo.bin 2>/dev/null

As you can see command generated by get_image() after commit [1]
30f61a34b4cf ("base-files: always use staged sysupgrade") has changed,
is wrong and can't work.

Matthias: can you look at this, please?

[0] https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/bcm53xx/base-files/lib/upgrade/platform.sh#l322
[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=30f61a34b4cfd2c676fea4a919e089d6a77254e9


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list