From e7b23c6a9df57b5c8bba4fa9c10f8b5f793745cc Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 10 Jun 2015 15:04:20 +0200 Subject: filetype: Add filetype for MXS bootstream Signed-off-by: Sascha Hauer --- common/filetype.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/filetype.c') diff --git a/common/filetype.c b/common/filetype.c index 25d97614e4..28a4b2ca25 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; -- cgit v1.2.3