1 Index: linux-2.6.25.4/drivers/mtd/redboot.c
2 ===================================================================
3 --- linux-2.6.25.4.orig/drivers/mtd/redboot.c
4 +++ linux-2.6.25.4/drivers/mtd/redboot.c
5 @@ -251,14 +251,21 @@ static int parse_redboot_partitions(stru
7 names += strlen(names)+1;
9 -#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
10 if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {
12 - parts[i].offset = parts[i-1].size + parts[i-1].offset;
13 - parts[i].size = fl->next->img->flash_base - parts[i].offset;
14 - parts[i].name = nullname;
16 + if (!strcmp(parts[i].name, "rootfs")) {
17 + parts[i].size = fl->next->img->flash_base;
18 + parts[i].size &= ~(master->erasesize - 1);
19 + parts[i].size -= parts[i].offset;
21 +#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
24 + parts[i].offset = parts[i-1].size + parts[i-1].offset;
25 + parts[i].size = fl->next->img->flash_base - parts[i].offset;
26 + parts[i].name = nullname;