Skip to contentSkip to conversation

aboot: fix block addressing for don't care chunk type

PATCH In review Rob Herring 3 participants 3 messages Oct 16, 2014 – Oct 27, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aboot: fix block addressing for don't care chunk type

From: Rob Herring <[email protected]>

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.

---
 common/aboot.c | 1 +
 1 file changed, 1 insertion(+)
common/aboot.c +1 -0
index d5c464b..fba8e3e 100644
@@ -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;
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 aboot: fix block addressing for don't care chunk type

Hi Rob:

THANKS!

Quoted 19 lines · Rob Herring

From: Rob Herring <[email protected]>

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.

---
  common/aboot.c | 1 +
  1 file changed, 1 insertion(+)
common/aboot.c +0 -0
index d5c464b..fba8e3e 100644

common/aboot.c void write_sparse_image(block_dev_desc_t *dev_desc, · line 214

Quoted 7 lines
common/aboot.c +1 -0
@@ -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;
 
#2 lore raw
In reply to Rob Herring
Quoted 10 lines · Rob Herring

From: Rob Herring <[email protected]>

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141027/9d47f95e/attachment.pgp>