mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] bootm: add u-boot support
Date: Tue, 17 Sep 2013 09:52:19 +0200	[thread overview]
Message-ID: <1379404339-6716-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1379404339-6716-1-git-send-email-plagnioj@jcrosoft.com>

Simply do the same as barebox and hope for the best as u-boot does not handle
runtime address detection for boot quite often. It does only execpt you to
choose as compiling time.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/lib/bootm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 599b09a..71200be 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -315,6 +315,12 @@ static struct image_handler barebox_handler = {
 	.filetype = filetype_arm_barebox,
 };
 
+static struct image_handler uboot_handler = {
+	.name = "ARM u-boot",
+	.bootm = do_bootm_barebox,
+	.filetype = filetype_arm_uboot,
+};
+
 #include <aimage.h>
 
 static int aimage_load_resource(int fd, struct resource *r, void* buf, int ps)
@@ -470,9 +476,15 @@ static struct binfmt_hook binfmt_barebox_hook = {
 	.exec = "bootm",
 };
 
+static struct binfmt_hook binfmt_uboot_hook = {
+	.type = filetype_arm_uboot,
+	.exec = "bootm",
+};
+
 static int armlinux_register_image_handler(void)
 {
 	register_image_handler(&barebox_handler);
+	register_image_handler(&uboot_handler);
 	register_image_handler(&uimage_handler);
 	register_image_handler(&rawimage_handler);
 	register_image_handler(&zimage_handler);
@@ -482,6 +494,7 @@ static int armlinux_register_image_handler(void)
 	}
 	binfmt_register(&binfmt_arm_zimage_hook);
 	binfmt_register(&binfmt_barebox_hook);
+	binfmt_register(&binfmt_uboot_hook);
 
 	return 0;
 }
-- 
1.8.4.rc1


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

  reply	other threads:[~2013-09-17  7:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17  7:52 [PATCH 1/2] filetype: add arm " Jean-Christophe PLAGNIOL-VILLARD
2013-09-17  7:52 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-09-18  7:03   ` [PATCH 2/2] bootm: add " Sascha Hauer
2013-09-19 11:50     ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-18  7:00 ` [PATCH 1/2] filetype: add arm " Sascha Hauer
2013-09-19 11:56   ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-20  6:29     ` Sascha Hauer
2013-09-20  8:02       ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-20 11:56         ` Sascha Hauer
2013-09-21  6:53           ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-21  8:10             ` 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=1379404339-6716-2-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox