[OpenWrt-Devel] [PATCH 2/3] imx6: get rid of platform_pre_upgrade()
rafal at milecki.pl
Tue Jul 16 17:13:16 EDT 2019
On 2019-07-12 14:05, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
> The only step between platform_pre_upgrade() and platform_do_upgrade()
> is switching to ramdisk. It should be fine to call "jffs2reset" &
> "umount" from the later callback and get rid of the first one.
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
That patch was wrong. On imx6 "jffs2reset -y" has to be called in
platform_pre_upgrade() AKA before the switch_to_ramfs().
jffs2reset finds "rootfs_data" volume (emmc f2fs partition with
"rootfs_data" label) and erases all files from it:
> /dev/loop0 is mounted as /overlay, only erasing files
It cannot be handled after switch_to_ramfs() as that function umounts
Big thanks for Petr for checking that with me!
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel