WNR3500Lv2 - firmware greater than 8MB, up to 128MB!

16 posts / 0 new
Last post
Berk
Berk's picture
WNR3500Lv2 - firmware greater than 8MB, up to 128MB!

Tomato, DD-WRT, and even stock v1.0.0.10.chk fit in 8MB, probably so does the new stock v1.0.0.14.  Now that we have the luxury of 128MB NAND Flash, why not take advantage of it?  There are so many functions I'd love to have, some are reserved for servers and NAS systems.  Some of those routines are open-source, so why not port them to this router?  Especially since it has support for a USB hard drive.  It seems it could become a fairly complete Linux server.

I'd love to see support for more configuration for QoS with different rules per user and port, multi-SSID, port capturing, and Cascading routers and access points, to name a few.

Which OS are developers using to target this router?  (stock firmware uses ancient Fedora Core 6, 32bit, and recommends building only on that platform)

 

buddee
buddee's picture
Most 3rd party firmware,

Most 3rd party firmware, atleast dd-wrt and openwrt are compiled on 64bit Ubuntu LTS releases.

Subhra
Subhra's picture
I have compiled Toamto on

I have compiled Toamto on Fedora (32 bit) and dd-wrt on Fedora (64 bit) for WNR3500Lv2.
One more thing, before porting you should check if the features you wish to have is already present in the firmwares released in this site or not. As far I can see that multiple SSID support is already present in dd-wrt firmware for WNR3500Lv2.
Keep us know about your progress, this will help to enrich the knowledge of this forum.

Berk
Berk's picture
Hi Subhra,

Hi Subhra,
That's great that you compiling both versions for this router using Fedora, did you successfully flash your router with your builds? Would you consider downloading the stock firmware and seeing if you can build that on your same system? But read the documentation in their code, to see some strange disclaimers. I'm not sure if you should attempt to flash a custom "stock" build unless you have the TTL cable to restore it, or like to gamble. I'd hate to have my suggestion brick your router!
http://www.downloads.netgear.com/files/GPL/WNR3500Lv2-V1.0.0.14_37.0.50_...
I even wrote to Netgear about this a couple days ago (to an address they don't make public and told me over the phone). I even said they can address their response to this forum instead of me!

My main question for this thread is whether we can flash more than 8MB without flaw. If so, we can have some functions of Enterprise level products, and even the entire pfsense firewall OS 2.0 (based on freeBSD 8) would appear to work, but need to be built for MIPS (Broadcom) while currently targeting x86. That's another significantly complex project to try.

Yet another would be to use the flash as a BIOS and boot loader for a drive based full OS Distro! Using SSD and dedicated disk caching would allow orders of magnitude more functionality, perhaps while not losing throughput. All on a $65 router!

My personal interest is to achieve a secure network for myself on cascading routers, multiple guest networks with differing levels of access, guest email pass-through unhindered for all guests, and port forwarding to redirect all other new users to a website that allows log-in, tells the local weather, and whatever. The router could even be used to host intranet websites (a forum to whine about the apartment complex!), or be used to run home-automation devices from the USB port. But for me these ideas are just for the sake of hobby.

What is important for this thread is the "8MB Flash Barrier" that nobody has appeared to cross yet, and what might be achieved if the full 128MB can be used, and potentially the USB port (Flashdrive, or SATA HD/SSD) for program space.

Subhra
Subhra's picture
Yes I am able to falsh both

Yes I am able to falsh both the Tomato and dd-wrt firmwares in my WNR3500Lv2.
I am able to build Stock firmware on same Fedora 32 bit machine and also able to flash it in WNR3500Lv2.

Subhra
Subhra's picture
As far as my knowledge

As far as my knowledge concerned, there should not be some barrier of firmware size to 8MB. Though I also haven't seen any firmware with size greater than 8MB.

Berk
Berk's picture
To Subhra: That you

To Subhra: That you successfully built and flashed all three is great news.  I'll order a cable right away.  Since all three can be built and flashed (using TTL to be safe) using Fedora, I'll switch to Fedora and try to duplicate your results.  Please suggest which version of Fedora to install so I can flash all three, perhaps Fedora v16, 64bit, being the latest stable release at this time.  I'll write my own firmware, using pieces of all three, rather than just discuss it.  Writing for 8MB forces tight code, 128MB allows some waste, even if the tight loops still have to be efficient.  A thread suggested that the latest Tomato builds slow throughput, but when I checked there was no verification.  I'd like to test those results.  It may be that the code has to remain efficient to keep throughput up, so large firmware builds may not be an option.  I'd like to try, though.

The fastest proof of concept is to take any one firmware on a particular platform, and add a frivolous front-end administrator's interface with extensive real-time graphs and logs with excessive graphics to make the build well over 8MB, using more than 8MB of RAM and more processing power, then test the results.

A low-level function I really want (even if it only gets run on setup for any given user) is independent control of power and channel on each antenna if the hardware allows, which would be used to log the connection speeds to each computer (wireless and wired) in each combination.  My panel antenna has arrived which should work up to a few miles away in one direction, but I am still waiting for my other purchases.  I hope to test antenna combinations shortly, while using multiple wireless devices, but want the results to be conclusive and easily compared by others.  Logging the data strictly from a portable client (my iPad with speedtest.net or similar) may prove cumbersome, incomplete, and inconclusive.  I may have to walk a couple miles between tests, to test both the remote device and home devices for each setting.  I suppose an automatic tool to perform testing to find the highest throughput is a lot to ask... but would be extremely useful.  That automatic tool could then be used by any user to determine their optimum power/channel settings in their particular situation, reducing neighborhood interference and maximizing network security.  This would also allow testing for the best position for the router within the home.  I would like to write my own build using the available free source code, but would like to know which tools to use so I don't brick my router.  (I've written in assembly, c, and c++ for x86; and archaic languages and platforms many moons ago.  I'm a novice in scripting and networking.  I'm quite comfortable in electronics assembly and repair.)

From ham radio forums, I read that better throughput may be achieved with lower amplification, depending on many variables in your installed location.

Berk
Berk's picture
Mokona512 said: ...dual boot.

Mokona512 said: ...dual boot...

[significant rewrite]
This is as simple as building a project that includes a boot menu and full copies of every desired firmware all in one project (stock 1.0.0.14, dd-wrt, Tomato, open-wrt, "custom") changing a little code to keep each in it's own memory space.  Everything would fit well within 128MB Flash.  That would make quite a testbed.  This would allow a "custom" firmware to fail utterly, and not brick the router.  That said, a menu, two aftermarket builds to compare, and a "custom" firmware is more than sufficient.

I've finished dissecting my router and will list the components in an article soon.  Most of the router is in one ASIC chip that cannot be changed, the RAM cannot be changed, the Flash is the same design as USB Flash drives with faster available, but would require SM solder work requiring significant experience and equipment to complete, without sufficient improvement.  To replace out-of-warranty Flash?  Yes, you have nothing to lose. Smile  There are no unpopulated areas (free upgrades), and a few components could be replaced for repair but no significant upgrade noticed. POE mod could be completed, though not sure of an advantage.  Article forthcoming, tentative name: WNR3500Lv2 - defined in detail

open-wrt doesn't get much mention on this forum.  A MIPS website states the following:
"OpenWrt is an open-source OS software project that is the de facto standard for networking and wireless router applications."
So professionals apparently start with open-wrt for all low-level code, and build an interface on top.  A completely custom giant build may be possible using open-wrt for the low-level, and a NAS build such as pfsense (based on freeBSD) for all high-level routines.  Combining them would be a significant (but possible) unique project.

Subhra
Subhra's picture
I used fc14(32 bit) to

I used fc14(32 bit) to compile Stock and Tomato source code and fc15(64 bit) for dd-wrt source code for WNR3500Lv2.

Berk
Berk's picture
Hi Subhra, [pared down]

Hi Subhra, [pared down]

Was there a specific reason you used Fedora 14, 32 bit for stock and Tomato, and Fedora 15, 64 bit for dd-wrt?...So please suggest a development set up.

I've ordered a cable from Mouser, and received and flashed a WRT54GSv1.0 with dd-wrt.v24-13064_VINT_mega.bin (following instructions on dd-wrt, flashing mini first) so I'll still have a working router when I flash mine, and received my antenna collection but no connectors yet.

I've installed Fedora 16, 64bit on my PC. Will soon begin building the finished firmwares, and when my cable arrives, try flashing them. Still some loose ends to figure out.

Subhra
Subhra's picture
Earlier I had Fedora 14 (32

Earlier I had Fedora 14 (32 bit) and compiled Stock and tomato on it.
Next I read from dd-wrt release README that it was compiled in Fedora 15(64 bit) thats why I used the same to compile dd-wrt.

Yes toolchain is needed for cross-compilation as the compiled executables are meant to run on a different platform.

Berk
Berk's picture
Subhra, your chronology makes

Subhra, your chronology makes sense, but is there any reason that we can't use the most recent 64 bit OS (Fedora 16, Ubuntu 12.04) to build all the older code? (as in, problem with legacy support, version control, Fedora vs Ubuntu?) I'm not sure whether to use "MIPS" or "MIPS II" toolchain, though that may become clear at install.

The whole reason for my concern in the first place was I read in the readme in the stock firmware that it was built in Fedora Core 6, and warned against building on any other. Then I read in some other readme files deeper into the project that they were only tested on such-n-such older OS, and to only build on that platform. This is why I'm confused: are those disclaimers bunk? Since you successfully built "stock" on Fedora 14, 32bit, flashed it, and ran it; this seems to suggest it is okay to build everything on later OS'es. Any way to know if your builds were as efficient as theirs? Then there's Fedora vs Ubuntu. Everyone has their preferences, but in this case I just care about compatibility and efficiency of my object code to the chip.

hwstar
hwstar's picture
Why not just try it and see

Why not just try it and see if it successfully builds an image? I got a successful build of Tomato Shibby on Ubuntu 12.04 32 bit after updating dnscrypt to 0.9.3. What I don't know yet is if the image works as my second WNR3500LV2 has not shown up. Sometimes is is just more efficient to try it and see what happens. If it fails, ask questions specific to the failure and see what comes back.

Subhra
Subhra's picture
Berk said: Subhra, your

Berk said: Subhra, your chronology makes sense, but is there any reason that we can't use the most recent 64 bit OS (Fedora 16, Ubuntu 12.04) to build all the older code? (as in, problem with legacy support, version control, Fedora vs Ubuntu?) I'm not sure whether to use "MIPS" or "MIPS II" toolchain, though that may become clear at install. The whole reason for my concern in the first place was I read in the readme in the stock firmware that it was built in Fedora Core 6, and warned against building on any other. Then I read in some other readme files deeper into the project that they were only tested on such-n-such older OS, and to only build on that platform. This is why I'm confused: are those disclaimers bunk? Since you successfully built "stock" on Fedora 14, 32bit, flashed it, and ran it; this seems to suggest it is okay to build everything on later OS'es. Any way to know if your builds were as efficient as theirs? Then there's Fedora vs Ubuntu. Everyone has their preferences, but in this case I just care about compatibility and efficiency of my object code to the chip.

dd-wrt for WNR3500Lv2 can be build successfully on Fedora 15 (64 bit). But it is mentioned nowhere that dd-wrt cannot be build in Fedora 16 (64 bit). You can try it.
To build dd-wrt on a linux mechine it should be equipped with some basic development tools. You will find the list here.

Berk
Berk's picture
Bingo!

Bingo!
Thanks Subhra, that link is what I was missing! It also describes the needed MIPS toolchains in detail. I'll start with dd-wrt on Fedora 16, 64bit running on an AMD 64bit PC. When I have that working, I'll add on a bunch-of-nonsense to make my build exceed 8MB and report back. Then I'll get serious and share my resulting code, which I hope others will take up and start adding more functionality. I'll also try out the other open-source builds, and see what it takes to get them all working on the latest Fedora.

Subhra
Subhra's picture
Keep this forum updated about

Keep this forum updated about your progress, it would be great help for other developers.