mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 02:44:37 +00:00
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 <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
e4cee649b9
commit
e7683c3675
2 changed files with 26 additions and 0 deletions
13
boot/bootm.c
13
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];
|
||||
|
|
|
@ -176,6 +176,19 @@ int bootm_run(struct bootm_info *bmi);
|
|||
*/
|
||||
int bootz_run(struct bootm_info *bmi);
|
||||
|
||||
/**
|
||||
* booti_run() - Run the entire booti process
|
||||
*
|
||||
* This runs through the booti process from start to finish, using the default
|
||||
* set of states.
|
||||
*
|
||||
* This uses bootm_run_states().
|
||||
*
|
||||
* @bmi: bootm information
|
||||
* Return: 0 if ok, something else on error
|
||||
*/
|
||||
int booti_run(struct bootm_info *bmi);
|
||||
|
||||
void arch_preboot_os(void);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue