bcm27xx: squashf/f2fs sysupgrade broken because overlay is not padded/erased

Michael Richardson mcr at sandelman.ca
Wed May 17 11:19:36 PDT 2023


Lukas Zeller <luz at plan44.ch> wrote:
    > I really need help to even figure out a feasible idea to fix this, let
    > alone implement it in a clean way. What comes to my mind so far is:

    > - trying to just zero out enough blocks after the squashfs data in
    > `target/linux/bcm27xx/base-files/lib/upgrade/platform.sh`
    > platform_do_upgrade() to make sure a subsequent mount_root will NOT
    > attempt to mount broken remains of an f2fs. However, as this function
    > also still handles ext4-only case and even multiple partition images,
    > I'm not understanding this well enough to see how to do that properly.

I'm not really clued in to the subtlies here, but it seems like a TRIM is
missing that would have told the SDcard that there was just no data after the
new image.  That should result in zeros being returned rather than garbage.

    > - rearranging things to separate the squashfs/f2fs case from the
    > platform specific ext4 case, i.e. using the standard way of creating
    > the empty or restored overlay f2fs right after writing the new
    > squashfs, as default_do_upgrade() does. Only on bcm27xx, there's no
    > mtd, but mmc. So this would require even more in detail knowledge I
    > don't have.

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 511 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20230517/f07f2654/attachment.sig>


More information about the openwrt-devel mailing list