bootm: Create a function to run through the bootz states
In a few places, the bootz command is used to handle a boot. We want these to be done without needing CONFIG_CMDLINE, so add a new bootz_run() function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
13
boot/bootm.c
13
boot/bootm.c
@@ -1140,6 +1140,19 @@ int bootm_run(struct bootm_info *bmi)
|
||||
return bootm_run_states(bmi, states);
|
||||
}
|
||||
|
||||
int bootz_run(struct bootm_info *bmi)
|
||||
{
|
||||
int states;
|
||||
|
||||
bmi->cmd_name = "bootz";
|
||||
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];
|
||||
|
||||
Reference in New Issue
Block a user