public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v3 0/3] spl: allow loading via partition type GUID
@ 2023-02-19 11:36 Heinrich Schuchardt
  2023-02-19 11:36 ` [PATCH v3 1/3] disk: accessors for conditional partition fields Heinrich Schuchardt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Heinrich Schuchardt @ 2023-02-19 11:36 UTC (permalink / raw)
  To: Tom Rini
  Cc: Simon Glass, Andrew Davis, Stefan Roese, Alper Nebi Yasak,
	Jérôme Carretero, Andre Przywara, Harald Seiler,
	Philippe Reynes, Yanhong Wang, u-boot, Heinrich Schuchardt

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@canonical.com/

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(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-21 19:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-19 11:36 [PATCH v3 0/3] spl: allow loading via partition type GUID Heinrich Schuchardt
2023-02-19 11:36 ` [PATCH v3 1/3] disk: accessors for conditional partition fields Heinrich Schuchardt
2023-02-20 16:21   ` Simon Glass
2023-02-19 11:36 ` [PATCH v3 2/3] kconfig: new macro IF_ENABLED() Heinrich Schuchardt
2023-02-20 17:14   ` Andre Przywara
2023-02-21 19:41     ` Simon Glass
2023-02-19 11:36 ` [PATCH v3 3/3] spl: allow loading via partition type GUID Heinrich Schuchardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox