diff options
author | Tom Rini <trini@konsulko.com> | 2016-08-26 07:41:54 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-08-26 07:41:54 -0400 |
commit | c733c18e35c161fefdd4141bdce7a69b1bcfd302 (patch) | |
tree | 7d6cb30cca33890009e0b08804a457f08b3db89c /tools/kwboot.c | |
parent | 4832c7f5f79feebf8549f33c7257dec47c336470 (diff) | |
parent | bdf58c73ca406e31be49ad875969b2f9aacb9b65 (diff) | |
download | u-boot-imx-c733c18e35c161fefdd4141bdce7a69b1bcfd302.zip u-boot-imx-c733c18e35c161fefdd4141bdce7a69b1bcfd302.tar.gz u-boot-imx-c733c18e35c161fefdd4141bdce7a69b1bcfd302.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-marvell
Diffstat (limited to 'tools/kwboot.c')
-rw-r--r-- | tools/kwboot.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c index e00958a..26b3949 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -655,14 +655,6 @@ kwboot_img_patch_hdr(void *img, size_t size) hdr->blockid = IBR_HDR_UART_ID; - /* - * Subtract mkimage header size from destination address - * as this header is not expected by the Marvell BootROM. - * This way, the execution address is identical to the - * one the image is compiled for (TEXT_BASE). - */ - hdr->destaddr = hdr->destaddr - sizeof(struct image_header); - if (image_ver == 0) { struct main_hdr_v0 *hdr_v0 = img; @@ -672,6 +664,14 @@ kwboot_img_patch_hdr(void *img, size_t size) hdr_v0->srcaddr = hdr_v0->ext ? sizeof(struct kwb_header) : sizeof(*hdr_v0); + } else { + /* + * Subtract mkimage header size from destination address + * as this header is not expected by the Marvell BootROM. + * This way, the execution address is identical to the + * one the image is compiled for (TEXT_BASE). + */ + hdr->destaddr = hdr->destaddr - sizeof(struct image_header); } hdr->checksum = kwboot_img_csum8(hdr, hdrsz) - csum; |