[PATCH v2 6/9] lib: Create a new Kconfig option for charset conversion

Simon Glass sjg at chromium.org
Fri Jul 2 20:36:17 CEST 2021


Rather than looking at two KConfig options in the Makefile, create a new
Kconfig option for compiling lib/charset.c

Enable it for UFS also, which needs this support.

Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---

(no changes since v1)

 lib/Kconfig  | 8 ++++++++
 lib/Makefile | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/Kconfig b/lib/Kconfig
index ad0cd52edd8..e1415799965 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -40,6 +40,14 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
 
 	  If unsure, say N.
 
+config CHARSET
+	bool
+	default y if UT_UNICODE || EFI_LOADER || UFS
+	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"
 	help
diff --git a/lib/Makefile b/lib/Makefile
index 881034f4ae3..2d2b273ccef 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -25,7 +25,7 @@ obj-$(CONFIG_AES) += aes/
 obj-$(CONFIG_$(SPL_TPL_)BINMAN_FDT) += binman.o
 
 ifndef API_BUILD
-ifneq ($(CONFIG_UT_UNICODE)$(CONFIG_EFI_LOADER),)
+ifneq ($(CONFIG_CHARSET),)
 obj-y += charset.o
 endif
 endif
-- 
2.32.0.93.g670b81a890-goog



More information about the U-Boot mailing list