diff options
author | Tom Rini <trini@konsulko.com> | 2016-01-14 11:23:05 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-01-14 11:23:05 -0500 |
commit | f46c25583a73042edf432b209ee4b93bc3f7e762 (patch) | |
tree | a7cbd8afde1b0cbf86a9c8150cbd737df3ee82c9 /tools | |
parent | db18f548cb7b5ff99223b66eac1966eb45230817 (diff) | |
parent | f822d8578ba395d9af1cc315a2fb87b1eed3d355 (diff) | |
download | u-boot-imx-f46c25583a73042edf432b209ee4b93bc3f7e762.zip u-boot-imx-f46c25583a73042edf432b209ee4b93bc3f7e762.tar.gz u-boot-imx-f46c25583a73042edf432b209ee4b93bc3f7e762.tar.bz2 |
Merge git://www.denx.de/git/u-boot-marvell
Conflicts:
arch/arm/Kconfig
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile | 2 | ||||
-rw-r--r-- | tools/kwboot.c | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/tools/Makefile b/tools/Makefile index d49e40d..1382b05 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -156,7 +156,7 @@ ubsha1-objs := os_support.o ubsha1.o lib/sha1.o HOSTCFLAGS_ubsha1.o := -pedantic hostprogs-$(CONFIG_KIRKWOOD) += kwboot -hostprogs-$(CONFIG_ARMADA_XP) += kwboot +hostprogs-$(CONFIG_ARCH_MVEBU) += kwboot hostprogs-y += proftool hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela diff --git a/tools/kwboot.c b/tools/kwboot.c index c5f4492..905ade3 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -9,10 +9,14 @@ * 2008. Chapter 24.2 "BootROM Firmware". */ +#include "kwbimage.h" +#include "mkimage.h" + #include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdarg.h> +#include <image.h> #include <libgen.h> #include <fcntl.h> #include <errno.h> @@ -22,8 +26,6 @@ #include <sys/mman.h> #include <sys/stat.h> -#include "kwbimage.h" - #ifdef __GNUC__ #define PACKED __attribute((packed)) #else @@ -652,6 +654,14 @@ 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; |