File allpatch.patch of Package uboot-imx
From 2203707a4ef0aa6b22114c1be611c32bca9cc656 Mon Sep 17 00:00:00 2001
From: Oetze van den Broek <vandenbroek@inventeers.nl>
Date: Wed, 20 Aug 2025 11:03:58 +0200
Subject: [PATCH] Fix naming
---
arch/arm/mach-imx/spl_imx_romapi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c
index 8b8d16d911f..12ed547eb30 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -439,6 +439,12 @@ static int spl_romapi_load_image_stream(struct spl_image_info *spl_image,
if (ret != ROM_API_OKAY)
printf("ROM download failure %d\n", imagesize);
+<<<<<<< HEAD
+=======
+
+ printf("ram_api_download_image done\n");
+
+>>>>>>> Fix naming
memset(&load, 0, sizeof(load));
spl_set_bl_len(&load, 1);
load.read = spl_ram_load_read;
--
2.46.0.windows.1
From c2a50eac1ee2ef8c6b15e6168de46b9a9b3239a4 Mon Sep 17 00:00:00 2001
From: Oetze van den Broek <vandenbroek@inventeers.nl>
Date: Wed, 20 Aug 2025 10:58:26 +0200
Subject: [PATCH] Added logs
---
arch/arm/mach-imx/spl_imx_romapi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c
index 12ed547eb30..0ec5b03d82b 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -439,12 +439,9 @@ static int spl_romapi_load_image_stream(struct spl_image_info *spl_image,
if (ret != ROM_API_OKAY)
printf("ROM download failure %d\n", imagesize);
-<<<<<<< HEAD
-=======
printf("ram_api_download_image done\n");
->>>>>>> Fix naming
memset(&load, 0, sizeof(load));
spl_set_bl_len(&load, 1);
load.read = spl_ram_load_read;
--
2.46.0.windows.1
From 8c9bfcfc7029d84b50084f8302f626d6cc3ffe53 Mon Sep 17 00:00:00 2001
From: Oetze van den Broek <vandenbroek@inventeers.nl>
Date: Wed, 20 Aug 2025 13:59:58 +0200
Subject: [PATCH] Add new prints
---
common/spl/spl_imx_container.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/common/spl/spl_imx_container.c b/common/spl/spl_imx_container.c
index a6a4def280a..c2789aa6e43 100644
--- a/common/spl/spl_imx_container.c
+++ b/common/spl/spl_imx_container.c
@@ -101,14 +101,18 @@ static int read_auth_container(struct spl_image_info *spl_image,
* no need malloc
*/
container = malloc(size);
- if (!container)
+ if (!container) {
+ printf("Failed to allocate memory for container header\n");
return -ENOMEM;
+ }
+
debug("%s: container: %p offset: %lu size: %u\n", __func__,
container, offset, size);
if (info->read(info, offset, size, container) <
CONTAINER_HDR_ALIGNMENT) {
ret = -EIO;
+ printf("Failed to read container 1 -EIO\n");
goto end;
}
@@ -132,23 +136,30 @@ static int read_auth_container(struct spl_image_info *spl_image,
free(container);
container = malloc(size);
- if (!container)
+ if (!container) {
+ printf("Failed to allocate memory for container 2\n");
return -ENOMEM;
+ }
debug("%s: container: %p offset: %lu size: %u\n",
__func__, container, offset, size);
if (info->read(info, offset, size, container) < length) {
ret = -EIO;
+ printf("Failed to read container2 -EIO\n");
goto end;
}
}
authhdr = container;
-
+ printf("First auth addr: %p\n", authhdr);
#ifdef CONFIG_AHAB_BOOT
authhdr = ahab_auth_cntr_hdr(authhdr, length);
- if (!authhdr)
+ printf("After ahab_auth_cntr_hdr addr: %p\n", authhdr);
+ if (!authhdr) {
+ printf("Failed to authenticate container header\n");
goto end_auth;
+ }
+
#endif
for (i = 0; i < authhdr->num_images; i++) {
--
2.46.0.windows.1
From 6708381843ddfbb6527db685d4fbb3b92bc194b8 Mon Sep 17 00:00:00 2001
From: Oetze van den Broek <vandenbroek@inventeers.nl>
Date: Tue, 19 Aug 2025 17:02:21 +0200
Subject: [PATCH] Add more printf in spl.c
---
board/freescale/imx93_frdm/spl.c | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/board/freescale/imx93_frdm/spl.c b/board/freescale/imx93_frdm/spl.c
index 18b313d4c10..3484d4f1a6e 100644
--- a/board/freescale/imx93_frdm/spl.c
+++ b/board/freescale/imx93_frdm/spl.c
@@ -188,17 +188,30 @@ void board_init_f(ulong dummy)
/* Clear the BSS. */
memset(__bss_start, 0, __bss_end - __bss_start);
+ printf("Memset done\n");
+
timer_init();
+ printf("Timer init done\n");
+
arch_cpu_init();
+ printf("CPU init done\n");
+
board_early_init_f();
+ printf("Board early init done\n");
+
spl_early_init();
+ printf("SPL early init done\n");
+
preloader_console_init();
+ printf("Console init done\n");
+
ret = imx9_probe_mu();
+
if (ret) {
printf("Fail to init ELE API\n");
} else {
@@ -208,20 +221,36 @@ void board_init_f(ulong dummy)
clock_init_late();
+ printf("Clock init late done\n");
+
power_init_board();
- if (!is_voltage_mode(VOLT_LOW_DRIVE))
+ printf("Power init done\n");
+
+ if (!is_voltage_mode(VOLT_LOW_DRIVE)) {
+ printf("Voltage mode: Over Drive\n");
set_arm_core_max_clk();
+ } else {
+ printf("Voltage mode: Low Drive\n");
+ }
+
+ printf("voltage stuff done\n");
/* Init power of mix */
soc_power_init();
+ printf("Soc power init done\n");
+
/* Setup TRDC for DDR access */
trdc_init();
+ printf("TRDC trdc_init done\n");
+
/* DDR initialization */
spl_dram_init();
+ printf("DDR spl_dram_init done\n");
+
/* Put M33 into CPUWAIT for following kick */
ret = m33_prepare();
if (!ret)
--
2.46.0.windows.1
From 6c8aa5354f83a133e6781ce74257fac7b0a6ed94 Mon Sep 17 00:00:00 2001
From: Oetze van den Broek <vandenbroek@inventeers.nl>
Date: Wed, 20 Aug 2025 11:58:20 +0200
Subject: [PATCH] More printing
---
common/spl/spl_imx_container.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/common/spl/spl_imx_container.c b/common/spl/spl_imx_container.c
index c2789aa6e43..ad25d5ef436 100644
--- a/common/spl/spl_imx_container.c
+++ b/common/spl/spl_imx_container.c
@@ -162,6 +162,8 @@ static int read_auth_container(struct spl_image_info *spl_image,
#endif
+ printf("Loading %u images\n", authhdr->num_images);
+
for (i = 0; i < authhdr->num_images; i++) {
struct boot_img_t *image = read_auth_image(spl_image, info,
authhdr, i,
@@ -169,6 +171,7 @@ static int read_auth_container(struct spl_image_info *spl_image,
if (!image) {
ret = -EINVAL;
+ printf("Failed to read image %d\n", i);
goto end_auth;
}
@@ -186,12 +189,16 @@ static int read_auth_container(struct spl_image_info *spl_image,
end_auth:
#ifdef CONFIG_AHAB_BOOT
+ printf("AHAB authentication release\n");
ahab_auth_release();
+ printf("AHAB authentication release done\n");
+
#endif
end:
+ printf("Free container\n");
free(container);
-
+ printf("Free container done, returning %d\n", ret);
return ret;
}
--
2.46.0.windows.1
From bd45e8771bc000db7772503b34a22687b29628a5 Mon Sep 17 00:00:00 2001
From: Oetze van den Broek <vandenbroek@inventeers.nl>
Date: Wed, 20 Aug 2025 11:24:45 +0200
Subject: [PATCH] Changed debug
---
common/spl/spl_imx_container.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/spl/spl_imx_container.c b/common/spl/spl_imx_container.c
index ad25d5ef436..76f0e2891a9 100644
--- a/common/spl/spl_imx_container.c
+++ b/common/spl/spl_imx_container.c
@@ -3,6 +3,7 @@
* Copyright 2018-2021 NXP
*/
+#define LOG_DEBUG
#define LOG_CATEGORY LOGC_ARCH
#include <common.h>
#include <stdlib.h>
--
2.46.0.windows.1
From a21751cbf73197f1cfb26ec915712f5f322aca66 Mon Sep 17 00:00:00 2001
From: dewit <dewit@inventeers.nl>
Date: Wed, 20 Aug 2025 09:59:05 +0200
Subject: [PATCH] Add log statements to board_r.c
---
common/board_r.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/common/board_r.c b/common/board_r.c
index 6934d3f729a..1662699b15c 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -76,6 +76,7 @@ ulong monitor_flash_len;
__weak int board_flash_wp_on(void)
{
+ printf("Calling board_flash_wp_on\n");
/*
* Most flashes can't be detected when write protection is enabled,
* so provide a way to let U-Boot gracefully ignore write protected
@@ -86,11 +87,13 @@ __weak int board_flash_wp_on(void)
__weak int cpu_secondary_init_r(void)
{
+ printf("Calling cpu_secondary_init_r\n");
return 0;
}
static int initr_trace(void)
{
+ printf("Calling initr_trace\n");
#ifdef CONFIG_TRACE
trace_init(gd->trace_buff, CONFIG_TRACE_BUFFER_SIZE);
#endif
@@ -100,6 +103,7 @@ static int initr_trace(void)
static int initr_reloc(void)
{
+ printf("Calling initr_reloc\n");
/* tell others: relocation done */
gd->flags |= GD_FLG_RELOC | GD_FLG_FULL_MALLOC_INIT;
@@ -113,6 +117,7 @@ static int initr_reloc(void)
*/
static int initr_caches(void)
{
+ printf("Calling initr_caches\n");
/* Enable caches */
enable_caches();
return 0;
@@ -121,11 +126,13 @@ static int initr_caches(void)
__weak int fixup_cpu(void)
{
+ printf("Calling fixup_cpu\n");
return 0;
}
static int initr_reloc_global_data(void)
{
+ printf("Calling initr_reloc_global_data\n");
#ifdef __ARM__
monitor_flash_len = _end - __image_copy_start;
#elif defined(CONFIG_RISCV)
@@ -170,12 +177,14 @@ static int initr_reloc_global_data(void)
__weak int arch_initr_trap(void)
{
+ printf("Calling arch_initr_trap\n");
return 0;
}
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
static int initr_unlock_ram_in_cache(void)
{
+ printf("Calling initr_unlock_ram_in_cache\n");
unlock_ram_in_cache(); /* it's time to unlock D-cache in e500 */
return 0;
}
@@ -183,6 +192,7 @@ static int initr_unlock_ram_in_cache(void)
static int initr_barrier(void)
{
+ printf("Calling initr_barrier\n");
#ifdef CONFIG_PPC
/* TODO: Can we not use dmb() macros for this? */
asm("sync ; isync");
@@ -192,6 +202,7 @@ static int initr_barrier(void)
static int initr_malloc(void)
{
+ printf("Calling initr_malloc\n");
ulong start;
#if CONFIG_IS_ENABLED(SYS_MALLOC_F)
@@ -212,6 +223,7 @@ static int initr_malloc(void)
static int initr_of_live(void)
{
+ printf("Calling initr_of_live\n");
if (CONFIG_IS_ENABLED(OF_LIVE)) {
int ret;
@@ -229,6 +241,7 @@ static int initr_of_live(void)
#ifdef CONFIG_DM
static int initr_dm(void)
{
+ printf("Calling initr_dm\n");
int ret;
oftree_reset();
@@ -251,6 +264,7 @@ static int initr_dm(void)
static int initr_dm_devices(void)
{
+ printf("Calling initr_dm_devices\n");
int ret;
if (IS_ENABLED(CONFIG_TIMER_EARLY)) {
@@ -275,6 +289,7 @@ static int initr_dm_devices(void)
static int initr_bootstage(void)
{
+ printf("Calling initr_bootstage\n");
bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
return 0;
@@ -282,17 +297,20 @@ static int initr_bootstage(void)
__weak int power_init_board(void)
{
+ printf("Calling power_init_board\n");
return 0;
}
static int initr_announce(void)
{
+ printf("Calling initr_announce\n");
debug("Now running in RAM - U-Boot at: %08lx\n", gd->relocaddr);
return 0;
}
static int initr_binman(void)
{
+ printf("Calling initr_binman\n");
int ret;
if (!CONFIG_IS_ENABLED(BINMAN_FDT))
@@ -308,11 +326,13 @@ static int initr_binman(void)
#if defined(CONFIG_MTD_NOR_FLASH)
__weak int is_flash_available(void)
{
+ printf("Calling is_flash_available\n");
return 1;
}
static int initr_flash(void)
{
+ printf("Calling initr_flash\n");
ulong flash_size = 0;
struct bd_info *bd = gd->bd;
@@ -369,6 +389,7 @@ static int initr_flash(void)
/* go init the NAND */
static int initr_nand(void)
{
+ printf("Calling initr_nand\n");
puts("NAND: ");
nand_init();
printf("%lu MiB\n", nand_size() / 1024);
@@ -380,6 +401,7 @@ static int initr_nand(void)
/* go init the NAND */
static int initr_onenand(void)
{
+ printf("Calling initr_onenand\n");
puts("NAND: ");
onenand_init();
return 0;
@@ -389,6 +411,7 @@ static int initr_onenand(void)
#ifdef CONFIG_MMC
static int initr_mmc(void)
{
+ printf("Calling initr_mmc\n");
puts("MMC: ");
mmc_initialize(gd->bd);
return 0;
@@ -398,6 +421,7 @@ static int initr_mmc(void)
#ifdef CONFIG_PVBLOCK
static int initr_pvblock(void)
{
+ printf("Calling initr_pvblock\n");
puts("PVBLOCK: ");
pvblock_init();
return 0;
@@ -417,6 +441,7 @@ static int initr_pvblock(void)
*/
static int should_load_env(void)
{
+ printf("Calling should_load_env\n");
if (IS_ENABLED(CONFIG_OF_CONTROL))
return ofnode_conf_read_int("load-environment", 1);
@@ -428,6 +453,7 @@ static int should_load_env(void)
static int initr_env(void)
{
+ printf("Calling initr_env\n");
/* initialize environment */
if (should_load_env())
env_relocate();
@@ -454,6 +480,7 @@ static int initr_env(void)
#ifdef CONFIG_SYS_MALLOC_BOOTPARAMS
static int initr_malloc_bootparams(void)
{
+ printf("Calling initr_malloc_bootparams\n");
gd->bd->bi_boot_params = (ulong)malloc(CONFIG_SYS_BOOTPARAMS_LEN);
if (!gd->bd->bi_boot_params) {
puts("WARNING: Cannot allocate space for boot parameters\n");
@@ -466,6 +493,7 @@ static int initr_malloc_bootparams(void)
#if defined(CONFIG_LED_STATUS)
static int initr_status_led(void)
{
+ printf("Calling initr_status_led\n");
#if defined(CONFIG_LED_STATUS_BOOT)
status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_BLINKING);
#else
@@ -478,6 +506,7 @@ static int initr_status_led(void)
#ifdef CONFIG_CMD_NET
static int initr_net(void)
{
+ printf("Calling initr_net\n");
puts("Net: ");
eth_initialize();
#if defined(CONFIG_RESET_PHY_R)
@@ -491,6 +520,7 @@ static int initr_net(void)
#ifdef CONFIG_POST
static int initr_post(void)
{
+ printf("Calling initr_post\n");
post_run(NULL, POST_RAM | post_bootmode_get(0));
return 0;
}
@@ -503,6 +533,7 @@ static int initr_post(void)
*/
int initr_mem(void)
{
+ printf("Calling initr_mem\n");
ulong pram = 0;
char memsz[32];
@@ -516,6 +547,7 @@ int initr_mem(void)
static int dm_announce(void)
{
+ printf("Calling dm_announce\n");
int device_count;
int uclass_count;
@@ -548,6 +580,7 @@ static int dm_announce(void)
extern int init_avbkey(void);
static int initr_avbkey(void)
{
+ printf("Calling initr_avbkey\n");
return init_avbkey();
}
#endif
@@ -555,12 +588,14 @@ static int initr_avbkey(void)
#ifdef CONFIG_FSL_FASTBOOT
static int initr_fastboot_setup(void)
{
+ printf("Calling initr_fastboot_setup\n");
fastboot_setup();
return 0;
}
static int initr_check_fastboot(void)
{
+ printf("Calling initr_check_fastboot\n");
fastboot_run_bootmode();
return 0;
}
@@ -570,6 +605,7 @@ static int initr_check_fastboot(void)
extern void tee_setup(void);
static int initr_tee_setup(void)
{
+ printf("Calling initr_tee_setup\n");
tee_setup();
return 0;
}
@@ -579,6 +615,7 @@ static int initr_tee_setup(void)
extern void check_spl_recovery(void);
static int initr_check_spl_recovery(void)
{
+ printf("Calling initr_check_spl_recovery\n");
check_spl_recovery();
return 0;
}
@@ -586,6 +623,7 @@ static int initr_check_spl_recovery(void)
static int run_main_loop(void)
{
+ printf("Calling run_main_loop\n");
#ifdef CONFIG_SANDBOX
sandbox_main_loop_init();
#endif
--
2.46.0.windows.1
From e9eae9f522fa50f780904b4475ee3769b7c44680 Mon Sep 17 00:00:00 2001
From: Oetze van den Broek <vandenbroek@inventeers.nl>
Date: Wed, 20 Aug 2025 11:12:15 +0200
Subject: [PATCH] Add debug
---
common/spl/spl_imx_container.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/spl/spl_imx_container.c b/common/spl/spl_imx_container.c
index 76f0e2891a9..e89e8481d18 100644
--- a/common/spl/spl_imx_container.c
+++ b/common/spl/spl_imx_container.c
@@ -2,8 +2,8 @@
/*
* Copyright 2018-2021 NXP
*/
-
#define LOG_DEBUG
+#define DEBUG
#define LOG_CATEGORY LOGC_ARCH
#include <common.h>
#include <stdlib.h>
--
2.46.0.windows.1
From 786375e88cc641207639fb3c520f8583c0511a68 Mon Sep 17 00:00:00 2001
From: dewit <dewit@inventeers.nl>
Date: Wed, 20 Aug 2025 13:14:17 +0200
Subject: [PATCH] add-armflash-logs
---
cmd/armflash.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cmd/armflash.c b/cmd/armflash.c
index fdaea5ad811..12298c1bf72 100644
--- a/cmd/armflash.c
+++ b/cmd/armflash.c
@@ -284,12 +284,16 @@ static int do_afs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
} else if (argc == 3 && !strcmp(argv[1], "exists")) {
ret = exists(argv[2]);
} else if (argc == 3 && !strcmp(argv[1], "load")) {
+ printf("cmd\armflash.c 287 before load_image\n");
ret = load_image(argv[2], 0x0);
+ printf("cmd\armflash.c 289 after load_image\n");
} else if (argc == 4 && !strcmp(argv[1], "load")) {
ulong load_addr;
load_addr = hextoul(argv[3], NULL);
+ printf("cmd\armflash.c 292 before load_image\n");
ret = load_image(argv[2], load_addr);
+ printf("cmd\armflash.c 294 after load_image\n");
} else {
return CMD_RET_USAGE;
}
--
2.46.0.windows.1
From dc22ff22ef88fa9a9e3aab084cff012f4eb62ff8 Mon Sep 17 00:00:00 2001
From: dewit <dewit@inventeers.nl>
Date: Wed, 20 Aug 2025 12:30:40 +0200
Subject: [PATCH] add-load_image-call-logs
---
lib/efi_selftest/efi_selftest_exception.c | 2 ++
lib/efi_selftest/efi_selftest_load_file.c | 8 ++++++++
lib/efi_selftest/efi_selftest_loadimage.c | 2 ++
lib/efi_selftest/efi_selftest_startimage_exit.c | 2 ++
lib/efi_selftest/efi_selftest_startimage_return.c | 2 ++
lib/efi_selftest/efi_selftest_tcg2.c | 3 +++
test/image/spl_load.c | 3 +++
test/image/spl_load_fs.c | 8 ++++++--
8 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/lib/efi_selftest/efi_selftest_exception.c b/lib/efi_selftest/efi_selftest_exception.c
index 64e7b0ac336..65467ec1577 100644
--- a/lib/efi_selftest/efi_selftest_exception.c
+++ b/lib/efi_selftest/efi_selftest_exception.c
@@ -125,8 +125,10 @@ static int execute(void)
efi_status_t ret;
efi_handle_t handle;
+ printf("lib\efi_selftest\efi_selftest_exception.c 128 before load_image\n");
ret = boottime->load_image(false, image_handle, &dp.dp, image,
img.length, &handle);
+ printf("lib\efi_selftest\efi_selftest_exception.c 131 after load_image\n");
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
diff --git a/lib/efi_selftest/efi_selftest_load_file.c b/lib/efi_selftest/efi_selftest_load_file.c
index 14df7611727..398275702d2 100644
--- a/lib/efi_selftest/efi_selftest_load_file.c
+++ b/lib/efi_selftest/efi_selftest_load_file.c
@@ -390,8 +390,10 @@ static int efi_st_load_file_execute(void)
load_file_call_count = 0;
load_file2_call_count = 0;
handle = NULL;
+ printf("lib\efi_selftest\efi_selftest_load_file.c 393 before load_image\n");
ret = boottime->load_image(true, image_handle, &dp_lf_file.v.dp, NULL,
0, &handle);
+ printf("lib\efi_selftest\efi_selftest_load_file.c 396 after load_image\n");
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
@@ -409,8 +411,10 @@ static int efi_st_load_file_execute(void)
load_file_call_count = 0;
load_file2_call_count = 0;
handle = NULL;
+ printf("lib\efi_selftest\efi_selftest_load_file.c 412 before load_image\n");
ret = boottime->load_image(false, image_handle, &dp_lf_file.v.dp, NULL,
0, &handle);
+ printf("lib\efi_selftest\efi_selftest_load_file.c 415 after load_image\n");
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
@@ -425,8 +429,10 @@ static int efi_st_load_file_execute(void)
return EFI_ST_FAILURE;
}
+ printf("lib\efi_selftest\efi_selftest_load_file.c 428 before load_image\n");
ret = boottime->load_image(true, image_handle, &dp_lf2_file.v.dp, NULL,
0, &handle);
+ printf("lib\efi_selftest\efi_selftest_load_file.c 431 after load_image\n");
if (ret != EFI_NOT_FOUND) {
efi_st_error(
"Boot manager should not use LOAD_FILE2_PROTOCOL\n");
@@ -436,8 +442,10 @@ static int efi_st_load_file_execute(void)
load_file_call_count = 0;
load_file2_call_count = 0;
handle = NULL;
+ printf("lib\efi_selftest\efi_selftest_load_file.c 439 before load_image\n");
ret = boottime->load_image(false, image_handle, &dp_lf2_file.v.dp, NULL,
0, &handle);
+ printf("lib\efi_selftest\efi_selftest_load_file.c 442 after load_image\n");
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
diff --git a/lib/efi_selftest/efi_selftest_loadimage.c b/lib/efi_selftest/efi_selftest_loadimage.c
index 24548f1ae63..9073fc9b4ae 100644
--- a/lib/efi_selftest/efi_selftest_loadimage.c
+++ b/lib/efi_selftest/efi_selftest_loadimage.c
@@ -494,8 +494,10 @@ static int execute(void)
efi_status_t ret;
efi_handle_t handle;
+ printf("lib\efi_selftest\efi_selftest_loadimage.c 497 before load_image\n");
ret = boottime->load_image(false, handle_image, &dp_file.vendor.dp,
NULL, 0, &handle);
+ printf("lib\efi_selftest\efi_selftest_loadimage.c 500 after load_image\n");
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
diff --git a/lib/efi_selftest/efi_selftest_startimage_exit.c b/lib/efi_selftest/efi_selftest_startimage_exit.c
index b65a10b7a4b..17e5759d4e8 100644
--- a/lib/efi_selftest/efi_selftest_startimage_exit.c
+++ b/lib/efi_selftest/efi_selftest_startimage_exit.c
@@ -127,8 +127,10 @@ static int execute(void)
u16 *exit_data = NULL;
u16 expected_text[] = EFI_ST_SUCCESS_STR;
+ printf("lib\efi_selftest\efi_selftest_startimage_exit.c 130 before load_image\n");
ret = boottime->load_image(false, image_handle, NULL, image,
img.length, &handle);
+ printf("lib\efi_selftest\efi_selftest_startimage_exit.c 133 after load_image\n");
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
diff --git a/lib/efi_selftest/efi_selftest_startimage_return.c b/lib/efi_selftest/efi_selftest_startimage_return.c
index 3e0c5a9ffbc..37960915580 100644
--- a/lib/efi_selftest/efi_selftest_startimage_return.c
+++ b/lib/efi_selftest/efi_selftest_startimage_return.c
@@ -124,8 +124,10 @@ static int execute(void)
efi_status_t ret;
efi_handle_t handle;
+ printf("lib\efi_selftest\efi_selftest_startimage_return.c 127 before load_image\n");
ret = boottime->load_image(false, image_handle, NULL, image,
img.length, &handle);
+ printf("lib\efi_selftest\efi_selftest_startimage_return.c 130 after load_image\n");
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
diff --git a/lib/efi_selftest/efi_selftest_tcg2.c b/lib/efi_selftest/efi_selftest_tcg2.c
index fb8b997653a..2cbaac7b70e 100644
--- a/lib/efi_selftest/efi_selftest_tcg2.c
+++ b/lib/efi_selftest/efi_selftest_tcg2.c
@@ -898,8 +898,11 @@ static int efi_st_tcg2_execute(void)
}
/* tcg2_measure_pe_image test */
+ printf("lib\efi_selftest\efi_selftest_tcg2.c 901 before load_image\n");
ret = boottime->load_image(false, image_handle, NULL, image,
img.length, &handle);
+ printf("lib\efi_selftest\efi_selftest_tcg2.c 904 after load_image\n");
+
if (ret != EFI_SUCCESS) {
efi_st_error("Failed to load image\n");
return EFI_ST_FAILURE;
diff --git a/test/image/spl_load.c b/test/image/spl_load.c
index e1036eff28c..893afc7913f 100644
--- a/test/image/spl_load.c
+++ b/test/image/spl_load.c
@@ -648,7 +648,10 @@ int do_spl_test_load(struct unit_test_state *uts, const char *test_name,
if (write_image(uts, img, img_size))
return CMD_RET_FAILURE;
+ printf("test\image\spl_load.c 651 before load_image\n");
ut_assertok(loader->load_image(&info_read, &bootdev));
+ printf("test\image\spl_load.c 653 after load_image\n");
+
if (check_image_info(uts, &info_write, &info_read))
return CMD_RET_FAILURE;
if (type == LEGACY_LZMA)
diff --git a/test/image/spl_load_fs.c b/test/image/spl_load_fs.c
index a89189e1124..c5d1e1cc6c9 100644
--- a/test/image/spl_load_fs.c
+++ b/test/image/spl_load_fs.c
@@ -371,8 +371,12 @@ static int spl_test_mmc_fs(struct unit_test_state *uts, const char *test_name,
if (blk_mode)
ut_assertok(spl_blk_load_image(&info_read, &bootdev, UCLASS_MMC,
0, 1));
- else
- ut_assertok(loader->load_image(&info_read, &bootdev));
+ else
+ {
+ printf("test\image\spl_load_fs.c 376 before load_image\n");
+ ut_assertok(loader->load_image(&info_read, &bootdev));
+ printf("test\image\spl_load_fs.c 378 after load_image\n");
+ }
if (check_image_info(uts, &info_write, &info_read))
return CMD_RET_FAILURE;
if (type == LEGACY_LZMA)
--
2.46.0.windows.1
From ac19fc67772c9bdeccdd4ef2c7c5317576cbfa10 Mon Sep 17 00:00:00 2001
From: dewit <dewit@inventeers.nl>
Date: Wed, 20 Aug 2025 10:13:07 +0200
Subject: [PATCH] Add board_init_r logs
---
common/board_r.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/common/board_r.c b/common/board_r.c
index 1662699b15c..691c3c884b6 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -840,6 +840,7 @@ static init_fnc_t init_sequence_r[] = {
void board_init_r(gd_t *new_gd, ulong dest_addr)
{
+ printf("Calling board_init_r\n");
/*
* The pre-relocation drivers may be using memory that has now gone
* away. Mark serial as unavailable - this will fall back to the debug
@@ -849,20 +850,25 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
*/
gd->flags &= ~(GD_FLG_SERIAL_READY | GD_FLG_LOG_READY);
+ printf("pre arch_setup_gd\n");
/*
* Set up the new global data pointer. So far only x86 does this
* here.
* TODO(sjg@chromium.org): Consider doing this for all archs, or
* dropping the new_gd parameter.
*/
- if (CONFIG_IS_ENABLED(X86_64) && !IS_ENABLED(CONFIG_EFI_APP))
+ if (CONFIG_IS_ENABLED(X86_64) && !IS_ENABLED(CONFIG_EFI_APP)){
+ printf("calling arch_setup_gd\n");
arch_setup_gd(new_gd);
+ } else {
+ printf("did not call arch_setup_gd\n");
+ }
#if !defined(CONFIG_X86) && !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
gd = new_gd;
#endif
gd->flags &= ~GD_FLG_LOG_READY;
-
+ printf("calling initcall_run_list\n");
if (initcall_run_list(init_sequence_r))
hang();
--
2.46.0.windows.1