efi_loader: make Unicode collation protocol customizable
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 8 May 2019 21:24:26 +0000 (23:24 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 12 May 2019 18:54:22 +0000 (20:54 +0200)
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
lib/efi_loader/Makefile
lib/efi_loader/efi_root_node.c
lib/efi_selftest/Makefile

index 2b7ac68..3feb04a 100644 (file)
@@ -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.
 
          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 "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
 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.
 
          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
 config EFI_LOADER_BOUNCE_BUFFER
        bool "EFI Applications use bounce buffers for DMA operations"
        depends on ARM64
index e6bbe43..2b1ae61 100644 (file)
@@ -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_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
 obj-y += efi_variable.o
 obj-y += efi_watchdog.o
 obj-$(CONFIG_LCD) += efi_gop.o
index 38514e0..f36ca34 100644 (file)
@@ -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,
                         /* 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,
                         /* 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,
 #if CONFIG_IS_ENABLED(EFI_LOADER_HII)
                         /* HII string protocol */
                         &efi_guid_hii_string_protocol,
index c69ad7a..7fdf189 100644 (file)
@@ -34,11 +34,12 @@ efi_selftest_textinput.o \
 efi_selftest_textinputex.o \
 efi_selftest_textoutput.o \
 efi_selftest_tpl.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
 
 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
 
 obj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o
 obj-$(CONFIG_EFI_LOADER_HII) += efi_selftest_hii.o