aboutsummaryrefslogtreecommitdiff
path: root/boot/bootm.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-11-08 19:23:25 -0700
committerTom Rini <trini@konsulko.com>2023-12-09 11:04:56 -0500
commit686e00afa1417f84f9df51706ffa28c7682be73a (patch)
tree8258f5b2253a04b3e8e79fd8088fc6686b8ec27e /boot/bootm.c
parent3531adfdbb82a2af3890888b0aae1aa64c4f66c2 (diff)
downloadu-boot-TEST/cmdd-working-rebase.zip
u-boot-TEST/cmdd-working-rebase.tar.gz
u-boot-TEST/cmdd-working-rebase.tar.bz2
bootm: Create a function to run through the booti statesTEST/cmdd-working-rebase
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. Series-to: u-boot Series-cc: trini Cover-letter: Complete decoupling of bootm logic from commands This series continues refactoring the bootm code to allow it to be used with CONFIG_COMMAND disabled. The OS-handling code is refactored and a new bootm_run() function is created to run through the bootm stages. This completes the work. A booti_go() function is created also, in case it proves useful, but at last for now standard boot does not use this. This is cmdd (part d of CMDLINE refactoring) It depends on dm/bootstda-working which depends on dm/cmdc-working END Change-Id: I95fe77f4a7f3d6c3dba3ecb3aec30a48739198f9 Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/bootm.c')
-rw-r--r--boot/bootm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 22c6d16..f630b8c 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -1155,6 +1155,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];