diff options
Diffstat (limited to 'include/filetype.h')
-rw-r--r-- | include/filetype.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/filetype.h b/include/filetype.h index 502b920927..3b0715f149 100644 --- a/include/filetype.h +++ b/include/filetype.h @@ -50,4 +50,20 @@ static inline int is_barebox_arm_head(const char *head) } #endif +#define MIPS_HEAD_SIZE 0x20 +#define MIPS_HEAD_MAGICWORD_OFFSET 0x10 +#define MIPS_HEAD_SIZE_OFFSET 0x1C + +#ifdef CONFIG_MIPS +static inline int is_barebox_mips_head(const char *head) +{ + return !strcmp(head + MIPS_HEAD_MAGICWORD_OFFSET, "barebox"); +} +#else +static inline int is_barebox_mips_head(const char *head) +{ + return 0; +} +#endif + #endif /* __FILE_TYPE_H */ |