All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] unbreak bootm
Date: Wed, 13 Oct 2010 14:28:38 +0200	[thread overview]
Message-ID: <4CB5A5F6.9040802@eukrea.com> (raw)
In-Reply-To: <20101013111439.GO28242@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

Hi Sascha,

Le 13/10/2010 13:14, Sascha Hauer a écrit :
> On Wed, Oct 13, 2010 at 11:54:44AM +0200, Eric Bénard wrote:
>> commit a3c1e5d888d0ee317ffc7635694684bb71213c9c was
>> not tested as all the tests are wrong and it breaks bootm
>>
>
> :-(
>
> How about the following patch (currently untested)?
>
works with the attached fix.

Eric

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-fix-Sascha-s-patch.patch --]
[-- Type: text/x-patch; name="0001-fix-Sascha-s-patch.patch", Size: 1848 bytes --]

From 214d68524f90e4d7f223d1bf05b49e9958bd3c68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
Date: Wed, 13 Oct 2010 14:27:19 +0200
Subject: [PATCH] fix Sascha's patch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Eric B��nard <eric@eukrea.com>
---
 commands/bootm.c  |    2 +-
 common/image.c    |    2 +-
 scripts/mkimage.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/commands/bootm.c b/commands/bootm.c
index a7cbfb9..14475c7 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -350,7 +350,7 @@ static int do_bootm(struct command *cmdtp, int argc, char *argv[])
 
 	/* loop through the registered handlers */
 	list_for_each_entry(handler, &handler_list, list) {
-		if (image_get_os(hdr) == handler->image_type) {
+		if (image_get_os(os_header) == handler->image_type) {
 			handler->bootm(&data);
 			printf("handler returned!\n");
 			goto err_out;
diff --git a/common/image.c b/common/image.c
index 2b2c410..a4c8b95 100644
--- a/common/image.c
+++ b/common/image.c
@@ -287,7 +287,7 @@ void image_print_contents(const void *ptr)
 	printf ("%sEntry Point:  %08x\n", p, image_get_ep(hdr));
 
 	type = image_get_type(hdr);
-	if (type != IH_TYPE_MULTI || type != IH_TYPE_SCRIPT) {
+	if (type == IH_TYPE_MULTI || type == IH_TYPE_SCRIPT) {
 		int i;
 		ulong data, len;
 		ulong count = image_multi_count(hdr);
diff --git a/scripts/mkimage.c b/scripts/mkimage.c
index f6cbb1c..40a3483 100644
--- a/scripts/mkimage.c
+++ b/scripts/mkimage.c
@@ -224,7 +224,7 @@ NXTARG:		;
 		 */
 		memcpy (hdr, ptr, sizeof(image_header_t));
 
-		if (image_check_magic(hdr)) {
+		if (image_get_magic(hdr) != IH_MAGIC) {
 			fprintf (stderr,
 				"%s: Bad Magic Number: \"%s\" is no valid image\n",
 				cmdname, imagefile);
-- 
1.7.0.4


[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-10-13 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13  9:54 [PATCH] unbreak bootm Eric Bénard
2010-10-13 10:08 ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-13 10:19   ` Eric Bénard
2010-10-13 11:14 ` Sascha Hauer
2010-10-13 12:28   ` Eric Bénard [this message]
2010-10-13 13:08     ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-13 15:40     ` Sascha Hauer

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=4CB5A5F6.9040802@eukrea.com \
    --to=eric@eukrea.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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.