Changeset 10773
- Timestamp:
- 11/05/08 14:22:29 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/linux/brcm/linux.v24_2/drivers/mtd/maps/bcm947xx-flash.c
r10509 r10773 329 329 /* Update the squashfs partition size based on the superblock info */ 330 330 part->size = sb->bytes_used; 331 //part->size = part->size + 1024; /* uncomment for belkin v2000 ! */ 331 332 len = part->offset + part->size; 332 333 len += (mtd->erasesize - 1); … … 390 391 391 392 int board_data_size = 0; // e.g Netgear 0x003e0000-0x003f0000 : "board_data", we exclude this part from our mapping 392 393 int jffs_exclude_size = 0; // to prevent overwriting len/checksum on e.g. Netgear WGR614v8/L/WW 394 393 395 uint boardnum = bcm_strtoul( nvram_safe_get( "boardnum" ), NULL, 0 ); 394 396 … … 396 398 && nvram_match ("boardtype", "0x0472") 397 399 && nvram_match ("cardbus", "1") ) { 398 board_data_size = ROUNDUP(NVRAM_SPACE, mtd->erasesize); //Netgear WNR834B, Netgear WNR834Bv2400 board_data_size = 0x10000; //Netgear WNR834B, Netgear WNR834Bv2 399 401 } 400 402 … … 402 404 && nvram_match ("boardtype", "0x0472") 403 405 && nvram_match ("boardrev", "0x23") ) { 404 board_data_size = ROUNDUP(NVRAM_SPACE, mtd->erasesize); //Netgear WNDR-3300406 board_data_size = 0x10000; //Netgear WNDR-3300 405 407 } 406 408 … … 409 411 && (nvram_match("boardrev", "0x11") || nvram_match("boardrev", "0x10")) 410 412 && (nvram_match("boardflags", "0x750") || nvram_match("boardflags", "0x0750")) ) { 411 if (nvram_match ("sdram_init", "0x000A") ) //Netgear WGR614v8/L/WW 16MB ram, cfe v1.3 or v1.5 412 board_data_size = 5 * ROUNDUP(NVRAM_SPACE, mtd->erasesize); // checksum is @ 0x003AFFF8 413 else if (nvram_match ("sdram_init", "0x0002") ) //Netgear WGR614v9, cfe v1.5, 8MB ram 414 board_data_size = ROUNDUP(NVRAM_SPACE, mtd->erasesize); // checksum is @ 0x001F9FFF8 413 if (nvram_match ("sdram_init", "0x000A") ) { //Netgear WGR614v8/L/WW 16MB ram, cfe v1.3 or v1.5 414 board_data_size = 4 * 0x10000; // checksum is @ 0x003AFFF8 415 jffs_exclude_size = 0x10000; 416 } 417 else if (nvram_match ("sdram_init", "0x0002") ) //Netgear WGR614v9, cfe v1.5, 8MB ram 418 board_data_size = 0x10000; // checksum is @ 0x001F9FFF8 415 419 } 416 420 … … 464 468 } 465 469 bcm947xx_parts[4].size = bcm947xx_parts[3].offset - 466 bcm947xx_parts[4].offset - board_data_size ;470 bcm947xx_parts[4].offset - board_data_size - jffs_exclude_size; 467 471 } else { 468 472 bcm947xx_parts[4].offset = bcm947xx_parts[2].offset + … … 473 477 } 474 478 bcm947xx_parts[4].size = size - bcm947xx_parts[3].size - 475 bcm947xx_parts[4].offset - board_data_size; 479 bcm947xx_parts[4].offset - board_data_size - jffs_exclude_size; 480 } 481 /* do not make zero size jffs2 partition */ 482 if (bcm947xx_parts[4].size < mtd->erasesize) { 483 bcm947xx_parts[4].name = NULL; 476 484 } 477 485 }
Note: See TracChangeset
for help on using the changeset viewer.
