mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 03/10] filetype: Add filetype for MXS bootstream
Date: Fri, 12 Jun 2015 08:35:39 +0200	[thread overview]
Message-ID: <1434090946-6574-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1434090946-6574-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/filetype.c  | 3 +++
 include/filetype.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/common/filetype.c b/common/filetype.c
index 25d9761..28a4b2c 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -60,6 +60,7 @@ static const struct filetype_str filetype_str[] = {
 			"TI OMAP CH boot image (big endian)", "ch-image-be" },
 	[filetype_xz_compressed] = { "XZ compressed", "xz" },
 	[filetype_exe] = { "MS-DOS executable", "exe" },
+	[filetype_mxs_bootstream] = { "Freescale MXS bootstream", "mxsbs" },
 };
 
 const char *file_type_to_string(enum filetype f)
@@ -292,6 +293,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
 
 	if (buf8[0] == 'M' && buf8[1] == 'Z')
 		return filetype_exe;
+	if (le32_to_cpu(buf[5]) == 0x504d5453)
+		return filetype_mxs_bootstream;
 
 	if (is_barebox_arm_head(_buf))
 		return filetype_arm_barebox;
diff --git a/include/filetype.h b/include/filetype.h
index cca4dad..e452b7a 100644
--- a/include/filetype.h
+++ b/include/filetype.h
@@ -34,6 +34,7 @@ enum filetype {
 	filetype_ch_image_be,
 	filetype_exe,
 	filetype_xz_compressed,
+	filetype_mxs_bootstream,
 	filetype_max,
 };
 
-- 
2.1.4


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

  parent reply	other threads:[~2015-06-12  6:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12  6:35 i.MX FCB NAND boot updates Sascha Hauer
2015-06-12  6:35 ` [PATCH 01/10] ARM: dts: Karo tx6: increase barebox partition to 4MB Sascha Hauer
2015-06-12  6:35 ` [PATCH 02/10] mtd: partition: implement write_oob Sascha Hauer
2015-06-12  6:35 ` Sascha Hauer [this message]
2015-06-12  6:35 ` [PATCH 04/10] ARM: i.MX6: bbu nand: Move to common place Sascha Hauer
2015-06-12  6:35 ` [PATCH 05/10] imx-bbu-nand-fcb: Fix debug messages Sascha Hauer
2015-06-12  6:35 ` [PATCH 06/10] imx-bbu-nand-fcb: Use barebox partition instead of whole device Sascha Hauer
2015-06-12  6:35 ` [PATCH 07/10] imx-bbu-nand-fcb: make available for i.MX28 aswell Sascha Hauer
2015-06-12  6:35 ` [PATCH 08/10] imx-bbu-nand-fcb: Let DBBT start at page 1 Sascha Hauer
2015-06-12  6:35 ` [PATCH 09/10] imx-bbu-nand-fcb: Erase whole partition Sascha Hauer
2015-06-12  6:35 ` [PATCH 10/10] imx-bbu-nand-fcb: Split space for firmware in two equal regions 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=1434090946-6574-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@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