[U-Boot] [PATCH 0/2] efi_loader: make Unicode collation protocol customizable

Our development target is to reach Embedded Base Boot Requirements (EBBR) specification compliance. Functionality that is not needed for this target should be customizable.
Provide a new configuration option to idsable the Unicode collation protocol.
Heinrich Schuchardt (2): efi_loader: format Kconfig efi_loader: make Unicode collation protocol customizable
lib/efi_loader/Kconfig | 52 +++++++++++++++++++++------------- lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_root_node.c | 2 ++ lib/efi_selftest/Makefile | 3 +- 4 files changed, 37 insertions(+), 22 deletions(-)
-- 2.20.1

Use if/endif for dependencies to give structure to the configuration menu.
Sort important settings to the top.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- lib/efi_loader/Kconfig | 43 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 50b050159c..055051bde3 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -16,9 +16,21 @@ config EFI_LOADER interfaces to a loaded EFI application, enabling it to reuse U-Boot's device drivers.
+if EFI_LOADER + +config EFI_LOADER_HII + bool "Expose HII protocols to EFI applications" + default y + help + The Human Interface Infrastructure is a complicated framework that + allows UEFI applications to draw fancy menus and hook strings using + a translation framework. + + U-Boot implements enough of its features to be able to run the UEFI + Shell, but not more than that. + config EFI_UNICODE_CAPITALIZATION bool "Support Unicode capitalization" - depends on EFI_LOADER default y help Select this option to enable correct handling of the capitalization of @@ -26,33 +38,22 @@ config EFI_UNICODE_CAPITALIZATION set, only the the correct handling of the letters of the codepage used by the FAT file system is ensured.
-config EFI_PLATFORM_LANG_CODES - string "Language codes supported by firmware" - depends on EFI_LOADER - default "en-US" - help - This value is used to initialize the PlatformLangCodes variable. Its - value is a semicolon (;) separated list of language codes in native - RFC 4646 format, e.g. "en-US;de-DE". The first language code is used - to initialize the PlatformLang variable. - config EFI_LOADER_BOUNCE_BUFFER bool "EFI Applications use bounce buffers for DMA operations" - depends on EFI_LOADER && ARM64 + depends on ARM64 default n help Some hardware does not support DMA to full 64bit addresses. For this hardware we can create a bounce buffer so that payloads don't have to worry about platform details.
-config EFI_LOADER_HII - bool "Expose HII protocols to EFI applications" - depends on EFI_LOADER - default y +config EFI_PLATFORM_LANG_CODES + string "Language codes supported by firmware" + default "en-US" help - The Human Interface Infrastructure is a complicated framework that - allows UEFI applications to draw fancy menus and hook strings using - a translation framework. + This value is used to initialize the PlatformLangCodes variable. Its + value is a semicolon (;) separated list of language codes in native + RFC 4646 format, e.g. "en-US;de-DE". The first language code is used + to initialize the PlatformLang variable.
- U-Boot implements enough of its features to be able to run the UEFI - Shell, but not more than that. +endif -- 2.20.1

The Unicode collation protocol is not needed for EBBR compliance. So let's make it a customizable option.
The Unicode capitalization table is only needed by this protocol. So let it depend on the Unicode collation protocol.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- lib/efi_loader/Kconfig | 11 +++++++++++ lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_root_node.c | 2 ++ lib/efi_selftest/Makefile | 3 ++- 4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 055051bde3..0307d731a8 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -29,6 +29,15 @@ config EFI_LOADER_HII U-Boot implements enough of its features to be able to run the UEFI Shell, but not more than that.
+config EFI_UNICODE_COLLATION_PROTOCOL + bool "Provide Unicode collation protocol" + default y + help + The Unicode collation protocol is used for lexical comparisons. It is + required to run the UEFI shell. + +if EFI_UNICODE_COLLATION_PROTOCOL + config EFI_UNICODE_CAPITALIZATION bool "Support Unicode capitalization" default y @@ -38,6 +47,8 @@ config EFI_UNICODE_CAPITALIZATION set, only the the correct handling of the letters of the codepage used by the FAT file system is ensured.
+endif + config EFI_LOADER_BOUNCE_BUFFER bool "EFI Applications use bounce buffers for DMA operations" depends on ARM64 diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index e6bbe43154..2b1ae61a3d 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -30,7 +30,7 @@ obj-y += efi_memory.o obj-y += efi_root_node.o obj-y += efi_runtime.o obj-y += efi_setup.o -obj-y += efi_unicode_collation.o +obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL) += efi_unicode_collation.o obj-y += efi_variable.o obj-y += efi_watchdog.o obj-$(CONFIG_LCD) += efi_gop.o diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c index 38514e0820..f36ca3456e 100644 --- a/lib/efi_loader/efi_root_node.c +++ b/lib/efi_loader/efi_root_node.c @@ -58,9 +58,11 @@ efi_status_t efi_root_node_register(void) /* Device path utilities protocol */ &efi_guid_device_path_utilities_protocol, (void *)&efi_device_path_utilities, +#if CONFIG_IS_ENABLED(EFI_UNICODE_COLLATION_PROTOCOL) /* Unicode collation protocol */ &efi_guid_unicode_collation_protocol, (void *)&efi_unicode_collation_protocol, +#endif #if CONFIG_IS_ENABLED(EFI_LOADER_HII) /* HII string protocol */ &efi_guid_hii_string_protocol, diff --git a/lib/efi_selftest/Makefile b/lib/efi_selftest/Makefile index c69ad7a9c0..7fdf189c5c 100644 --- a/lib/efi_selftest/Makefile +++ b/lib/efi_selftest/Makefile @@ -34,11 +34,12 @@ efi_selftest_textinput.o \ efi_selftest_textinputex.o \ efi_selftest_textoutput.o \ efi_selftest_tpl.o \ -efi_selftest_unicode_collation.o \ efi_selftest_util.o \ efi_selftest_variables.o \ efi_selftest_watchdog.o
+obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL) += efi_selftest_unicode_collation.o + obj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o obj-$(CONFIG_EFI_LOADER_HII) += efi_selftest_hii.o
-- 2.20.1
participants (1)
-
Heinrich Schuchardt