]> git.sur5r.net Git - u-boot/blobdiff - tools/socfpgaimage.c
tools: zynqmpimage: Add bif support
[u-boot] / tools / socfpgaimage.c
index 652ae45f812db9b29d6b31dc7dce81840358b068..7f83b50761f08c1771c431a60791060a41fe993b 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2014 Charles Manning <cdhmanning@gmail.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * Reference doc http://www.altera.com.cn/literature/hb/cyclone-v/cv_5400A.pdf
  * Note this doc is not entirely accurate. Of particular interest to us is the
  * "header" length field being in U32s and not bytes.
@@ -33,6 +32,8 @@
 
 #include "pbl_crc32.h"
 #include "imagetool.h"
+#include "mkimage.h"
+
 #include <image.h>
 
 #define HEADER_OFFSET  0x40
@@ -133,12 +134,12 @@ static int verify_buffer(const uint8_t *buf)
 
        len = verify_header(buf + HEADER_OFFSET);
        if (len < 0) {
-               fprintf(stderr, "Invalid header\n");
+               debug("Invalid header\n");
                return -1;
        }
 
        if (len < HEADER_OFFSET || len > PADDED_SIZE) {
-               fprintf(stderr, "Invalid header length (%i)\n", len);
+               debug("Invalid header length (%i)\n", len);
                return -1;
        }