meta-digi/meta-digi-dey/recipes-core/recovery/recovery-initramfs
Gabriel Valcazar 5695cf15db recovery-initramfs-init: fix "update" volume wipe when singlemtdsys is enabled
Currently, when wiping the update volume via the recovery partition on a
ccimx6ul with singlemtdsys enabled, the procedure fails with this error:

    [RECOVERY] Starting recovery...
    [RECOVERY] Wipe 'update' partition requested
    [RECOVERY] Formatting 'update' ubi volume
    ubi0 error: ubi_open_volume.part.0: cannot open device 0, volume 3, error -16
    ubiupdatevol: error!: cannot open "/dev/ubi0_3"
                  error 16 (Device or resource busy)

This is because the logic used to unmount a volume before formatting it is
expecting this entry format when running "mount":

    ubi0:update on /mnt/update type ubifs

While this is the format of the "mount" output in userspace for the rootfs
volume, other trivial volumes have this format instead:

    ubi0_3 on /mnt/update type ubifs

Adapt the logic to this format so that the "update" volume wipe procedure can
take place.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-06-28 13:07:11 +02:00
..
automount_block.sh recovery-initramfs-init: remove parted dependency 2017-08-29 18:15:43 +02:00
automount_mtd.sh recovery init: detach 'update' MTD device from UBI if volume is not found 2017-03-22 15:03:24 +01:00
automount_ubi.sh recovery-initramfs: add script and mdev rule for UBI volumes 2023-01-17 16:50:11 +01:00
mdev.conf recovery-initramfs: add script and mdev rule for UBI volumes 2023-01-17 16:50:11 +01:00
mount_cryptrootfs.sh swu-images: fix support to preinstallation script in swu update package 2021-11-08 08:39:18 +01:00
recovery-initramfs-init recovery-initramfs-init: fix "update" volume wipe when singlemtdsys is enabled 2024-06-28 13:07:11 +02:00