summaryrefslogtreecommitdiff
path: root/include/configs/uniphier.h
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-05-31 10:32:36 +0200
committerTom Rini <trini@konsulko.com>2022-07-08 09:05:47 -0400
commite6ca148104fe66ccc5991b06a88f431c9537c366 (patch)
treef087cfca26d507a476099414b3eb5e0e439c445f /include/configs/uniphier.h
parent69ca709d0fb001851f443b0b744c6d65bb6c22c1 (diff)
downloadu-boot-e6ca148104fe66ccc5991b06a88f431c9537c366.tar.gz
u-boot-e6ca148104fe66ccc5991b06a88f431c9537c366.tar.bz2
u-boot-e6ca148104fe66ccc5991b06a88f431c9537c366.zip
distroboot: Fix ubifs
Fix multiple issues in ubifs distroboot code: U-Boot supports attaching only one MTD device as UBI at the time. So always call 'ubifsmount ubi0:${bootubivol}' for mounting UBI volume ${bootubivol}. Usage of 'ubi${devnum}' is incorrect as 'ubi part' command attach MTD device always as UBI device ubi0. Set distroboot ${bootfstype} variable to ubifs in ubifs_boot command. Distroboot scripts require ${bootfstype} variable to be properly set and it is already set for all other boot types. Set distroboot ${distro_bootpart} variable to ${bootubivol} value. UBI device does not have partitions, but has volumes. Distroboot scripts require something to be set in ${distro_bootpart} variable, so set it to the UBI volume which is currently mounted by ubifs. Set distroboot ${devnum} variable to fixed string "ubi0". ubifs code differs from the other partition code that it requires "ubi" prefix before number. Explicitly unmount ubifs volume after loading all data from it. This allows to detach UBI device from MTD device. Move definition of MTD device with UBI and UBI volume with ubifs filesystem from global env variables ${bootubipart} and ${bootubivol} into the distroboot "func" macro, defined in board include config files. UBIFS distroboot macros then set ${bootubipart} and ${bootubivol} local variables for compatibility with existing distroboot scripts. This last change allows to define more UBIFS target devices and make it clear what is boot MTD/UBI device. All board include config files are adjusted to use this new scheme of specifying boot MTD/UBI device. Signed-off-by: Pali Rohár <pali@kernel.org> Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Diffstat (limited to 'include/configs/uniphier.h')
-rw-r--r--include/configs/uniphier.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 15d41fba95..15ae0844c1 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -19,7 +19,7 @@
#endif
#ifdef CONFIG_CMD_UBIFS
-#define BOOT_TARGET_DEVICE_UBIFS(func) func(UBIFS, ubifs, 0)
+#define BOOT_TARGET_DEVICE_UBIFS(func) func(UBIFS, ubifs, 0, UBI, boot)
#else
#define BOOT_TARGET_DEVICE_UBIFS(func)
#endif