diff --git a/common/bootm.c b/common/bootm.c index 08bb5b7b91..564f8fe8c5 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -725,6 +725,8 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], if (images->os.os == IH_OS_LINUX) fixup_silent_linux(); #endif + arch_preboot_os(BOOTM_STATE_OS_PREP); + ret = boot_fn(BOOTM_STATE_OS_PREP, argc, argv, images); } diff --git a/common/bootm_os.c b/common/bootm_os.c index 5e6b1777e4..392dd2f59f 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -469,7 +469,7 @@ static boot_os_fn *boot_os[] = { }; /* Allow for arch specific config before we boot */ -__weak void arch_preboot_os(void) +__weak void arch_preboot_os(uint32_t bootm_state) { /* please define platform specific arch_preboot_os() */ } @@ -477,7 +477,7 @@ __weak void arch_preboot_os(void) int boot_selected_os(int argc, char * const argv[], int state, bootm_headers_t *images, boot_os_fn *boot_fn) { - arch_preboot_os(); + arch_preboot_os(state); boot_fn(state, argc, argv, images); /* Stand-alone may return when 'autostart' is 'no' */ diff --git a/include/bootm.h b/include/bootm.h index 49813772ce..72ed30da07 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -54,7 +54,7 @@ int bootm_find_images(int flag, int argc, char * const argv[]); int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], int states, bootm_headers_t *images, int boot_progress); -void arch_preboot_os(void); +void arch_preboot_os(uint32_t bootm_state); /** * bootm_decomp_image() - decompress the operating system