]> git.sur5r.net Git - u-boot/commitdiff
aboot: fix block addressing for don't care chunk type
authorRob Herring <robh@kernel.org>
Thu, 16 Oct 2014 03:19:36 +0000 (11:19 +0800)
committerTom Rini <trini@ti.com>
Mon, 27 Oct 2014 21:54:09 +0000 (17:54 -0400)
CHUNK_TYPE_DONT_CARE should skip over the specified number of blocks, but
currently fails to increment the device block address. This results in
filesystem images getting written incorrectly. Add the missing block
address incrementing.

Cc: Steve Rae <srae@broadcom.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Steve Rae <srae@broadcom.com>
common/aboot.c

index d5c464bd7daaaecec71a044c07fda32e582b0097..fba8e3e683e7da654cb1aaf61bd92f4224a29f0f 100644 (file)
@@ -208,6 +208,7 @@ void write_sparse_image(block_dev_desc_t *dev_desc,
                        break;
 
                        case CHUNK_TYPE_DONT_CARE:
+                       blk += blkcnt;
                        total_blocks += chunk_header->chunk_sz;
                        break;