[OpenWrt-Devel] [PATCH] ramips: Fix sysupgrade for Xiaomi mir3g

mail at adrianschmutzler.de mail at adrianschmutzler.de
Sun Jan 5 11:57:52 EST 2020


Hi,

> When I use sysupgrade in 18.06 it executes the platform_check_image() 
> functions which calls nand_do_platform_check("mir3g", 
> "/tmp/openwrt-19.07-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin") 
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/base-files/lib/upgrade/platform.sh;h=ffdc5e73e0ede286c10396810954a230c8ea32fc;hb=refs/heads/openwrt-18.06#l296
> The nand_do_platform_check() function is located here: 
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/base-files/files/lib/upgrade/nand.sh;h=42f488c118fab514de7d2aee78bc431f7b8be157;hb=refs/heads/openwrt-18.06#l317
> It calls this: 
> local control_length=`(tar xf $tar_file sysupgrade-$board_name/CONTROL 
> -O | wc -c) 2> /dev/null` 
> which expands to 
> tar xf 
> /tmp/openwrt-19.07-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin 
> sysupgrade-mir3g/CONTROL 
> This file does not exists: 
> sysupgrade-mir3g/CONTROL 
> But this is there: 
> sysupgrade-xiaomi_mir3g/CONTROL 

I see. I wasn't aware that the "old" sysupgrade was effectively using the device node name here.

> The system does not find it and aborts. 
> The control_length is set to 0 and we expect the file_type detection to 
> work, but it does not because the ubi is inside the tar. 
> The sysupgrade in 19.07 supports the SUPPORTED_DEVICES, the sysupgrade 
> in 18.06 does not support the metadata fully. 
> When we do the board rename between 19.07 and master it is fine, but we 
> should not rename the board between 18.06 and 19.07. 

Since ramips in 19.07 is mixed anyway, I have no objections left.

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200105/89f780f4/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list