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>
This commit is contained in:
Jeffy Chen
2015-11-27 12:07:17 +08:00
committed by Simon Glass
parent 5cc5b901e6
commit 7bf274b9ca
5 changed files with 120 additions and 38 deletions
+3 -1
View File
@@ -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)