diff options
Diffstat (limited to 'common/spl/spl_fat.c')
-rw-r--r-- | common/spl/spl_fat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index fce451b7664..f426a068ff9 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -47,6 +47,7 @@ static int spl_register_fat_device(struct blk_desc *block_dev, int partition) static ulong spl_fit_read(struct spl_load_info *load, ulong file_offset, ulong size, void *buf) { + struct legacy_img_hdr *header; loff_t actread; int ret; char *filename = load->priv; @@ -55,6 +56,12 @@ static ulong spl_fit_read(struct spl_load_info *load, ulong file_offset, if (ret) return ret; + if (CONFIG_IS_ENABLED(OS_BOOT)) { + header = (struct legacy_img_hdr *)buf; + if (image_get_magic(header) != FDT_MAGIC) + return size; + } + return actread; } |