[U-Boot] broken lib_arm/boom.c/do_bootm_linux()

Hi,
There is a bug in lib_arm/boom.c/do_bootm_linux(): if ((flag != 0) || (flag != BOOTM_STATE_OS_GO)) return 1;
The parameter "flag" is 0 and the above condition is always true.
The result is - the boom command doesn't start the kernel. Affected targets: all arm based.
Maybe it should be corrected to: if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1;

On Nov 7, 2008, at 5:07 AM, Ilko Iliev wrote:
Hi,
There is a bug in lib_arm/boom.c/do_bootm_linux(): if ((flag != 0) || (flag != BOOTM_STATE_OS_GO)) return 1;
The parameter "flag" is 0 and the above condition is always true.
The result is - the boom command doesn't start the kernel. Affected targets: all arm based.
Maybe it should be corrected to: if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1;
that's correct.. for some reason the lib_arm/ case didn't get fixed. How about sending a patch to fix it.
- k

Signed-off-by: Ilko Iliev iliev@ronetix.at --- lib_arm/bootm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c index 8e264ce..7dbde7d 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;

On 17:11 Sat 08 Nov , Ilko Iliev wrote: Could do a comment like your precedent e-mail which explain what problem your fix
Best Regards, J.

This patch corrects a small bug in the "if" condition: the parameter "flag" is 0 and the "if" condition is always true. The result is - the boom command doesn't start the kernel. Affected targets: all arm based.
Signed-off-by: Ilko Iliev iliev@ronetix.at --- lib_arm/bootm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c index 8e264ce..7dbde7d 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;

On 15:53 Sun 09 Nov , Ilko Iliev wrote:
This patch corrects a small bug in the "if" condition: the parameter "flag" is 0 and the "if" condition is always true. The result is - the boom command doesn't start the kernel. Affected targets: all arm based.
Signed-off-by: Ilko Iliev iliev@ronetix.at
lib_arm/bootm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to u-boot-arm/master and u-boot-arm/omap3
Best Regards, J.

Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:53 Sun 09 Nov , Ilko Iliev wrote:
This patch corrects a small bug in the "if" condition: the parameter "flag" is 0 and the "if" condition is always true. The result is - the boom command doesn't start the kernel. Affected targets: all arm based.
Signed-off-by: Ilko Iliev iliev@ronetix.at
lib_arm/bootm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to u-boot-arm/master and u-boot-arm/omap3
Is there any special reason why no git pull request for mainline for this is sent? Isn't this an important fix which should go into mainline even if merge window is not open?
Dirk
And btw: What's about merging clean up patches like
http://lists.denx.de/pipermail/u-boot/2008-November/043220.html
now (outside merge window) into mainline via e.g. u-boot-arm/master? Having this merged now, I could rebase OMAP3 patch against this and mainline would be ready when merge window opens.

Dear Dirk,
In message 492595B5.3050505@googlemail.com you wrote:
This patch corrects a small bug in the "if" condition:
...
Applied to u-boot-arm/master and u-boot-arm/omap3
Is there any special reason why no git pull request for mainline for this is sent? Isn't this an important fix which should go into mainline even if merge window is not open?
Yes, this *should* go into mainline ASAP.
I am waiting for a pull request for u-boot-arm myself, too.
Best regards,
Wolfgang Denk
participants (5)
-
Dirk Behme
-
Ilko Iliev
-
Jean-Christophe PLAGNIOL-VILLARD
-
Kumar Gala
-
Wolfgang Denk