* [U-Boot] [PATCH] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm
@ 2013-09-06 10:23 Paul Burton
2013-09-17 10:52 ` Paul Burton
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paul Burton @ 2013-09-06 10:23 UTC (permalink / raw)
To: u-boot
A plain bootm used to call the architecture specific boot function with
no flags, but was modified by commit 35fc84fa "Refactor the bootm
command to reduce code duplication" to call the architecture specific
boot function multiple times with various flags in sequence. The
BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least
ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS
since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel
cmdline" the command line is not prepared in response to a
BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with
no flags. The end result is that a combination of those 2 commits leads
to MIPS boards booting kernels with no command line arguments.
An extra invocation of the architecture specific boot function with
BOOTM_STATE_OS_CMDLINE fixes this.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---
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 1685c14..b8255eb 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -797,8 +797,9 @@ int do_bootm(cmd_tbl_t *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_LOADOS | BOOTM_STATE_OS_PREP |
- BOOTM_STATE_OS_FAKE_GO | BOOTM_STATE_OS_GO, &images, 1);
+ BOOTM_STATE_LOADOS | BOOTM_STATE_OS_CMDLINE |
+ BOOTM_STATE_OS_PREP | BOOTM_STATE_OS_FAKE_GO |
+ BOOTM_STATE_OS_GO, &images, 1);
}
int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
--
1.8.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [U-Boot] [PATCH] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm
2013-09-06 10:23 [U-Boot] [PATCH] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm Paul Burton
@ 2013-09-17 10:52 ` Paul Burton
2013-09-17 11:40 ` Daniel Schwierzeck
2013-09-21 12:06 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Paul Burton @ 2013-09-17 10:52 UTC (permalink / raw)
To: u-boot
*ping*
(Also CCing MIPS custodian)
Paul
On 06/09/13 11:23, Paul Burton wrote:
> A plain bootm used to call the architecture specific boot function with
> no flags, but was modified by commit 35fc84fa "Refactor the bootm
> command to reduce code duplication" to call the architecture specific
> boot function multiple times with various flags in sequence. The
> BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least
> ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS
> since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel
> cmdline" the command line is not prepared in response to a
> BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with
> no flags. The end result is that a combination of those 2 commits leads
> to MIPS boards booting kernels with no command line arguments.
>
> An extra invocation of the architecture specific boot function with
> BOOTM_STATE_OS_CMDLINE fixes this.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> ---
> 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 1685c14..b8255eb 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -797,8 +797,9 @@ int do_bootm(cmd_tbl_t *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_LOADOS | BOOTM_STATE_OS_PREP |
> - BOOTM_STATE_OS_FAKE_GO | BOOTM_STATE_OS_GO, &images, 1);
> + BOOTM_STATE_LOADOS | BOOTM_STATE_OS_CMDLINE |
> + BOOTM_STATE_OS_PREP | BOOTM_STATE_OS_FAKE_GO |
> + BOOTM_STATE_OS_GO, &images, 1);
> }
>
> int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm
2013-09-06 10:23 [U-Boot] [PATCH] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm Paul Burton
2013-09-17 10:52 ` Paul Burton
@ 2013-09-17 11:40 ` Daniel Schwierzeck
2013-09-21 12:06 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Schwierzeck @ 2013-09-17 11:40 UTC (permalink / raw)
To: u-boot
2013/9/6 Paul Burton <paul.burton@imgtec.com>:
> A plain bootm used to call the architecture specific boot function with
> no flags, but was modified by commit 35fc84fa "Refactor the bootm
> command to reduce code duplication" to call the architecture specific
> boot function multiple times with various flags in sequence. The
> BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least
> ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS
> since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel
> cmdline" the command line is not prepared in response to a
> BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with
> no flags. The end result is that a combination of those 2 commits leads
> to MIPS boards booting kernels with no command line arguments.
>
> An extra invocation of the architecture specific boot function with
> BOOTM_STATE_OS_CMDLINE fixes this.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> ---
> 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 1685c14..b8255eb 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -797,8 +797,9 @@ int do_bootm(cmd_tbl_t *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_LOADOS | BOOTM_STATE_OS_PREP |
> - BOOTM_STATE_OS_FAKE_GO | BOOTM_STATE_OS_GO, &images, 1);
> + BOOTM_STATE_LOADOS | BOOTM_STATE_OS_CMDLINE |
> + BOOTM_STATE_OS_PREP | BOOTM_STATE_OS_FAKE_GO |
> + BOOTM_STATE_OS_GO, &images, 1);
> }
>
> int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
> --
> 1.8.3.4
>
>
you should also add BOOTM_STATE_OS_BD_T. Though it is not used by MIPS,
it is also needed if single call of bootm should execute all available
bootm sub-commands.
The patch is already assigned to Tom in patchwork, so I hope he'll
pick it up for 2013.10.
--
Best regards,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm
2013-09-06 10:23 [U-Boot] [PATCH] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm Paul Burton
2013-09-17 10:52 ` Paul Burton
2013-09-17 11:40 ` Daniel Schwierzeck
@ 2013-09-21 12:06 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-09-21 12:06 UTC (permalink / raw)
To: u-boot
On Fri, Sep 06, 2013 at 11:23:55AM +0100, Paul Burton wrote:
> A plain bootm used to call the architecture specific boot function with
> no flags, but was modified by commit 35fc84fa "Refactor the bootm
> command to reduce code duplication" to call the architecture specific
> boot function multiple times with various flags in sequence. The
> BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least
> ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS
> since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel
> cmdline" the command line is not prepared in response to a
> BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with
> no flags. The end result is that a combination of those 2 commits leads
> to MIPS boards booting kernels with no command line arguments.
>
> An extra invocation of the architecture specific boot function with
> BOOTM_STATE_OS_CMDLINE fixes this.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130921/e9fba72d/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-21 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-06 10:23 [U-Boot] [PATCH] bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm Paul Burton
2013-09-17 10:52 ` Paul Burton
2013-09-17 11:40 ` Daniel Schwierzeck
2013-09-21 12:06 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox