diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2015-11-27 12:07:17 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-12-13 17:07:29 -0700 |
commit | 7bf274b9caab6de072d4dab34ab0aa66bb128195 (patch) | |
tree | a11415fdb979cbd17ef82c66cded67cc7ea6b6b6 /tools/rkimage.c | |
parent | 5cc5b901e6d319af18b8dc59537c503bbd3ca7f0 (diff) | |
download | u-boot-7bf274b9caab6de072d4dab34ab0aa66bb128195.tar.gz |
rockchip: mkimage: use imagename to select spl hdr & spl size
Our chips may have different spl size and spl header, so
use imagename(passed by "mkimage -n") to select them now.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/rkimage.c')
-rw-r--r-- | tools/rkimage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/rkimage.c b/tools/rkimage.c index 7b292f4235..f9fdcfa712 100644 --- a/tools/rkimage.c +++ b/tools/rkimage.c @@ -9,6 +9,7 @@ #include "imagetool.h" #include <image.h> +#include "rkcommon.h" static uint32_t header; @@ -30,7 +31,8 @@ static void rkimage_print_header(const void *buf) static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd, struct image_tool_params *params) { - memcpy(buf, "RK32", 4); + memcpy(buf + RK_SPL_HDR_START, rkcommon_get_spl_hdr(params), + RK_SPL_HDR_SIZE); } static int rkimage_extract_subimage(void *buf, struct image_tool_params *params) |