[PATCH] efi_loader: Add absolute path to EFI_VAR_FILE_NAME

Patrice Chotard patrice.chotard at foss.st.com
Wed Mar 20 11:31:08 CET 2024


If the ESP partition is formatted in ext4, we got the following error :

STM32MP>  setenv -e -nv -bs -rt -v OsIndications =0x0000000000000004
GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
Attributes: 0x7
Value:
    00000000: 04 00 00 00 00 00 00 00                          ........
File System is consistent
Please supply Absolute path
** Error ext4fs_write() **
** Unable to write file ubootefi.var **
Failed to persist EFI variables

Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
---

 include/efi_variable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/efi_variable.h b/include/efi_variable.h
index 805e6c5f1e0..8d507460b20 100644
--- a/include/efi_variable.h
+++ b/include/efi_variable.h
@@ -92,7 +92,7 @@ efi_status_t efi_query_variable_info_int(u32 attributes,
 					 u64 *remaining_variable_storage_size,
 					 u64 *maximum_variable_size);
 
-#define EFI_VAR_FILE_NAME "ubootefi.var"
+#define EFI_VAR_FILE_NAME "/ubootefi.var"
 
 #define EFI_VAR_BUF_SIZE CONFIG_EFI_VAR_BUF_SIZE
 
-- 
2.25.1



More information about the U-Boot mailing list