From: cshore Date: Tue, 28 Dec 2010 04:05:04 +0000 (+0000) Subject: [brcm63xx] patches-2.6.36: Fix flashmap spare length calculation from previous commit... X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/8688d050d645b166a6b0857690c2f0903b95461a?ds=sidebyside [brcm63xx] patches-2.6.36: Fix flashmap spare length calculation from previous commit (for rootfs and rootfs_data mtd partitions). Apparently the interruption in working on it resulted in an incorrect memory of getting it working. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24842 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/target/linux/brcm63xx/patches-2.6.35/040-bcm963xx_flashmap.patch b/target/linux/brcm63xx/patches-2.6.35/040-bcm963xx_flashmap.patch index 4835a159a..5a5ba1283 100644 --- a/target/linux/brcm63xx/patches-2.6.35/040-bcm963xx_flashmap.patch +++ b/target/linux/brcm63xx/patches-2.6.35/040-bcm963xx_flashmap.patch @@ -179,8 +179,8 @@ Signed-off-by: Axel Gembe + 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;