Skip to content

Commit

Permalink
rockchip: mkimage: fix wrong range of rc4 encoding for boot image
Browse files Browse the repository at this point in the history
The rc4 encoding should cover spl header as well, and the file_size
contains spl header too.

Signed-off-by: Jeffy Chen <[email protected]>
Reviewed-by: Kever Yang <[email protected]>
  • Loading branch information
JeffyCN authored and keveryang committed Dec 27, 2019
1 parent bcfb05c commit f43b0d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/rkimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f43b0d4

Please sign in to comment.