summaryrefslogtreecommitdiff
path: root/cmd/bootm.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-10-18 07:36:52 -0400
committerTom Rini <trini@konsulko.com>2022-10-18 07:36:52 -0400
commit700b4fe782f9fc46b7be1b1a93a49356baeccc3f (patch)
tree7c4f01a95ceb7288ac9f95ffb59c2ea11b0a33cf /cmd/bootm.c
parentd3031d442b941f059eb83bb67ca10a28a0539f9a (diff)
parentae0bf2214b81b56a5670819958234947443680be (diff)
Merge tag 'dm-pull-18oct22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Update uclass iterators to work better when devices fail to probe Support VBE OS requests / fixups Minor error-handling tweaks to bootm command
Diffstat (limited to 'cmd/bootm.c')
-rw-r--r--cmd/bootm.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/cmd/bootm.c b/cmd/bootm.c
index d764a27002d..37c2af96e08 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -111,7 +111,7 @@ static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,
bootm_get_addr(argc, argv) + image_load_offset);
#endif
- return ret;
+ return ret ? CMD_RET_FAILURE : 0;
}
/*******************************************************************/
@@ -120,6 +120,9 @@ static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,
int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
+ int states;
+ int ret;
+
#ifdef CONFIG_NEEDS_MANUAL_RELOC
static int relocated = 0;
@@ -152,17 +155,17 @@ int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return do_bootm_subcommand(cmdtp, flag, argc, argv);
}
- return do_bootm_states(cmdtp, flag, argc, argv, BOOTM_STATE_START |
- BOOTM_STATE_FINDOS | BOOTM_STATE_PRE_LOAD | BOOTM_STATE_FINDOTHER |
- BOOTM_STATE_LOADOS |
-#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
- BOOTM_STATE_RAMDISK |
-#endif
-#if defined(CONFIG_PPC) || defined(CONFIG_MIPS)
- BOOTM_STATE_OS_CMDLINE |
-#endif
+ 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, &images, 1);
+ BOOTM_STATE_OS_GO;
+ 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;
+ ret = do_bootm_states(cmdtp, flag, argc, argv, states, &images, 1);
+
+ return ret ? CMD_RET_FAILURE : 0;
}
int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)