Skip to contentSkip to conversation

fwu-mdata: Allow multiple metadata storage drivers to be enabled

PATCH In review Kory Maincent 4 participants 7 messages Jan 14 – Feb 12

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fwu-mdata: Allow multiple metadata storage drivers to be enabled

Change the Kconfig from a "choice" to a conditional block, allowing multiple FWU metadata storage drivers to be selected simultaneously instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types (e.g., both GPT-partitioned block devices and MTD devices) to have both drivers compiled in. The board can then select the appropriate driver at runtime based on the devicetree description.

The change converts FWU_MDATA to a menuconfig and replaces the "choice/endchoice" block with "if FWU_MDATA/endif", making FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

---
 drivers/fwu-mdata/Kconfig | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/fwu-mdata/Kconfig +5 -7
index 42736a5e43b..59571ac01ea 100644
@@ -1,4 +1,4 @@
-config FWU_MDATA
+menuconfig FWU_MDATA
 	bool "Driver support for accessing FWU Metadata"
 	depends on DM
 	help
@@ -6,16 +6,14 @@ config FWU_MDATA
 	  FWU Metadata partitions reside on the same storage device
 	  which contains the other FWU updatable firmware images.
 
-choice
-	prompt "Storage Layout Scheme"
-	depends on FWU_MDATA
-	default FWU_MDATA_GPT_BLK
+if FWU_MDATA
 
 config FWU_MDATA_GPT_BLK
 	bool "FWU Metadata access for GPT partitioned Block devices"
 	select PARTITION_TYPE_GUID
 	select PARTITION_UUIDS
-	depends on FWU_MDATA && BLK && EFI_PARTITION
+	depends on BLK && EFI_PARTITION
+	default y
 	help
 	  Enable support for accessing FWU Metadata on GPT partitioned
 	  block devices.
@@ -28,4 +26,4 @@ config FWU_MDATA_MTD
 	  (or non-GPT partitioned, e.g. partition nodes in devicetree)
 	  MTD devices.
 
-endchoice
+endif
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Kory Maincent

Change the Kconfig from a "choice" to a conditional block, allowing multiple FWU metadata storage drivers to be selected simultaneously instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types (e.g., both GPT-partitioned block devices and MTD devices) to have both drivers compiled in. The board can then select the appropriate driver at runtime based on the devicetree description.

Quoted 5 lines

The change converts FWU_MDATA to a menuconfig and replaces the "choice/endchoice" block with "if FWU_MDATA/endif", making FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

Signature · 1 line
Tom
#2 lore raw
Quoted 11 lines · On Wed, 14 Jan 2026 08:49:18 -0600 Tom Rini <[email protected]> wrote:
Quoted 9 lines · Kory Maincent

Change the Kconfig from a "choice" to a conditional block, allowing multiple FWU metadata storage drivers to be selected simultaneously instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types (e.g., both GPT-partitioned block devices and MTD devices) to have both drivers compiled in. The board can then select the appropriate driver at runtime based on the devicetree description.

Quoted 7 lines
Quoted 5 lines

The change converts FWU_MDATA to a menuconfig and replaces the "choice/endchoice" block with "if FWU_MDATA/endif", making FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

Hello,

Any news on this patch? Does something prevent it to be merged?

Regards,

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#3 lore raw

Hi Kory

Quoted 19 lines · Kory Maincent
Quoted 15 lines · On Wed, 14 Jan 2026 08:49:18 -0600 Tom Rini <[email protected]> wrote:
Quoted 13 lines · Kory Maincent

Change the Kconfig from a "choice" to a conditional block, allowing multiple FWU metadata storage drivers to be selected simultaneously instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types (e.g., both GPT-partitioned block devices and MTD devices) to have both drivers compiled in. The board can then select the appropriate driver at runtime based on the devicetree description.

The change converts FWU_MDATA to a menuconfig and replaces the "choice/endchoice" block with "if FWU_MDATA/endif", making FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Hello,

Any news on this patch? Does something prevent it to be merged?

I cc'ed Sughosh which maintains fwu. I can send a PR if we get an ACK

Thanks
/Ilias

Quoted 6 lines

Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

#4 lore raw
Quoted 24 lines · Ilias Apalodimas

Hi Kory

Quoted 21 lines · Kory Maincent
Quoted 17 lines · On Wed, 14 Jan 2026 08:49:18 -0600 Tom Rini <[email protected]> wrote:
Quoted 14 lines · Kory Maincent

Change the Kconfig from a "choice" to a conditional block, allowing multiple FWU metadata storage drivers to be selected simultaneously instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types (e.g., both GPT-partitioned block devices and MTD devices) to have both drivers compiled in. The board can then select the appropriate driver at runtime based on the devicetree description.

The change converts FWU_MDATA to a menuconfig and replaces the "choice/endchoice" block with "if FWU_MDATA/endif", making FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Hello,

Any news on this patch? Does something prevent it to be merged?

I cc'ed Sughosh which maintains fwu. I can send a PR if we get an ACK

Apologies for the delay. I will get back on this by tomorrow. Thanks.

-sughosh

Quoted 9 lines

Thanks
/Ilias

Quoted 6 lines

Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

#5 lore raw
Quoted 28 lines · Sughosh Ganu
Quoted 26 lines · Ilias Apalodimas

Hi Kory

Quoted 23 lines · Kory Maincent
Quoted 18 lines · On Wed, 14 Jan 2026 08:49:18 -0600 Tom Rini <[email protected]> wrote:
Quoted 9 lines · Kory Maincent

Change the Kconfig from a "choice" to a conditional block, allowing multiple FWU metadata storage drivers to be selected simultaneously instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types (e.g., both GPT-partitioned block devices and MTD devices) to have both drivers compiled in. The board can then select the appropriate driver at runtime based on the devicetree description.

Quoted 5 lines

The change converts FWU_MDATA to a menuconfig and replaces the "choice/endchoice" block with "if FWU_MDATA/endif", making FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Hello,

Any news on this patch? Does something prevent it to be merged?

I cc'ed Sughosh which maintains fwu. I can send a PR if we get an ACK

Apologies for the delay. I will get back on this by tomorrow. Thanks.

Thanks Sughosh. If you are limited on time you can ignore
https://lore.kernel.org/u-boot/20260206152027.1c371812@kmaincent-XPS-13-7390/
I've already reviewed it and I'll send a PR to Tom shortly.

Cheers
/Ilias

Quoted 12 lines

-sughosh

Quoted 9 lines

Thanks
/Ilias

Quoted 6 lines

Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Acked-by on v1 1/1
#6 lore raw
In reply to Kory Maincent
Quoted 9 lines · Kory Maincent

Change the Kconfig from a "choice" to a conditional block, allowing multiple FWU metadata storage drivers to be selected simultaneously instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types (e.g., both GPT-partitioned block devices and MTD devices) to have both drivers compiled in. The board can then select the appropriate driver at runtime based on the devicetree description.

Quoted 6 lines

The change converts FWU_MDATA to a menuconfig and replaces the "choice/endchoice" block with "if FWU_MDATA/endif", making FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

---

-sughosh

Quoted 42 lines
 drivers/fwu-mdata/Kconfig | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/fwu-mdata/Kconfig +5 -7
index 42736a5e43b..59571ac01ea 100644
@@ -1,4 +1,4 @@
-config FWU_MDATA
+menuconfig FWU_MDATA
 	bool "Driver support for accessing FWU Metadata"
 	depends on DM
 	help
@@ -6,16 +6,14 @@ config FWU_MDATA
 	  FWU Metadata partitions reside on the same storage device
 	  which contains the other FWU updatable firmware images.
 
-choice
-	prompt "Storage Layout Scheme"
-	depends on FWU_MDATA
-	default FWU_MDATA_GPT_BLK
+if FWU_MDATA
 
 config FWU_MDATA_GPT_BLK
 	bool "FWU Metadata access for GPT partitioned Block devices"
 	select PARTITION_TYPE_GUID
 	select PARTITION_UUIDS
-	depends on FWU_MDATA && BLK && EFI_PARTITION
+	depends on BLK && EFI_PARTITION
+	default y
 	help
 	  Enable support for accessing FWU Metadata on GPT partitioned
 	  block devices.
@@ -28,4 +26,4 @@ config FWU_MDATA_MTD
 	  (or non-GPT partitioned, e.g. partition nodes in devicetree)
 	  MTD devices.
 
-endchoice
+endif
Signature · 1 line
2.43.0