]> git.sur5r.net Git - u-boot/commitdiff
rockchip: mkimage: rksd: pad SD/MMC images to a full blocksize
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 17 Apr 2017 15:48:03 +0000 (17:48 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 10 May 2017 19:37:21 +0000 (13:37 -0600)
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
tools/rksd.c

index 6dafedf282218bd17f608b71242f9a10b71c8800..8627b6d31b8f6e4aa3c1f63574050118a22b2c5a 100644 (file)
@@ -62,8 +62,11 @@ static int rksd_check_image_type(uint8_t type)
 static int rksd_vrec_header(struct image_tool_params *params,
                            struct image_type_params *tparams)
 {
-       /* We don't add any additional padding after the end of the image */
-       return rkcommon_vrec_header(params, tparams, 1);
+       /*
+        * Pad to the RK_BLK_SIZE (512 bytes) to be consistent with init_size
+        * being encoded in RK_BLK_SIZE units in header0 (see rkcommon.c).
+        */
+       return rkcommon_vrec_header(params, tparams, RK_BLK_SIZE);
 }
 
 /*