summaryrefslogtreecommitdiff
path: root/tools/rksd.c
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-05-30 23:32:09 +0200
committerSimon Glass <sjg@chromium.org>2017-06-07 07:29:22 -0600
commitad972ac3d948ae1e8b9e75ef96e9dbe8392a4678 (patch)
tree2cfe0fba450efa032e029d1f521115517f704e29 /tools/rksd.c
parent2fb371ff6483227f9be74cbce17c088bec96b411 (diff)
rockchip: mkimage: force 2KB alignment for init_size
The Rockchip BootROM relies on init_size being aligned to 2KB (see https://lists.denx.de/pipermail/u-boot/2017-May/293268.html). This pads the image to 2KB both for SD card images and SPI images and uses a common symbolic constant for the alignment. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/rksd.c')
-rw-r--r--tools/rksd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/rksd.c b/tools/rksd.c
index a880a26ccb..c56153d2ca 100644
--- a/tools/rksd.c
+++ b/tools/rksd.c
@@ -46,10 +46,10 @@ static int rksd_vrec_header(struct image_tool_params *params,
struct image_type_params *tparams)
{
/*
- * 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).
+ * Pad to a 2KB alignment, as required for init_size by the ROM
+ * (see https://lists.denx.de/pipermail/u-boot/2017-May/293268.html)
*/
- return rkcommon_vrec_header(params, tparams, RK_BLK_SIZE);
+ return rkcommon_vrec_header(params, tparams, RK_INIT_SIZE_ALIGN);
}
/*