How to Increase the Data Partition of WGR614v8 boardrev 0x11

1 post / 0 new
Fmay
Fmay's picture
How to Increase the Data Partition of WGR614v8 boardrev 0x11

If you wish to increase the available free space of the data partition (rootfs_data), you have to following these simple tips:

1)  Add the following lines  to the file drivers/mtd/maps/bcm947xx-flash.c (See DD-WRT source) to the mtd_partition struct :

 static struct mtd_partition bcm947xx_parts[] = {
        { name: "cfe",  offset: 0, size: 0, mask_flags: MTD_WRITEABLE, },
        { name: "linux", offset: 0, size: 0, },
        { name: "rootfs", offset: 0, size: 0, mask_flags: MTD_WRITEABLE, },
        { name: "nvram", offset: 0, size: 0, },
        { name: "rootfs_data", offset: 0, size: 0, },
        { name: "fwcfg", offset: 0, size: 0, },
        { name: "new_fwcfg", offset: 0, size: 0, },
        { name: NULL, },
};

2)  At the same file, in the init_mtd_partitions function, add the following lines (you have to see where):

                                //NetGear Data Config
                                bcm947xx_parts[5].offset = bcm947xx_parts[4].offset + bcm947xx_parts[4].size;
                                bcm947xx_parts[5].size = 2*0x10000;
                                //Free Space
                                bcm947xx_parts[6].offset = bcm947xx_parts[5].offset + bcm947xx_parts[5].size;
                                bcm947xx_parts[6].size = 2*0x10000;

 3) Compile, install the firmware and init linux. You have to apply the following commands:

rock@fmay: #/  mtd write /dev/mtd/5 new_fwcfg

rock@fmay: #/ nvram set boardrev=0x10

rock@fmay: #/ nvram commit

4) Undo all modifications of the file drivers/mtd/maps/bcm947xx-flash.c.

5) You have to add the following lines at the init_mtd_partitions function (you have to see where) :

                       if ( nvram_match("boardrev", "0x10") ) {
                                /* A correction for North American version of WGR614v8, cfe version 1.3 */
                                board_data_size = 1 * 0x10000;
                                jffs_exclude_size = 0x10000;
                       }

6) Compile, reinstall and good luck Wink.

WARNING!!!!  The WGR614v8 boardrev 0x10 doesn't need it.