[U-Boot] [PATCH v2 5/5] bootm: Add the missing PREP stage to bootz and correct image handling
Simon Glass
sjg at chromium.org
Thu Jul 4 22:26:11 CEST 2013
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 at chromium.org>
---
Changes in v2:
- Remove local images variable
- Set OS type to Linux in all cases
common/cmd_bootm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index b89d6ad..6a635b0 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -1782,7 +1782,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))
@@ -1794,8 +1793,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;
--
1.8.3
More information about the U-Boot
mailing list