[U-Boot] [PATCH] spl_mmc: allow to load raw image

Masahiro Yamada yamada.masahiro at socionext.com
Mon Feb 29 12:31:57 CET 2016


The function spl_parse_image_header() falls back to a raw image
if the U-Boot header is missing and CONFIG_SPL_PANIC_ON_RAW_IMAGE
is undefined.  While, the bad magic checking here makes the
spl_parse_image_header() unreachable in case of the missing header.

Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---

 common/spl/spl_mmc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index c27a250..df406e3 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -33,11 +33,6 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
 	if (count == 0)
 		goto end;
 
-	if (image_get_magic(header) != IH_MAGIC) {
-		puts("bad magic\n");
-		return -1;
-	}
-
 	spl_parse_image_header(header);
 
 	/* convert size to sectors - round up */
-- 
1.9.1



More information about the U-Boot mailing list