]> git.baikalelectronics.ru Git - uboot.git/commit
distroboot: ubifs: Add support for specifying UBI header offset
authorPali Rohár <pali@kernel.org>
Sun, 7 Aug 2022 19:04:22 +0000 (21:04 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 27 Aug 2022 00:45:15 +0000 (20:45 -0400)
commit0867100043e5d01f3afd95a904abdb23b9b2f8c4
tree752f7cfa2ab81b6b3b0608030e4d9dd135b9cfb4
parente6163603c65a8c3f82788b4395f86d97d62d9846
distroboot: ubifs: Add support for specifying UBI header offset

Some UBI partitions may use non-standard UBI header offset. For attaching
these UBI partitions it is required to pass second argument with offset to
"ubi part" command.

Therefore extend distroboot to allow specifying additional optional 6th
argument with UBI header offset. This offset is set in new distroboot
variable ${bootubioff} which may be used by distroboot script to e.g.
properly pass this value to linux kernel command line for proper mounting
of rootfs by kernel. This variable is set to empty string (cleared) when
UBI header offset is not specified into distroboot BOOT_TARGET_DEVICES
macro.

Usage of helper macro BOOTENV_DEV_UBIFS_BOOTUBIOFF in this change is there
as a type check. It ensures that in BOOT_TARGET_DEVICES macro was specified
UBIFS func with either 5 or 6 arguments. If not then cpp throws compile
error.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/config_distro_bootcmd.h