
Some boards provide main U-Boot as a dedicated partition to SPL. Currently we can define either a fixed partition number or an MBR partition type to define which partition is to be used.
Partition numbers tend to conflict with established partitioning schemes of Linux distros. MBR partitioning is more and more replaced by GPT partitioning.
Allow defining a partition type GUID identifying the partition to load main U-Boot from.
To avoid using #ifdef in the implementation:
* introduce accessors for fields of struct disk_partition * provide a macro IF_ENABLED
v3: avoid usage of #ifdef v2: avoid if/endif in Kconfig
The necessity of the Kconfig setting was discussed in https://lore.kernel.org/u-boot/20230216152956.130038-1-heinrich.schuchardt@c...
Heinrich Schuchardt (3): disk: accessors for conditional partition fields kconfig: new macro IF_ENABLED() spl: allow loading via partition type GUID
common/spl/Kconfig | 27 ++++++++++++++++++++++----- common/spl/spl_mmc.c | 18 ++++++++++++++++++ include/linux/kconfig.h | 7 +++++++ include/part.h | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 5 deletions(-)