[scripts] ext-toolchain.sh:
[openwrt.git] / target / linux / brcm63xx / patches-3.1 / 041-bcm963xx_real_rootfs_length.patch
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 */
8 - char reserved1[8];
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 last 20 bytes */
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
19 int ret;
20 size_t retlen;
21 unsigned int rootfsaddr, kerneladdr, spareaddr;
22 - unsigned int rootfslen, kernellen, sparelen, totallen;
23 + unsigned int rootfslen, kernellen, sparelen;
24 int namelen = 0;
25 int i;
26 char *boardid;
27 @@ -85,7 +85,7 @@ static int parse_cfe_partitions(struct m
28
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]);
35
36 @@ -94,7 +94,8 @@ static int parse_cfe_partitions(struct m
37
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;
45
This page took 0.044268 seconds and 5 git commands to generate.