[PATCH] bcm4908: support "rootfs_data" on U-Boot devices
zajec5 at gmail.com
Fri Mar 4 07:23:51 PST 2022
On 5.01.2022 23:16, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
> 1. Create "rootfs_data" dynamicaly
> U-Boot firmware images can contain only kernel and rootfs volume
> (squashfs in case of OpenWrt). There is no way to include "rootfs_data"
> UBI volume or make firmware file tell U-Boot to create one.
> For that reason "rootfs_data" needs to be created dynamically. Use
> preinit script to handle that. Fire it right before "mount_root" one.
> 2. Relate "rootfs_data" to flashed firmware
> As already explained flashing new firmware with U-Boot will do nothing
> to the "rootfs_data". It could result in new firmware reusing old
> overlay UBI volume and its file. Users expect a clean state after
> flashing firmware (even if flashing the same one).
> Solve that by reading flash counter of running firmware and storing it
> in "rootfs_data" UBI volume. Every mismatch will result in wiping old
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
Pushed cleaned up version with sysupgrade support:
93259e8ca261 ("bcm4908: support "rootfs_data" on U-Boot devices master")
More information about the openwrt-devel