public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] avr32: fix do_bootm_linux
@ 2013-07-02 11:57 Andreas Bießmann
  2013-07-02 13:03 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Bießmann @ 2013-07-02 11:57 UTC (permalink / raw)
  To: u-boot

Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It
requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before
calling it again with flag set to BOOTM_STATE_OS_GO.
Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will
require a complete refactoring later on.

Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>

---
 arch/avr32/lib/bootm.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/avr32/lib/bootm.c b/arch/avr32/lib/bootm.c
index 87f3f9c..eedab9d 100644
--- a/arch/avr32/lib/bootm.c
+++ b/arch/avr32/lib/bootm.c
@@ -187,6 +187,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
 	struct	tag *params, *params_start;
 	char	*commandline = getenv("bootargs");
 
+	/*
+	 * allow the PREP bootm subcommand, it is required for bootm to work
+	 *
+	 * TODO: Andreas Bie?mann <andreas.devel@googlemail.com> refactor the
+	 * do_bootm_linux() for avr32
+	 */
+	if (flag & BOOTM_STATE_OS_PREP)
+		return 0;
+
 	if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
 		return 1;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] avr32: fix do_bootm_linux
  2013-07-02 11:57 [U-Boot] [PATCH] avr32: fix do_bootm_linux Andreas Bießmann
@ 2013-07-02 13:03 ` Tom Rini
  2013-07-02 14:06   ` Andreas Bießmann
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2013-07-02 13:03 UTC (permalink / raw)
  To: u-boot

On Tue, Jul 02, 2013 at 01:57:44PM +0200, Andreas Bie??mann wrote:

> Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It
> requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before
> calling it again with flag set to BOOTM_STATE_OS_GO.
> Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will
> require a complete refactoring later on.
> 
> Signed-off-by: Andreas Bie??mann <andreas.devel@googlemail.com>
> 
> ---
>  arch/avr32/lib/bootm.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/avr32/lib/bootm.c b/arch/avr32/lib/bootm.c
> index 87f3f9c..eedab9d 100644
> --- a/arch/avr32/lib/bootm.c
> +++ b/arch/avr32/lib/bootm.c
> @@ -187,6 +187,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
>  	struct	tag *params, *params_start;
>  	char	*commandline = getenv("bootargs");
>  
> +	/*
> +	 * allow the PREP bootm subcommand, it is required for bootm to work
> +	 *
> +	 * TODO: Andreas Bie??mann <andreas.devel@googlemail.com> refactor the
> +	 * do_bootm_linux() for avr32
> +	 */
> +	if (flag & BOOTM_STATE_OS_PREP)
> +		return 0;
> +
>  	if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
>  		return 1;

Good catch!  I'm going to make a v2 of this patch that fixes all of the
other arches that're missing this hunk.

-- 
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/20130702/e4d6d988/attachment.pgp>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] avr32: fix do_bootm_linux
  2013-07-02 13:03 ` Tom Rini
@ 2013-07-02 14:06   ` Andreas Bießmann
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Bießmann @ 2013-07-02 14:06 UTC (permalink / raw)
  To: u-boot

On 07/02/2013 03:03 PM, Tom Rini wrote:
> On Tue, Jul 02, 2013 at 01:57:44PM +0200, Andreas Bie?mann wrote:
> 
>> Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It
>> requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before
>> calling it again with flag set to BOOTM_STATE_OS_GO.
>> Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will
>> require a complete refactoring later on.
>>
>> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
>>
>> ---
>>  arch/avr32/lib/bootm.c |    9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/avr32/lib/bootm.c b/arch/avr32/lib/bootm.c
>> index 87f3f9c..eedab9d 100644
>> --- a/arch/avr32/lib/bootm.c
>> +++ b/arch/avr32/lib/bootm.c
>> @@ -187,6 +187,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
>>  	struct	tag *params, *params_start;
>>  	char	*commandline = getenv("bootargs");
>>  
>> +	/*
>> +	 * allow the PREP bootm subcommand, it is required for bootm to work
>> +	 *
>> +	 * TODO: Andreas Bie??mann <andreas.devel@googlemail.com> refactor the
>> +	 * do_bootm_linux() for avr32
>> +	 */
>> +	if (flag & BOOTM_STATE_OS_PREP)
>> +		return 0;
>> +
>>  	if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
>>  		return 1;
> 
> Good catch!  I'm going to make a v2 of this patch that fixes all of the
> other arches that're missing this hunk.

Ok, thank you Tom

Regards,

Andreas Bie?mann

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-02 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 11:57 [U-Boot] [PATCH] avr32: fix do_bootm_linux Andreas Bießmann
2013-07-02 13:03 ` Tom Rini
2013-07-02 14:06   ` Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox