mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
efi_loader: log messages for bootefi command
Write log messages when booting via the bootefi command to allow tracking on the syslog server. Example messages are Booting /snp.efi or Booting /MemoryMapped(0x0,0x4fe00000,0x35a40) Loading image failed Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
@@ -433,7 +433,9 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size)
|
|||||||
{
|
{
|
||||||
efi_handle_t mem_handle = NULL, handle;
|
efi_handle_t mem_handle = NULL, handle;
|
||||||
struct efi_device_path *file_path = NULL;
|
struct efi_device_path *file_path = NULL;
|
||||||
|
struct efi_device_path *msg_path;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
|
u16 *load_options;
|
||||||
|
|
||||||
if (!bootefi_device_path || !bootefi_image_path) {
|
if (!bootefi_device_path || !bootefi_image_path) {
|
||||||
/*
|
/*
|
||||||
@@ -456,17 +458,21 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size)
|
|||||||
file_path);
|
file_path);
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
goto out;
|
goto out;
|
||||||
|
msg_path = file_path;
|
||||||
} else {
|
} else {
|
||||||
file_path = efi_dp_append(bootefi_device_path,
|
file_path = efi_dp_append(bootefi_device_path,
|
||||||
bootefi_image_path);
|
bootefi_image_path);
|
||||||
|
msg_path = bootefi_image_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_info("Booting %pD\n", msg_path);
|
||||||
|
|
||||||
ret = EFI_CALL(efi_load_image(false, efi_root, file_path, source_buffer,
|
ret = EFI_CALL(efi_load_image(false, efi_root, file_path, source_buffer,
|
||||||
source_size, &handle));
|
source_size, &handle));
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS) {
|
||||||
|
log_err("Loading image failed\n");
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
u16 *load_options;
|
|
||||||
|
|
||||||
/* Transfer environment variable as load options */
|
/* Transfer environment variable as load options */
|
||||||
ret = efi_env_set_load_options(handle, "bootargs", &load_options);
|
ret = efi_env_set_load_options(handle, "bootargs", &load_options);
|
||||||
|
Reference in New Issue
Block a user