mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] filetype: add arm u-boot support
@ 2013-09-17  7:52 Jean-Christophe PLAGNIOL-VILLARD
  2013-09-17  7:52 ` [PATCH 2/2] bootm: add " Jean-Christophe PLAGNIOL-VILLARD
  2013-09-18  7:00 ` [PATCH 1/2] filetype: add arm " Sascha Hauer
  0 siblings, 2 replies; 11+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-09-17  7:52 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/filetype.c  | 3 +++
 include/filetype.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/common/filetype.c b/common/filetype.c
index 7507d85..59ea25a 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -35,6 +35,7 @@ static const struct filetype_str filetype_str[] = {
 	[filetype_lzo_compressed] = { "lzo compressed", "lzo" },
 	[filetype_lz4_compressed] = { "lz4 compressed", "lz4" },
 	[filetype_arm_barebox] = { "arm barebox image", "arm-barebox" },
+	[filetype_arm_uboot] = { "arm u-boot image", "arm-u-boot" },
 	[filetype_uimage] = { "U-Boot uImage", "u-boot" },
 	[filetype_ubi] = { "UBI image", "ubi" },
 	[filetype_jffs2] = { "JFFS2 image", "jffs2" },
@@ -226,6 +227,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
 
 	if (is_barebox_arm_head(_buf))
 		return filetype_arm_barebox;
+	if (buf[15] == 0xdeadbeef)
+		return filetype_arm_uboot;
 	if (buf[9] == 0x016f2818 || buf[9] == 0x18286f01)
 		return filetype_arm_zimage;
 
diff --git a/include/filetype.h b/include/filetype.h
index 9a864da..b83b9be 100644
--- a/include/filetype.h
+++ b/include/filetype.h
@@ -12,6 +12,7 @@ enum filetype {
 	filetype_lzo_compressed,
 	filetype_lz4_compressed,
 	filetype_arm_barebox,
+	filetype_arm_uboot,
 	filetype_uimage,
 	filetype_ubi,
 	filetype_jffs2,
-- 
1.8.4.rc1


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

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

end of thread, other threads:[~2013-09-21  8:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-17  7:52 [PATCH 1/2] filetype: add arm u-boot support Jean-Christophe PLAGNIOL-VILLARD
2013-09-17  7:52 ` [PATCH 2/2] bootm: add " Jean-Christophe PLAGNIOL-VILLARD
2013-09-18  7:03   ` 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

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