WRT54G newer packages (eg. OpenVPN)

Yes, WRT54G is old, yes its limited, yes its kinda-of lost its support (the latest OpenWRT version is circa 2010 - Backfire 10.03.1). Here's the kicker though. Most (myself included) tend to use it for rather limited things and it works really well - plus its a shame to throw something that can be reused (I'm sure other older common devices fall into the same trap).

A case in point - I use my WRT54G (v2.2) strictly for VPN access (backfire shipped with openvpn-2.1.4-3) and now my provider is insisting I upgrade to at least openvpn-2.3.3 yet I'm unable to find an ipk to update/upgrade into. On #openwrt it was said that creating this update "would be rather simple given you knew what you were doing" (well I haven't done this before and so it seems daunting to me - help ?). So here's my humble request, why not start a repository where we can on-occasion and on-demand upload newer ipk files for those that need 'em ? I'm not suggesting anything elaborate - so anything needing lots of effort is out, anything needing newer kernel features, etc is out.

Thoughts/idea/comments ?

Make that "hasn't been supported in nearly a decade"

Effectively not possible with only 16 MB of RAM

Suitable replacements with at least 16 MB of flash and at least 128 MB of RAM from reputable manufacturers start around US$20.

Not according to the OpenWRT folk on IRC. Swapping one version of the package with a newer shouldn't overburden the system to that degree.

I'm in a third world country where these USD 20 routers are hard to come by.

The first challenge is getting it to fit into 4 MB of flash. See, for example https://openwrt.org/docs/guide-user/additional-software/saving_space and related.

I just tried a build with just adding OpenVPN using the mbedTLS library (no LuCI). It resulted in an image that seems to be too large to flash and use. 4,132,896 bytes, less than an erase block smaller than 4 MB. (At least 5 free erase blocks are typically required to use a JFFS2 overlay. 5 * 64 kB)

Edit: These are from-source builds, so they put all packages into the ROM with compression.

The device page states (unconfirmed)

As the WRT54GL has only 4Mb flash, any image sent to the device must be 3866624 bytes or smaller.

Removing PPP drops the image size to 4001824 -- still too large

Then removing wireless support drops the image size to 3477536 -- I don't know if you need wireless -- this might work, especially as there wouldn't be the processes associated with wireless running (524,288 byte reduction - 8 erase blocks)

Then removing opkg yields 3412000 -- exactly a 64 kB reduction (so probably "clicked under" an erase block)

Then removing odhcpd yields 3346464 -- another reduction of exactly 64 kB

From the above, it seems as though just to get it to fit on the flash, you'd have to go without wireless support.

Edit: Removing IPv6 support from packages and aggressively stripping gains another couple erase blocks -- 3215392 -- this requires a from-source build, not the image builder.

@lleachii is one of the few I know that has gotten a WRT54G to run anything in recent history. Perhaps he has some additional hints.

2 Likes

What @jeff said is the "realistic" view regarding this hardware, as far as the philosophy goes regarding "supported" it's somewhere along the lines of as long as it builds and boots which can be misleading regarding old hardware.

OpenVPN itself is about 140Kbyte (compressed), the smallest supported crypto library is mbed TLS which is about the same size. If you rip out ppp, opkg and possibly some kernel funtionality you might be able to squeeze it in but I highly doubt you'll succeed. On top of that it's going to be unbearably slow, you might be able to pull a few megabits tops. Your best bet would be something like wireguard or vtun(d) as they're smaller but they're still going to be slow. Given its age vtun(d) might have some security issues.

As for the router itself wifi is probably not in the greatest shape as it's Broadcom and pretty much everyone have moved on from very old 11g hardware development.

I understand that hardware choice is limited where you live but it's simply too slow and weak for "most" people so focus has shifted to more common and powerful platforms.

2 Likes

IIRC, these routers are able to be modded with an SD card.

edit: Reading into it more, I think you're better off with DD-WRT. DD-WRT uses the ancient 2.6.22 kernel, which uses less memory.

1 Like

@tfft, welcome to the community!

I must have missed that conversation.

I think @jeff proved that won't be as simple as they led you to believe.

You covered most of it. My WRT54GL is collecting dust. I'm only running similar 8/32 devices (i.e WRTSL54GS and WRT54GS v2)- and they continue to run well on the most recent Snapshots (no LuCI, of course)!

Throughput is marginal and WiFi bandwidth depends in the CPU being free, I'm sure this issue is "magnified" if a VPN software is running.

I even installed DD-WRT on my WRT54GL a few days ago. It flashed; but the web GUI constantly crashed. I finally got it stable enough to flash back to OpenWrt Kamikaze by disabling telnet and dnsmasq. Be mindful if you wanna pursue that route.