diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-14 07:11:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-14 07:11:19 +0200 |
commit | 6e68393fb17254850b9bfc8e268569a05111c29c (patch) | |
tree | e5a5b22a64f3772458f44c7110f5ec9653d56bcd /common/filetype.c | |
parent | 45000aac11315d7ccbaeefa29cafc8303ac206cb (diff) | |
parent | 6ccb3eb306022f7334a086f46d03a189e0abd937 (diff) | |
download | barebox-6e68393fb17254850b9bfc8e268569a05111c29c.tar.gz barebox-6e68393fb17254850b9bfc8e268569a05111c29c.tar.xz |
Merge branch 'for-next/mxs'
Diffstat (limited to 'common/filetype.c')
-rw-r--r-- | common/filetype.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/filetype.c b/common/filetype.c index 799ede96bc..eda8ecb376 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -78,6 +78,7 @@ static const struct filetype_str filetype_str[] = { "ubootvar" }, [filetype_stm32_image_v1] = { "STM32 image (v1)", "stm32-image-v1" }, [filetype_zynq_image] = { "Zynq image", "zynq-image" }, + [filetype_mxs_sd_image] = { "i.MX23/28 SD card image", "mxs-sd-image" }, }; const char *file_type_to_string(enum filetype f) @@ -339,6 +340,9 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize) if (buf[0] == 0x01ee0100 && buf[1] == 0xaa55aa55) return filetype_layerscape_qspi_image; + if (le32_to_cpu(buf[0]) == 0x00112233 && le32_to_cpu(buf[1]) == 0x1) + return filetype_mxs_sd_image; + if (bufsize < 64) return filetype_unknown; |