From: Daniel Mack <daniel@caiaq.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fix lib_arm/bootm.c
Date: Fri, 28 Nov 2008 20:36:30 +0100 [thread overview]
Message-ID: <20081128193630.GC14044@buzzloop.caiaq.de> (raw)
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;
next reply other threads:[~2008-11-28 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 19:36 Daniel Mack [this message]
2008-11-28 21:20 ` [U-Boot] [PATCH] fix lib_arm/bootm.c 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081128193630.GC14044@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.