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

Matthias Schiffer mschiffer at universe-factory.net
Sun Jun 10 09:53:05 EDT 2018


On 06/09/2018 02:54 PM, Rafał Miłecki wrote:
> brcm47xx and bcm53xx targets support multiple firmware formats, most
> of them are TRX files with vendor-specific header prepended.
> 
> They are handled in [0]
> target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
> by the platform_do_upgrade() which builds a proper command for
> extracting TRX out of vendor-specific format.
> 
> Example:
> 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
> 
> Before:
> cat /tmp/linksys-foo.bin | dd skip=32 iflag=skip_bytes
> 
> After:
> 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?

Hi,
please check if the fix in my staging fixes the issue.

Regards,
Matthias



> 
> [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
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180610/7c7d704d/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


More information about the openwrt-devel mailing list