diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/imximage.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/imximage.c b/tools/imximage.c index 32f5bc4..daf50ba 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -300,7 +300,11 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len, hdr_base = entry_point - imximage_init_loadsize + flash_offset; fhdr_v2->self = hdr_base; - fhdr_v2->dcd_ptr = hdr_base + offsetof(imx_header_v2_t, data); + if (dcd_len > 0) + fhdr_v2->dcd_ptr = hdr_base + + offsetof(imx_header_v2_t, data); + else + fhdr_v2->dcd_ptr = 0; fhdr_v2->boot_data_ptr = hdr_base + offsetof(imx_header_v2_t, boot_data); hdr_v2->boot_data.start = entry_point - imximage_init_loadsize; |