X-Git-Url: https://git.sur5r.net/?p=u-boot;a=blobdiff_plain;f=common%2Fspl%2Fspl_fat.c;h=0403016bb433c7bdb2299bdcc215204c6cb6bcec;hp=87dd5532103a455a7614c6fc305b89096dfb3042;hb=8b1531f7bc66fae7e5c155d6ae5fa2e7aa77ade2;hpb=078e558699844bfe5b21a5c9730bba84144ef642 diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index 87dd553210..0403016bb4 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -70,7 +70,18 @@ int spl_load_image_fat(struct spl_image_info *spl_image, if (err <= 0) goto end; - if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) && + if (IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL) && + image_get_magic(header) == FDT_MAGIC) { + err = file_fat_read(filename, (void *)CONFIG_SYS_LOAD_ADDR, 0); + if (err <= 0) + goto end; + err = spl_parse_image_header(spl_image, + (struct image_header *)CONFIG_SYS_LOAD_ADDR); + if (err == -EAGAIN) + return err; + if (err == 0) + err = 1; + } else if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) && image_get_magic(header) == FDT_MAGIC) { struct spl_load_info load;