mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 18:11:33 +00:00
efi_loader: make device path to text protocol customizable
The device path to text protocol is not needed for EBBR compliance. So let's make it a customizable option. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
334997356e
commit
64b5ba4d29
6 changed files with 15 additions and 3 deletions
|
@ -1436,6 +1436,7 @@ config CMD_DISPLAY
|
||||||
config CMD_EFIDEBUG
|
config CMD_EFIDEBUG
|
||||||
bool "efidebug - display/configure UEFI environment"
|
bool "efidebug - display/configure UEFI environment"
|
||||||
depends on EFI_LOADER
|
depends on EFI_LOADER
|
||||||
|
select EFI_DEVICE_PATH_TO_TEXT
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable the 'efidebug' command which provides a subset of UEFI
|
Enable the 'efidebug' command which provides a subset of UEFI
|
||||||
|
|
|
@ -18,6 +18,13 @@ config EFI_LOADER
|
||||||
|
|
||||||
if EFI_LOADER
|
if EFI_LOADER
|
||||||
|
|
||||||
|
config EFI_DEVICE_PATH_TO_TEXT
|
||||||
|
bool "Device path to text protocol"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
The device path to text protocol converts device nodes and paths to
|
||||||
|
human readable strings.
|
||||||
|
|
||||||
config EFI_LOADER_HII
|
config EFI_LOADER_HII
|
||||||
bool "HII protocols"
|
bool "HII protocols"
|
||||||
default y
|
default y
|
||||||
|
|
|
@ -21,7 +21,7 @@ obj-y += efi_bootmgr.o
|
||||||
obj-y += efi_boottime.o
|
obj-y += efi_boottime.o
|
||||||
obj-y += efi_console.o
|
obj-y += efi_console.o
|
||||||
obj-y += efi_device_path.o
|
obj-y += efi_device_path.o
|
||||||
obj-y += efi_device_path_to_text.o
|
obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_device_path_to_text.o
|
||||||
obj-y += efi_device_path_utilities.o
|
obj-y += efi_device_path_utilities.o
|
||||||
obj-y += efi_file.o
|
obj-y += efi_file.o
|
||||||
obj-$(CONFIG_EFI_LOADER_HII) += efi_hii.o efi_hii_config.o
|
obj-$(CONFIG_EFI_LOADER_HII) += efi_hii.o efi_hii_config.o
|
||||||
|
|
|
@ -52,9 +52,11 @@ efi_status_t efi_root_node_register(void)
|
||||||
(&efi_root,
|
(&efi_root,
|
||||||
/* Device path protocol */
|
/* Device path protocol */
|
||||||
&efi_guid_device_path, dp,
|
&efi_guid_device_path, dp,
|
||||||
|
#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT)
|
||||||
/* Device path to text protocol */
|
/* Device path to text protocol */
|
||||||
&efi_guid_device_path_to_text_protocol,
|
&efi_guid_device_path_to_text_protocol,
|
||||||
(void *)&efi_device_path_to_text,
|
(void *)&efi_device_path_to_text,
|
||||||
|
#endif
|
||||||
/* Device path utilities protocol */
|
/* Device path utilities protocol */
|
||||||
&efi_guid_device_path_utilities_protocol,
|
&efi_guid_device_path_utilities_protocol,
|
||||||
(void *)&efi_device_path_utilities,
|
(void *)&efi_device_path_utilities,
|
||||||
|
|
|
@ -17,7 +17,6 @@ efi_selftest_config_table.o \
|
||||||
efi_selftest_controllers.o \
|
efi_selftest_controllers.o \
|
||||||
efi_selftest_console.o \
|
efi_selftest_console.o \
|
||||||
efi_selftest_crc32.o \
|
efi_selftest_crc32.o \
|
||||||
efi_selftest_devicepath.o \
|
|
||||||
efi_selftest_devicepath_util.o \
|
efi_selftest_devicepath_util.o \
|
||||||
efi_selftest_events.o \
|
efi_selftest_events.o \
|
||||||
efi_selftest_event_groups.o \
|
efi_selftest_event_groups.o \
|
||||||
|
@ -38,6 +37,7 @@ efi_selftest_util.o \
|
||||||
efi_selftest_variables.o \
|
efi_selftest_variables.o \
|
||||||
efi_selftest_watchdog.o
|
efi_selftest_watchdog.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_EFI_DEVICE_PATH_TO_TEXT) += efi_selftest_devicepath.o
|
||||||
obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL) += efi_selftest_unicode_collation.o
|
obj-$(CONFIG_EFI_UNICODE_COLLATION_PROTOCOL) += efi_selftest_unicode_collation.o
|
||||||
|
|
||||||
obj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o
|
obj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o
|
||||||
|
|
|
@ -296,6 +296,7 @@ static char *string16(char *buf, char *end, u16 *s, int field_width,
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT)
|
||||||
static char *device_path_string(char *buf, char *end, void *dp, int field_width,
|
static char *device_path_string(char *buf, char *end, void *dp, int field_width,
|
||||||
int precision, int flags)
|
int precision, int flags)
|
||||||
{
|
{
|
||||||
|
@ -314,6 +315,7 @@ static char *device_path_string(char *buf, char *end, void *dp, int field_width,
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CMD_NET
|
#ifdef CONFIG_CMD_NET
|
||||||
static char *mac_address_string(char *buf, char *end, u8 *addr, int field_width,
|
static char *mac_address_string(char *buf, char *end, u8 *addr, int field_width,
|
||||||
|
@ -451,7 +453,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr,
|
||||||
|
|
||||||
switch (*fmt) {
|
switch (*fmt) {
|
||||||
/* Device paths only exist in the EFI context. */
|
/* Device paths only exist in the EFI context. */
|
||||||
#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
|
#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD)
|
||||||
case 'D':
|
case 'D':
|
||||||
return device_path_string(buf, end, ptr, field_width,
|
return device_path_string(buf, end, ptr, field_width,
|
||||||
precision, flags);
|
precision, flags);
|
||||||
|
|
Loading…
Add table
Reference in a new issue