[RFC 1/1] disk: PARTITIONS should depend on HAVE_BLOCK_DEVICE

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Jan 25 17:28:39 CET 2021


Partitions are only relevant for block devices.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
I still need to check if the part command is needed on boards
w/o DISTRO_DEFAULTS.
---
 cmd/Kconfig  | 4 ++--
 disk/Kconfig | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 0625ee4050..e253fb7a68 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1171,8 +1171,8 @@ config CMD_OSD

 config CMD_PART
 	bool "part"
-	select HAVE_BLOCK_DEVICE
-	select PARTITION_UUIDS
+	depends on PARTITION_UUIDS
+	default y if DISTRO_DEFAULTS
 	help
 	  Read and display information about the partition table on
 	  various media.
diff --git a/disk/Kconfig b/disk/Kconfig
index cee16a80bc..1dfe3a0667 100644
--- a/disk/Kconfig
+++ b/disk/Kconfig
@@ -3,6 +3,7 @@ menu "Partition Types"

 config PARTITIONS
 	bool "Enable Partition Labels (disklabels) support"
+	depends on HAVE_BLOCK_DEVICE
 	default y
 	select SPL_SPRINTF if SPL
 	select TPL_SPRINTF if TPL
--
2.29.2



More information about the U-Boot mailing list