1 --- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h
2 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h
3 @@ -86,8 +86,10 @@ struct bcm_tag {
4 char rootfs_crc[CRC_LEN];
5 /* 224-227: CRC32 of kernel partition */
6 char kernel_crc[CRC_LEN];
7 - /* 228-235: Unused at present */
9 + /* 228-231: Image sequence number */
10 + char image_sequence[4];
11 + /* 222-235: Openwrt: real rootfs length */
12 + char real_rootfs_length[4];
13 /* 236-239: CRC32 of header excluding tagVersion */
14 char header_crc[CRC_LEN];
15 /* 240-255: Unused at present */
16 --- a/drivers/mtd/maps/bcm963xx-flash.c
17 +++ b/drivers/mtd/maps/bcm963xx-flash.c
18 @@ -64,7 +64,7 @@ static int parse_cfe_partitions(struct m
21 unsigned int rootfsaddr, kerneladdr, spareaddr;
22 - unsigned int rootfslen, kernellen, sparelen, totallen;
23 + unsigned int rootfslen, kernellen, sparelen;
27 @@ -85,7 +85,7 @@ static int parse_cfe_partitions(struct m
29 sscanf(buf->kernel_address, "%u", &kerneladdr);
30 sscanf(buf->kernel_length, "%u", &kernellen);
31 - sscanf(buf->total_length, "%u", &totallen);
32 + rootfslen = *(uint32_t *)(&(buf->real_rootfs_length));
33 tagversion = &(buf->tag_version[0]);
34 boardid = &(buf->board_id[0]);
36 @@ -94,7 +94,8 @@ static int parse_cfe_partitions(struct m
38 kerneladdr = kerneladdr - BCM63XX_EXTENDED_SIZE;
39 rootfsaddr = kerneladdr + kernellen;
40 - spareaddr = roundup(totallen, master->erasesize) + master->erasesize;
41 + rootfslen = roundup(rootfslen, master->erasesize);
42 + spareaddr = rootfsaddr + rootfslen;
43 sparelen = master->size - spareaddr - master->erasesize;
44 rootfslen = spareaddr - rootfsaddr;