summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2023-12-15 20:14:25 -0700
committerTom Rini <[email protected]>2023-12-21 16:07:52 -0500
commite7683c3675ce425e2f8149dedcaafa02175321ef (patch)
tree9f7c7f9e0cb540589722ec825d7fea3ba4cf5184 /boot
parente4cee649b9628ee17c40d12097e2c122e8a5a803 (diff)
bootm: Create a function to run through the booti states
In a few places, the booti command is used to handle a boot. We want these to be done without needing CONFIG_CMDLINE, so add a new booti_run() function to handle this. So far this is not used. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'boot')
-rw-r--r--boot/bootm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 40751a4c6e6..53236136f48 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -1153,6 +1153,19 @@ int bootz_run(struct bootm_info *bmi)
return bootm_run_states(bmi, states);
}
+int booti_run(struct bootm_info *bmi)
+{
+ int states;
+
+ bmi->cmd_name = "booti";
+ states = BOOTM_STATE_MEASURE | BOOTM_STATE_OS_PREP |
+ BOOTM_STATE_OS_FAKE_GO | BOOTM_STATE_OS_GO;
+ if (IS_ENABLED(CONFIG_SYS_BOOT_RAMDISK_HIGH))
+ states |= BOOTM_STATE_RAMDISK;
+
+ return bootm_run_states(bmi, states);
+}
+
int bootm_boot_start(ulong addr, const char *cmdline)
{
char addr_str[30];