patches-2.6.36: Fix flashmap spare length calculation from previous commit (for rootf...
authorDaniel Dickinson <crazycshore@gmail.com>
Tue, 28 Dec 2010 04:05:04 +0000 (04:05 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Tue, 28 Dec 2010 04:05:04 +0000 (04:05 +0000)
SVN-Revision: 24842

target/linux/brcm63xx/patches-2.6.35/040-bcm963xx_flashmap.patch

index 4835a159ae6644986878dfca4c161ec2d78aa5f8..5a5ba128348aa48fad6d678c1050b229c5dde8a1 100644 (file)
@@ -179,8 +179,8 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org>
 +      rootfslen = ( ( rootfslen % master->erasesize ) > 0 ? (((rootfslen / master->erasesize) + 1 ) * master->erasesize) : rootfslen);
 +      totallen = rootfslen + kernellen + sizeof(struct bcm_tag);
 +
-+      spareaddr = roundup(totallen, master->erasesize) + master->erasesize;
-+      sparelen = master->size - spareaddr - master->erasesize;
++      spareaddr = rootfsaddr + rootfslen;
++      sparelen = master->size - totallen - master->erasesize;
 +
 +      /* Determine number of partitions */
 +      namelen = 8;