X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fimximage.c;h=5f63bf875945b9b8ddc850a6cb0736cbe1413165;hb=7af51f12bc41c38c537f2b049db21fb4554657b5;hp=ed9d93590316614bc8880ea94b51385b2f66b8ba;hpb=ee5f24909f0b35befb0d1436221cea58cf823865;p=u-boot diff --git a/tools/imximage.c b/tools/imximage.c index ed9d935903..5f63bf8759 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -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 * Written-by: Prafulla Wadaskar - * - * SPDX-License-Identifier: GPL-2.0+ */ #include "imagetool.h" @@ -516,11 +515,11 @@ static void print_hdr_v2(struct imx_header *imx_hdr) offs = (char *)&hdr_v2->data.dcd_table - (char *)hdr_v2; - printf("HAB Blocks: %08x %08x %08x\n", + printf("HAB Blocks: 0x%08x 0x%08x 0x%08x\n", (uint32_t)fhdr_v2->self, 0, hdr_v2->boot_data.size - imximage_ivt_offset - imximage_csf_size); - printf("DCD Blocks: 00910000 %08x %08x\n", + printf("DCD Blocks: 0x00910000 0x%08x 0x%08x\n", offs, be16_to_cpu(dcdlen)); } } else { @@ -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; }