tplink-safeloader support-list on CPE/WBS devices

Matthias Schiffer mschiffer at universe-factory.net
Mon Aug 31 15:49:19 EDT 2020


On 8/31/20 9:37 PM, Adrian Schmutzler wrote:
>>> For OpenWrt to OpenWrt upgrades (after a factory upgrade), I think you 
>>> are right that soft-version and support-list can be left untouched. 
>>> last_sysupgrade_partition could then be 'file-system', given the 
>>> modified partition table for these devices. 
>>>
>> On CPE510 v1 etc., OpenWrt's sysupgrade handler checks that an upgrade 
>> image's support-list section contains the correct string to verify image 
>> validity (this was implemented long before the new metadata code became 
>> reality). For simplicity, the sysupgrade image has the same layout that 
>> would end up im flash after the factory install. The soft-version and 
>> support-list partitions are then overwritten during rootfs creation. 
>> I don't have much knowledge about other devices using the safeloader, but I 
>> assume image validity has be checked in some other way there. 
> 
> Okay, so based on both of your feedback the safeloader settings seem right and shouldn't be touched.
> 
> My main "problem" is that in the DTS the support-list/soft-version is just part of the rootfs partition, which in DTS is 0x10000 bigger than file-system in safeloader.
> 
> This looks to me like technically the support-list/soft-version could be overwritten if rootfs is almost full?
> 
> I'd personally prefer to "protect" these partition in the DTS, e.g. by adding a 0x10000-sized "tplink" partition at 0x7b0000 or similar.
> I assume that for sysupgrade to work, this partition cannot be "read-only" then and would have to be part of the nested firmware partition?
> 
> Best
> 
> Adrian
> 

The support-list and soft-version partitions are overwritten as soon as the
rootfs is formatted, directly after installation. When a sysupgrade is
installed, the new image has a support-list and a soft-version again, but
like after factory install, they will be overwritten right away.

I'm not sure if sysupgrade would succeed if the installed image is
truncated because it is bigger than the firmware partition. I don't see a
problem with the current setup, and it's nice that this space is actually
usable for the rootfs.

Kind regards,
Matthias

-------------- 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.openwrt.org/pipermail/openwrt-devel/attachments/20200831/c930c17f/attachment.sig>


More information about the openwrt-devel mailing list