]> git.sur5r.net Git - u-boot/blobdiff - tools/imximage.c
serial: Add Actions Semi OWL UART support
[u-boot] / tools / imximage.c
index 6f16d45351d443c7706b2412d0ebf0cb61460ae6..5f63bf875945b9b8ddc850a6cb0736cbe1413165 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2009
  * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
@@ -5,8 +6,6 @@
  * (C) Copyright 2008
  * Marvell Semiconductor <www.marvell.com>
  * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include "imagetool.h"
@@ -777,6 +776,11 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, char *name)
        (*set_dcd_rst)(imxhdr, dcd_len, name, lineno);
        fclose(fd);
 
+       /* Exit if there is no BOOT_FROM field specifying the flash_offset */
+       if (imximage_ivt_offset == FLASH_OFFSET_UNDEFINED) {
+               fprintf(stderr, "Error: No BOOT_FROM tag in %s\n", name);
+               exit(EXIT_FAILURE);
+       }
        return dcd_len;
 }