summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2019-12-05 18:58:29 +0800
committerKever Yang <kever.yang@rock-chips.com>2019-12-27 15:17:07 +0800
commitf43b0d49c0fb70657abd359f55a72f156a1c0058 (patch)
treeb76203f109147ebaeed4e5213db414ddc045925a
parentbcfb05cac81b8cc818e035fc33c495714737102f (diff)
downloadu-boot-f43b0d49c0fb70657abd359f55a72f156a1c0058.tar.gz
u-boot-f43b0d49c0fb70657abd359f55a72f156a1c0058.tar.bz2
u-boot-f43b0d49c0fb70657abd359f55a72f156a1c0058.zip
rockchip: mkimage: fix wrong range of rc4 encoding for boot image
The rc4 encoding should cover spl header as well, and the file_size contains spl header too. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--tools/rkimage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/rkimage.c b/tools/rkimage.c
index ae50de55c9..1c5540b1c3 100644
--- a/tools/rkimage.c
+++ b/tools/rkimage.c
@@ -18,7 +18,7 @@ static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd,
memcpy(buf, rkcommon_get_spl_hdr(params), RK_SPL_HDR_SIZE);
if (rkcommon_need_rc4_spl(params))
- rkcommon_rc4_encode_spl(buf, 4, params->file_size);
+ rkcommon_rc4_encode_spl(buf, 0, params->file_size);
}
static int rkimage_check_image_type(uint8_t type)