summaryrefslogtreecommitdiff
path: root/boot/bootm.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/bootm.c')
-rw-r--r--boot/bootm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 66b7e350aa8..cce8485f2d4 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -1123,6 +1123,23 @@ err:
return ret;
}
+int bootm_run(struct bootm_info *bmi)
+{
+ int states;
+
+ bmi->cmd_name = "bootm";
+ states = BOOTM_STATE_START | BOOTM_STATE_FINDOS | BOOTM_STATE_PRE_LOAD |
+ BOOTM_STATE_FINDOTHER | BOOTM_STATE_LOADOS |
+ BOOTM_STATE_OS_PREP | BOOTM_STATE_OS_FAKE_GO |
+ BOOTM_STATE_OS_GO | BOOTM_STATE_MEASURE;
+ if (IS_ENABLED(CONFIG_SYS_BOOT_RAMDISK_HIGH))
+ states |= BOOTM_STATE_RAMDISK;
+ if (IS_ENABLED(CONFIG_PPC) || IS_ENABLED(CONFIG_MIPS))
+ states |= BOOTM_STATE_OS_CMDLINE;
+
+ return bootm_run_states(bmi, states);
+}
+
int bootm_boot_start(ulong addr, const char *cmdline)
{
char addr_str[30];