[PATCH v3 06/20] FWU: Avoid showing an unselectable menu option

Simon Glass sjg at chromium.org
Mon Sep 4 16:41:09 CEST 2023


Use a menuconfig to avoid showing a menu which cannot be selected in many
cases.

Signed-off-by: Simon Glass <sjg at chromium.org>
Acked-by: Sughosh Ganu <sughosh.ganu at linaro.org>
Reviewed-by: Tom Rini <trini at konsulko.com>
---

Changes in v3:
- Drop comment about an update/ directory

Changes in v2:
- Fix FMU typo in the subject
- Drop now-unnecessary depends on FWU_MULTI_BANK_UPDATE

 lib/Kconfig             | 4 ----
 lib/fwu_updates/Kconfig | 9 +++++----
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/lib/Kconfig b/lib/Kconfig
index 9addcfab3734..bfab2f3165a7 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -1118,8 +1118,4 @@ config PHANDLE_CHECK_SEQ
 
 endmenu
 
-menu "FWU Multi Bank Updates"
-
 source lib/fwu_updates/Kconfig
-
-endmenu
diff --git a/lib/fwu_updates/Kconfig b/lib/fwu_updates/Kconfig
index 71f34793d926..d35247d0e5d4 100644
--- a/lib/fwu_updates/Kconfig
+++ b/lib/fwu_updates/Kconfig
@@ -1,4 +1,4 @@
-config FWU_MULTI_BANK_UPDATE
+menuconfig FWU_MULTI_BANK_UPDATE
 	bool "Enable FWU Multi Bank Update Feature"
 	depends on EFI_CAPSULE_ON_DISK
 	select PARTITION_TYPE_GUID
@@ -10,24 +10,25 @@ config FWU_MULTI_BANK_UPDATE
 	  multiple banks(copies) of the firmware images. One of the
 	  bank is selected for updating all the firmware components
 
+if FWU_MULTI_BANK_UPDATE
+
 config FWU_NUM_BANKS
 	int "Number of Banks defined by the platform"
-	depends on FWU_MULTI_BANK_UPDATE
 	help
 	  Define the number of banks of firmware images on a platform
 
 config FWU_NUM_IMAGES_PER_BANK
 	int "Number of firmware images per bank"
-	depends on FWU_MULTI_BANK_UPDATE
 	help
 	  Define the number of firmware images per bank. This value
 	  should be the same for all the banks.
 
 config FWU_TRIAL_STATE_CNT
 	int "Number of times system boots in Trial State"
-	depends on FWU_MULTI_BANK_UPDATE
 	default 3
 	help
 	  With FWU Multi Bank Update feature enabled, number of times
 	  the platform is allowed to boot in Trial State after an
 	  update.
+
+endif
-- 
2.42.0.283.g2d96d420d3-goog



More information about the U-Boot mailing list