filetype: add new filetype for SoCFPGA xload image
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
eabab33283
commit
1047fa8ab4
|
@ -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)
|
||||
|
|
|
@ -36,6 +36,7 @@ enum filetype {
|
|||
filetype_exe,
|
||||
filetype_xz_compressed,
|
||||
filetype_mxs_bootstream,
|
||||
filetype_socfpga_xload,
|
||||
filetype_max,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue