summaryrefslogtreecommitdiffstats
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-07-04 13:26:11 -0700
committerTom Rini <trini@ti.com>2013-07-10 09:15:14 -0400
commitfb1b139bb79741e361bae421ece69d305b68d302 (patch)
treee96de5dd09c493055eccde1a9ee47cdbe88cf230 /common/cmd_bootm.c
parenta5266d6b5d3d94bbbf7fed572a96aa0e90ff4199 (diff)
downloadblackbird-obmc-uboot-fb1b139bb79741e361bae421ece69d305b68d302.tar.gz
blackbird-obmc-uboot-fb1b139bb79741e361bae421ece69d305b68d302.zip
bootm: Add the missing PREP stage to bootz and correct image handling
In the recent bootm refactor, the PREP stage was missing in the bootz command. This causes unpredictable behaviour. The use of a local variable means that the reset of cmd_bootm.c does not in fact use the same image structure, so remove this. Also manually set the OS type to Linux, since this is the only possibility at present, and we need to select the right boot function. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 3383a8c4c4..70d9891faf 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -1791,7 +1791,6 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- bootm_headers_t images;
int ret;
if (bootz_start(cmdtp, flag, argc, argv, &images))
@@ -1803,8 +1802,10 @@ int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
*/
bootm_disable_interrupts();
+ images.os.os = IH_OS_LINUX;
ret = do_bootm_states(cmdtp, flag, argc, argv,
- BOOTM_STATE_OS_FAKE_GO | BOOTM_STATE_OS_GO,
+ BOOTM_STATE_OS_PREP | BOOTM_STATE_OS_FAKE_GO |
+ BOOTM_STATE_OS_GO,
&images, 1);
return ret;
OpenPOWER on IntegriCloud