summaryrefslogtreecommitdiff
path: root/tools/rksd.c
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-04-17 15:48:03 (GMT)
committerSimon Glass <sjg@chromium.org>2017-05-10 19:37:21 (GMT)
commitc25b8c3af108019303364bc304a80e3f83209dc6 (patch)
tree8983f90662d8fbe239ec19f8dcf7bb93a62ed860 /tools/rksd.c
parentea3729e23b36233354fd9f9dfd2d1b21ff1f49a8 (diff)
downloadu-boot-c25b8c3af108019303364bc304a80e3f83209dc6.tar.xz
rockchip: mkimage: rksd: pad SD/MMC images to a full blocksize
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/rksd.c')
-rw-r--r--tools/rksd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/rksd.c b/tools/rksd.c
index 6dafedf..8627b6d 100644
--- a/tools/rksd.c
+++ b/tools/rksd.c
@@ -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);
}
/*