[PATCH 1/1] lib: fix selection of CONFIG_CHARSET

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Mon May 2 06:39:24 CEST 2022


lib/charset.c is not optional for
EFI_APP || EFI_LOADER || UFS || UT_UNICODE.
These must select CONFIG_CHARSET.

Fixes: 726cd9836db0 ("efi: Make unicode printf available to the app")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 drivers/ufs/Kconfig    | 1 +
 lib/Kconfig            | 5 -----
 lib/efi/Kconfig        | 1 +
 lib/efi_loader/Kconfig | 1 +
 test/Kconfig           | 1 +
 5 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/ufs/Kconfig b/drivers/ufs/Kconfig
index c2aafd3020..69ea18edf8 100644
--- a/drivers/ufs/Kconfig
+++ b/drivers/ufs/Kconfig
@@ -3,6 +3,7 @@ menu "UFS Host Controller Support"
 config UFS
 	bool "Support UFS controllers"
 	depends on DM_SCSI
+	select CHARSET
 	help
 	  This selects support for Universal Flash Subsystem (UFS).
 	  Say Y here if you want UFS Support.
diff --git a/lib/Kconfig b/lib/Kconfig
index 858be14f09..25d15058e9 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -52,11 +52,6 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
 
 config CHARSET
 	bool
-	default y if UT_UNICODE || EFI_LOADER || UFS || EFI_APP
-	help
-	  Enables support for various conversions between different
-	  character sets, such as between unicode representations and
-	  different 'code pages'.
 
 config DYNAMIC_CRC_TABLE
 	bool "Enable Dynamic tables for CRC"
diff --git a/lib/efi/Kconfig b/lib/efi/Kconfig
index 15ce99e1a7..c2b9bb73f7 100644
--- a/lib/efi/Kconfig
+++ b/lib/efi/Kconfig
@@ -14,6 +14,7 @@ choice
 
 config EFI_APP
 	bool "Support running as an EFI application"
+	select CHARSET
 	help
 	  Build U-Boot as an application which can be started from EFI. This
 	  is useful for examining a platform in the early stages of porting
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index 6b245f50a7..eb2d6fddc4 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -14,6 +14,7 @@ config EFI_LOADER
 	depends on DM_ETH || !NET
 	depends on !EFI_APP
 	default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
+	select CHARSET
 	select DM_EVENT
 	select EVENT_DYNAMIC
 	select LIB_UUID
diff --git a/test/Kconfig b/test/Kconfig
index e15ba239eb..7f3447ae5a 100644
--- a/test/Kconfig
+++ b/test/Kconfig
@@ -91,6 +91,7 @@ config UT_UNICODE
 	bool "Unit tests for Unicode functions"
 	depends on UNIT_TEST
 	default y
+	select CHARSET
 	help
 	  Enables the 'ut unicode' command which tests that the functions for
 	  manipulating Unicode strings work correctly.
-- 
2.34.1



More information about the U-Boot mailing list