]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - tools/rkspi.c
Merge git://git.denx.de/u-boot-dm
[people/ms/u-boot.git] / tools / rkspi.c
index a0b0051d3805919ae72e67b2aa186fafdb77c0c4..0271d2e817bfa0e1d543b4b3c414b4351568238e 100644 (file)
@@ -48,6 +48,10 @@ static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd,
        memcpy(buf + RK_SPL_HDR_START, rkcommon_get_spl_hdr(params),
               RK_SPL_HDR_SIZE);
 
+       if (rkcommon_need_rc4_spl(params))
+               rkcommon_rc4_encode_spl(buf, RK_SPL_START - 4,
+                                       params->file_size - RK_SPL_START + 4);
+
        /*
         * Spread the image out so we only use the first 2KB of each 4KB
         * region. This is a feature of the SPI format required by the Rockchip