mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] arm: support booting of uimages with as barebox payload.
@ 2012-07-17 11:23 Christian Kapeller
  2012-07-17 12:49 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Kapeller @ 2012-07-17 11:23 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-17 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 11:23 [PATCH] arm: support booting of uimages with as barebox payload Christian Kapeller
2012-07-17 12:49 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-17 13:23   ` Christian Kapeller
2012-07-17 15:34     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox