[U-Boot] [PATCH v2] tools: socfpga: fix sfp_verify_header

Fix sfp_verify_header to return correct version number. This fixes "Not a sane SOCFPGA preloader" error message with v1 header.
Signed-off-by: Atsushi Nemoto atsushi.nemoto@sord.co.jp --- v2: move the *ver assignment to just before return.
tools/socfpgaimage.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c index 390c9bb..72d8b96 100644 --- a/tools/socfpgaimage.c +++ b/tools/socfpgaimage.c @@ -191,6 +191,7 @@ static int sfp_verify_header(const uint8_t *buf, uint8_t *ver) if (hdr_csum != sfp_csum) return -EINVAL;
+ *ver = header_v0.version; return img_len; }

On 09/21/2018 02:19 AM, Atsushi Nemoto wrote:
Fix sfp_verify_header to return correct version number. This fixes "Not a sane SOCFPGA preloader" error message with v1 header.
Signed-off-by: Atsushi Nemoto atsushi.nemoto@sord.co.jp
Applied, thanks.
v2: move the *ver assignment to just before return.
tools/socfpgaimage.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c index 390c9bb..72d8b96 100644 --- a/tools/socfpgaimage.c +++ b/tools/socfpgaimage.c @@ -191,6 +191,7 @@ static int sfp_verify_header(const uint8_t *buf, uint8_t *ver) if (hdr_csum != sfp_csum) return -EINVAL;
- *ver = header_v0.version; return img_len;
}
participants (2)
-
Atsushi Nemoto
-
Marek Vasut