base-files: Add generic function for FIT-image upgrade
These functions can be used for upgrading a non-Broadcom device with standard IOPSYSWRT flash layout. The main function to be called for a device with standard flash layout is iopsys_do_upgrade. Upgrade bundle is executed if it exists within the image.
For now, only NAND is supported. Block devices support (eMMC) is still to be done.
IOPSYSWRT standard flash layout for all platforms except Broadcom is:
MTD:
- mtd0: u-boot
- mtd1: ubi
UBI:
- env1/2: U-Boot env + backup
- Then per "bank":
- boot1/2: FIT with kernel and DTB
- rootfs1/2: rootfs (UBIFS or squashfs)
- overlay1/2: UBIFS with overlay. Mounted over /
Edited by Andreas Gnau