public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fix lib_arm/bootm.c
@ 2008-11-28 19:36 Daniel Mack
  2008-11-28 21:20 ` Jean-Christophe PLAGNIOL-VILLARD
  2008-11-28 21:37 ` Jerry Van Baren
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Mack @ 2008-11-28 19:36 UTC (permalink / raw)
  To: u-boot

Hi,

while digging thru the sources to find out why U-Boot won't start my
Linux kernel, I stumbled over lib_arm/bootm.c and its check for the falg
variable. I wonder how this ever worked as the condition is really heavy
to match unless BOOTM_STATE_OS_GO is 0 which it isn't.

So I guess the patch below is mandatory or you could write an unlikely()
around that check ;)

Best regards,
Daniel


diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c
index 8e264ce..58a101f 100644
--- a/lib_arm/bootm.c
+++ b/lib_arm/bootm.c
@@ -67,7 +67,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
        char *commandline = getenv ("bootargs");
 #endif
 
-       if ((flag != 0) || (flag != BOOTM_STATE_OS_GO))
+       if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
                return 1;
 
        theKernel = (void (*)(int, int, uint))images->ep;

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

* [U-Boot] [PATCH] fix lib_arm/bootm.c
  2008-11-28 19:36 [U-Boot] [PATCH] fix lib_arm/bootm.c Daniel Mack
@ 2008-11-28 21:20 ` Jean-Christophe PLAGNIOL-VILLARD
  2008-11-28 21:37 ` Jerry Van Baren
  1 sibling, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-11-28 21:20 UTC (permalink / raw)
  To: u-boot

On 20:36 Fri 28 Nov     , Daniel Mack wrote:
> Hi,
> 
> while digging thru the sources to find out why U-Boot won't start my
> Linux kernel, I stumbled over lib_arm/bootm.c and its check for the falg
> variable. I wonder how this ever worked as the condition is really heavy
> to match unless BOOTM_STATE_OS_GO is 0 which it isn't.
> 
> So I guess the patch below is mandatory or you could write an unlikely()
> around that check ;)
> 
> Best regards,
> Daniel
> 
please update your local tree

Best Regards,
J.

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

* [U-Boot] [PATCH] fix lib_arm/bootm.c
  2008-11-28 21:37 ` Jerry Van Baren
@ 2008-11-28 21:33   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-11-29  8:59   ` Dirk Behme
  1 sibling, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-11-28 21:33 UTC (permalink / raw)
  To: u-boot

On 16:37 Fri 28 Nov     , Jerry Van Baren wrote:
> Daniel Mack wrote:
> > Hi,
> > 
> > while digging thru the sources to find out why U-Boot won't start my
> > Linux kernel, I stumbled over lib_arm/bootm.c and its check for the falg
> > variable. I wonder how this ever worked as the condition is really heavy
> > to match unless BOOTM_STATE_OS_GO is 0 which it isn't.
> 
> Hi Daniel,
> 
> FYI, Peter Pearse found this independently.  The patch apparently hasn't 
> been applied to the mainline yet.  :-(
already in mainline
first found by Ilko Iliev commit 263b749e2e25

Best Regards,
J.

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

* [U-Boot] [PATCH] fix lib_arm/bootm.c
  2008-11-28 19:36 [U-Boot] [PATCH] fix lib_arm/bootm.c Daniel Mack
  2008-11-28 21:20 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-11-28 21:37 ` Jerry Van Baren
  2008-11-28 21:33   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-11-29  8:59   ` Dirk Behme
  1 sibling, 2 replies; 5+ messages in thread
From: Jerry Van Baren @ 2008-11-28 21:37 UTC (permalink / raw)
  To: u-boot

Daniel Mack wrote:
> Hi,
> 
> while digging thru the sources to find out why U-Boot won't start my
> Linux kernel, I stumbled over lib_arm/bootm.c and its check for the falg
> variable. I wonder how this ever worked as the condition is really heavy
> to match unless BOOTM_STATE_OS_GO is 0 which it isn't.

Hi Daniel,

FYI, Peter Pearse found this independently.  The patch apparently hasn't 
been applied to the mainline yet.  :-(

<http://article.gmane.org/gmane.comp.boot-loaders.u-boot/49926>

[snip]

Best regards,
gvb

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

* [U-Boot] [PATCH] fix lib_arm/bootm.c
  2008-11-28 21:37 ` Jerry Van Baren
  2008-11-28 21:33   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-11-29  8:59   ` Dirk Behme
  1 sibling, 0 replies; 5+ messages in thread
From: Dirk Behme @ 2008-11-29  8:59 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:
> Daniel Mack wrote:
> 
>>Hi,
>>
>>while digging thru the sources to find out why U-Boot won't start my
>>Linux kernel, I stumbled over lib_arm/bootm.c and its check for the falg
>>variable. I wonder how this ever worked as the condition is really heavy
>>to match unless BOOTM_STATE_OS_GO is 0 which it isn't.
> 
> 
> Hi Daniel,
> 
> FYI, Peter Pearse found this independently.  The patch apparently hasn't 
> been applied to the mainline yet.  :-(

Ilko Iliev's patch is in mainline:

http://git.denx.de/?p=u-boot.git;a=commit;h=263b749e2e25473a48776d317bd2a7e2ddcdd212

Regards

Dirk

> <http://article.gmane.org/gmane.comp.boot-loaders.u-boot/49926>
> 
> [snip]
> 
> Best regards,
> gvb
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

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

end of thread, other threads:[~2008-11-29  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 19:36 [U-Boot] [PATCH] fix lib_arm/bootm.c Daniel Mack
2008-11-28 21:20 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-28 21:37 ` Jerry Van Baren
2008-11-28 21:33   ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-29  8:59   ` Dirk Behme

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