1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Netgear WNR3500 (not L!) v2 and IPv6

Discussion in 'Tomato Firmware' started by s3phy, Jul 3, 2012.

  1. s3phy

    s3phy Serious Server Member

    Hi everyone,

    I have a Netgear WNR3500 v2. Note that this is a non -L version, meaning... whatever it means (less RAM/flash/memory whatsoever as I understand it)

    I am actually running Toastman's firmware Tiny version on this router. I was previously using the old and out of date Tomato USB from tomatousb.org , but when I found the different mods I decided to try them :)

    I am specifically looking for a mod supporting IPv6: My ISP recently activated it, and I want to use it! So far I have tried Toastman's Mini-IPv6 version, but it is too big to fit in my router's MTD...

    And in fact, this is the same problem I have with every IPv6-enabled Tomato mod I've tried!

    The maximum firmware size on my router seems to be around 3400 Kbytes. I am running Toastman's Tiny version because the Mini version bricked my router, and the Mini-IPV6 (3720 kB) is too big for my router. Shibby's firmware, Mini-IPv6 version weighting 3616 kBytes, is also too big.

    I tried Victek's RAF firmware version 1.28.9006, weighting 3516 kBytes: I was unable to flash it from another Tomato (file too big for MTD), but I was able to successfully flash it from DD-WRT... Well I saw this version doesn't support IPv6, but I found it strange to be able to flash it from DD-WRT and not from Tomato... (What's the real size of my router's MTD in the end??)

    If anyone has an idea for me, I'm listening :) In times of Giga and Tera bytes, I'm frustrated to be unable to use IPv6 just because my router's memory is a few Kilo bytes too small :)

    Thanks!
     
  2. Dark_Shadow

    Dark_Shadow Addicted to LI Member

    DD-WRT forum reports the largest that can be flashed on a Netgear 4MB chip is

     
  3. s3phy

    s3phy Serious Server Member

    Thanks.

    But why can't I flash Toastman's Mini-IPv6 firmware, weighing 3719168 bytes, in my router?

    I just tried again moments ago: from an existing Tomato, I get the message "file is too big to fit in MTD", from DD-WRT, I get "upgrade failed".
     
  4. koitsu

    koitsu Network Guru Member

    http://infodepot.wikia.com/wiki/Netgear_WNR3500_v2.0

    Code:
    Flash Size = 4MB
    Max Firmware Size = 3735552 bytes
    
    Please log in to your router and provide full output from the "dmesg" command. I'm specifically looking for the output that resembles this (all 7 lines are important, so if you were to just post dmesg entirely that would ensure you don't chop off something useful):

    Code:
    Flash device: 0x2000000 at 0x1c000000
    Creating 5 MTD partitions on "Physically mapped flash":
    0x00000000-0x00040000 : "pmon"
    0x00040000-0x01fe0000 : "linux"
    0x00127000-0x007a0000 : "rootfs"
    0x007a0000-0x01fe0000 : "jffs2"
    0x01fe0000-0x02000000 : "nvram"
    
    I'm guessing here (not enough information right now), but I'm betting that there's some size/room overhead that's needed, thus the "max firmware size" reported may be true when referring to actual flash space available for a firmware but not considering some of the added overhead, or possibly there's an alignment error when calculating maximum region size. Here's why I say that:

    3735552 - 3719168 = 16384 = 16KBytes exactly.
     
  5. s3phy

    s3phy Serious Server Member

    Hi and thanks for helping me,

    Here's the output of dmesg:

     
  6. koitsu

    koitsu Network Guru Member

    Code:
    pflash: found no supported devices
    Creating 6 MTD partitions on "sflash":
    0x00000000-0x00040000 : "pmon"
    0x00040000-0x00390000 : "linux"
    0x00111000-0x00390000 : "rootfs"
    0x00390000-0x003e0000 : "jffs2"
    0x003f0000-0x00400000 : "nvram"
    0x003e0000-0x003f0000 : "board_data"
    
    This would mean the available flash space for a firmware (meaning physical space on the flash chip) ranges from address 0x00040000 to 0x003e0000. A little bc to do some math + base conversions:

    Code:
    $ bc
    ibase=16
    3E0000 - 40000
    3801088        <--- total number of bytes in decimal
    ibase=A
    obase=16
    3801088
    3A0000          <--- total number of bytes in hexadecimal
    obase=10
    3801088 - 3735552
    65536          <--- 64KBytes going somewhere...!
    
    Possibly the 64KBytes that I can't explain are used for either board_data (I have no idea what that is), or NVRAM.

    So, overall I still don't have a concise answer, but my guess is that there is some kind of underlying limitation/overhead, which effectively means you have less than 3735552 bytes available for a firmware image.

    Since NVRAM is 65536 bytes (even if only 32KBytes is installed; I imagine the upper 32KBytes would then be a mirror of the lower), and board_data is 65536 bytes, I wonder if the actual maximum firmware size permitted would then be 65536 bytes smaller, e.g.: 3735552 - 65536 = 3670016 bytes available for a firmware.

    Really not sure man, just sorta grasping at straws here. I'd need someone more familiar with the mtd layout and how firmware upgrades (via the GUI, not via mtd directly) actually work.
     

Share This Page