[PATCH 6/7] board: samsung: e850-96: Report LDFW loading failures

Sam Protsenko semen.protsenko at linaro.org
Fri Jan 17 00:01:29 CET 2025


LDFW firmware loading can fail, e.g. in case if user forgot to upload
the binary to the appropriate location (/EFI/firmware/ldfw.bin on ESP
partition). Report such errors explicitly, so that the user can notice
it early and take necessary actions. But don't return error code from
board_init() in this case, as LDFW firmware is not mandatory for board
operation and is only required for some features like TRNG.

Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
---
 board/samsung/e850-96/e850-96.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/board/samsung/e850-96/e850-96.c b/board/samsung/e850-96/e850-96.c
index c5cef6f19d22..0bef68d2fb20 100644
--- a/board/samsung/e850-96/e850-96.c
+++ b/board/samsung/e850-96/e850-96.c
@@ -19,6 +19,11 @@ int dram_init_banksize(void)
 
 int board_init(void)
 {
-	load_ldfw();
+	int err;
+
+	err = load_ldfw();
+	if (err)
+		printf("ERROR: LDFW loading failed (%d)\n", err);
+
 	return 0;
 }
-- 
2.39.5



More information about the U-Boot mailing list