From: Christian Kapeller <christian.kapeller@cmotion.eu>
To: barebox@lists.infradead.org
Subject: [PATCH] arm: support booting of uimages with as barebox payload.
Date: Tue, 17 Jul 2012 13:23:02 +0200 [thread overview]
Message-ID: <1342524182-15436-1-git-send-email-christian.kapeller@cmotion.eu> (raw)
Packing barebox within an uimage gives us integrity checking.
Generate the image with:
./scripts/mkimage -A arm -O barebox -T firmware -C none -d barebox.bin -a 0xffffffff barebox.uimage
Signed-off-by: Christian Kapeller <christian.kapeller@cmotion.eu>
---
arch/arm/lib/bootm.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 3a00437..791efc2 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -117,6 +117,13 @@ static struct image_handler rawimage_handler = {
.filetype = filetype_unknown,
};
+static struct image_handler bbuimage_handler = {
+ .name = "ARM barebox uImage",
+ .bootm = do_bootm_linux,
+ .filetype = filetype_uimage,
+ .ih_os = IH_OS_BAREBOX,
+};
+
struct zimage_header {
u32 unused[9];
u32 magic;
@@ -470,6 +477,7 @@ static int armlinux_register_image_handler(void)
register_image_handler(&uimage_handler);
register_image_handler(&rawimage_handler);
register_image_handler(&zimage_handler);
+ register_image_handler(&bbuimage_handler);
if (IS_BUILTIN(CONFIG_CMD_BOOTM_AIMAGE)) {
register_image_handler(&aimage_handler);
binfmt_register(&binfmt_aimage_hook);
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2012-07-17 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 11:23 Christian Kapeller [this message]
2012-07-17 12:49 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-17 13:23 ` Christian Kapeller
2012-07-17 15:34 ` 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=1342524182-15436-1-git-send-email-christian.kapeller@cmotion.eu \
--to=christian.kapeller@cmotion.eu \
--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