mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Subject: [PATCH 1/7] filetype: add new filetype for SoCFPGA xload image
Date: Tue,  9 Aug 2016 14:37:26 +0200	[thread overview]
Message-ID: <1470746252-3146-1-git-send-email-s.trumtrar@pengutronix.de> (raw)

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 common/filetype.c  | 4 ++++
 include/filetype.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/common/filetype.c b/common/filetype.c
index a8666a1439df..4728f877c975 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -61,6 +61,7 @@ static const struct filetype_str filetype_str[] = {
 	[filetype_xz_compressed] = { "XZ compressed", "xz" },
 	[filetype_exe] = { "MS-DOS executable", "exe" },
 	[filetype_mxs_bootstream] = { "Freescale MXS bootstream", "mxsbs" },
+	[filetype_socfpga_xload] = { "SoCFPGA prebootloader image", "socfpga-xload" },
 };
 
 const char *file_type_to_string(enum filetype f)
@@ -294,6 +295,9 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
 	if (le32_to_cpu(buf[5]) == 0x504d5453)
 		return filetype_mxs_bootstream;
 
+	if (buf[16] == 0x31305341)
+		return filetype_socfpga_xload;
+
 	if (is_barebox_arm_head(_buf))
 		return filetype_arm_barebox;
 	if (buf[9] == 0x016f2818 || buf[9] == 0x18286f01)
diff --git a/include/filetype.h b/include/filetype.h
index e87ca174a89d..cde73c1170c6 100644
--- a/include/filetype.h
+++ b/include/filetype.h
@@ -36,6 +36,7 @@ enum filetype {
 	filetype_exe,
 	filetype_xz_compressed,
 	filetype_mxs_bootstream,
+	filetype_socfpga_xload,
 	filetype_max,
 };
 
-- 
2.8.1


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

             reply	other threads:[~2016-08-09 12:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 12:37 Steffen Trumtrar [this message]
2016-08-09 12:37 ` [PATCH 2/7] ARM: socfpga: defconfig: add bootstrap_devfs Steffen Trumtrar
2016-08-09 17:48   ` Trent Piepho
2016-08-10  6:14     ` Steffen Trumtrar
2016-08-09 12:37 ` [PATCH 3/7] ARM: socfpga: xload: support more qspi partitions Steffen Trumtrar
2016-08-09 12:37 ` [PATCH 4/7] socfpga: remove dt entries that are upstream Steffen Trumtrar
2016-08-09 12:37 ` [PATCH 5/7] ARM: socfpga: socrates: set alias for ethernet0 Steffen Trumtrar
2016-08-09 12:37 ` [PATCH 6/7] ARM: socfpga: socrates: add qspi partitions Steffen Trumtrar
2016-08-09 12:37 ` [PATCH 7/7] ARM: socfpga: socrates: register bbu handlers Steffen Trumtrar
2016-08-18  6:23 ` [PATCH 1/7] filetype: add new filetype for SoCFPGA xload image 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=1470746252-3146-1-git-send-email-s.trumtrar@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --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