aboutsummaryrefslogtreecommitdiff
path: root/cmd/bootm.c
diff options
context:
space:
mode:
authorPhilippe Reynes <philippe.reynes@softathome.com>2022-03-28 22:57:00 +0200
committerTom Rini <trini@konsulko.com>2022-03-31 14:12:01 -0400
commit9d46e63d9771c789c2c934bb6f5f6af042f1bba0 (patch)
tree203636401a0370414a4ec1074ae69cde649b6d63 /cmd/bootm.c
parent982207435a7b96d594336a88c08cb5b09e5f2963 (diff)
downloadu-boot-9d46e63d9771c789c2c934bb6f5f6af042f1bba0.zip
u-boot-9d46e63d9771c789c2c934bb6f5f6af042f1bba0.tar.gz
u-boot-9d46e63d9771c789c2c934bb6f5f6af042f1bba0.tar.bz2
cmd: bootm: add a stage pre-load
Add a stage pre-load to the command bootm. Right now, this stage may be used to read a header and check the signature of the full image. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Diffstat (limited to 'cmd/bootm.c')
-rw-r--r--cmd/bootm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/bootm.c b/cmd/bootm.c
index e8b7066..87d40d4 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -70,7 +70,8 @@ static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,
if (c) {
state = (long)c->cmd;
if (state == BOOTM_STATE_START)
- state |= BOOTM_STATE_FINDOS | BOOTM_STATE_FINDOTHER;
+ state |= BOOTM_STATE_PRE_LOAD | BOOTM_STATE_FINDOS |
+ BOOTM_STATE_FINDOTHER;
} else {
/* Unrecognized command */
return CMD_RET_USAGE;
@@ -126,7 +127,7 @@ int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
return do_bootm_states(cmdtp, flag, argc, argv, BOOTM_STATE_START |
- BOOTM_STATE_FINDOS | BOOTM_STATE_FINDOTHER |
+ BOOTM_STATE_FINDOS | BOOTM_STATE_PRE_LOAD | BOOTM_STATE_FINDOTHER |
BOOTM_STATE_LOADOS |
#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
BOOTM_STATE_RAMDISK |