Take the WRT54G challenge!

So, LinkSys (formerly independent, now a tentacle of Cisco) has
brought the Linux version of their WRT54GL wireless router back to
life. We’d previously heard that Version 5 of the box would run
proprietary VxWorks firmware. But according to this
story
over at LinuxDevices.com,

LinkSys is shipping a Linux-based WRT54GL model that it says it
created specially for Linux hobbyists, hackers, and aficianados[sic]. The L
version is identical to the “series 4″ WRT54G units that Linux
hobbyists have long enjoyed hacking, according to the company. [...]

Here’s the key ‘graf:

VxWorks allowed the company to halve the amounts of Flash and RAM in
the device, while retaining similar functionality. Apparently,
reducing memory-related BOM (bill-of-materials) costs more than offset
the costs of licensing a proprietary OS

You know, to me that sounds like a challenge. Personally, I have
no firmware-hacking or cross-development skills; my interests lie in
other directions. But some eager band of Linux hackers out there
should strip Linux down far enough that it can fit in the reduced
footprint, just to prove it can be done and undercut the idea that
proprietary firmware is ever a good idea. And I have no
doubt it can be done; heck, we’ve made Linux run on a Z80!

(I maintain the
Linksys
Blue Box Router HOWTO
. There might be a new version, reflecting the
fact that Cisco has dropped its lawsuit against Michael Flynn, up on the
LDP site by the time you read this.)

10 thoughts on “Take the WRT54G challenge!

  1. But some eager band of Linux hackers out there should strip Linux down far enough that it can fit in the reduced footprint, just to prove it can be done and undercut the idea that proprietary firmware is ever a good idea. And I have no doubt it can be done; heck, we’ve made Linux run on a Z80!

    Have you in any way participated in achieving this?

  2. I think a stripped-down version of OpenWRT would fit in the smaller footprint, but the problem is that the V.5 is a different chipset not compatible with existing Linux distributions, and the specs are not open-source.

    It would be a very tedious hack to try to reverse-engineer the proprietary VxWorx firmware in Linux without access to the original code – I think. It could also be that there isn’t really any difference in the chipset from the V.4 and OpenWRT could be made to fit pretty easily, but that’s not the impression I’m getting from the reports.

    Also, last I heard, the WRT54GL was only being marketed in the UK – although that makes little sense and I expect it will probably make it over here as well.

  3. The WRT54GL is definitely marketed in the US. They’re $65 from here:
    http://www.costcentral.com/proddetail/Linksys_WIRELESS_G_BROADBAND_RTR_LINUX_VERSION/WRT54GL/H54784/

    We have “original source’ that would run on the v5 unit, if it was shrunk enough. The chipset is the same (a minor rev difference.)

    There are also a few newer WRT models that come with an outdoor enclosure and USB host (!). Although Ive got conflicting information on just what
    the models are, what they cost, and when they’ll be available.

  4. If I’m not mistaken, my ISP guy told me recently that he had to send three of those new v5 boxes back as junk.

  5. Linux on a Z80? I doubt it. The classic Z80 has a max of 64K of memory, and even the eZ80 only allows up to 16 MB (by extending the memory-addressing registers to 24 bits). That’s pretty scrunched.

  6. The chipset is still compatible and we (at openwrt.org) are working on figuring out the image file format so that we can run Linux on this thing.

  7. Necro posting I know, but I’ve landed here while looking (just out of interest) to see what the lowest spec micro can run Linux or Unix ;)

    Going back well into history I rememeber a PC magazine cover CD from early in my IBM-compatible history having some old Linux distro on it, SuSe v3 or something. At a guess the specs were 8-16mb RAM as a minimum and 32mb+ recommended – this was in the days of 4-8mb 486s and 16mb Pentiums being common kit. It probably said 386+up but P-75 recommended or something. Toyed with the idea of putting it on our 8mb 486/66 but I think disk space was the biggest limiting factor. All those libraries and the need for swap… couldn’t afford it alongside our Win 3.1 install that, with documents and the like, already ate half the 540mb disk.

    Shouldn’t think it included any particular “low end computer” optimisations though, as that level of PC was contemporary; our motherboard would have maxed at 64mb, if we’d had any hope of affording four 16mb SIMMs to stick in it. Applying the same kind of super-light distro optimisations we see today in stuff like DSL and Puppy to that kind of base (and particularly dropping stuff like USB and AGP support as they hadn’t even been invented) and of course all the textmode things could maybe see something that squeezed inside 2mb or less. Base-spec distros of things like QNX have been given out on FLOPPIES so finding enough hard storage shouldn’t be difficult even for an old CPU. (And indeed following this thread initially the WRT-linux was shaved within an inch of its life to fit inside the routers with 2mb of flash and 4mb of RAM…. but it never made it to the 54C which had half as much of both again).

    An MMU capable of memory virtualisation or at least clever segmentation seems to be the main sticking point, whether on the CPU (ruling out the Z80, most implementations of the Moto 68k and any Intel pre-386) or seperate (expensive, now, and needing extra code). But I’m pretty sure I’ve seen a limited Linux distro that would work on MMU-less machines, at the expense of some speed, and safety in multitasking. But Windows was able to do multiple timesliced tasks on 8086 and 286-class machines, and Atari MultiTOS and Amiga Workbench did something at least somewhat similar to it on 68000s, so it’s entirely possible. Can’t see why the Z80 being 8-bit has too much bearing on it in terms of capability (it’s an 8086 at heart anyway… or is it the other way round?), merely the memory address range. But this can be worked around with paging… the Gameboy could access more than 64k of cartridge data after all, and what of the C128 (yes, it’s a 6502, but still 8-bit). You just need to keep your core routines that look after all the hackage and plate-spinning within a suitably small outline, say 32k (and only bank-switch the other 32k). Slow, risky, but possible.

    The truly adventurous could try to add a GUI, GeOS- (Apple III, 6502) or GEM- (CPM) style, though you’d probably get very marginal for instantly available memory and speed of access, and have to add a video chip with it’s own seperate, dedicated VRAM (like PCI, or the Sharp MZs, rather than the typical more AGP-like arrangement in old machines).

    Now, onwards to find if anyone really HAS got *nix on a Z80…

  8. Ah, and a note I’d meant to add… we should not forget that Unix itself spawned in the late 60s, on machines with indeterminate capability, single-mhz equivalent processing speeds and often quite limited memory and hard storage – ANY kind of disk being state of the art, and a megabyte of core being insanely expensive. Yet it was able to support multiple simultaneous users…

    ….then I went and found this link ;)
    http://www.robotwisdom.com/linux/nonnix.html
    The original development of the system could squeeze within 16k, on a system with a max of 64k addressable memory (well, ok… 72k, but only because its word length was 18k. There were less actual “chunks” or “bytes” of RAM than a Z80 with 64k would have!)

    There seems some mention of Unix systems for Z80 processors, but only briefly and they don’t seem to get far. There is quite a lot of activity for the Z8000 (?!), 8086 and derivatives, PDP-11 and the 68000 (which is basically a miniturised PDP-11 processor anyway), including a Microsoft flavour! Though the 68000-based ones are a bit noddy, its lack of compatibility with page faults meaning it can’t really use Virtual memory without some VERY hardcore coding (though neither can the 8086; both lines had to wait for their respective “2″ chips to gain the capability) and the code has already splurged to a point where it’s outgrown 2x 720k floppy disk capacity, with hard disks for micros being very expensive/non existent depending on your platform. Plus everything sort of dies off when the original unix codebase finally goes fully commercial and closed-source.

    However, all is not lost. I then found uCLinux (microcontroller linux) which works on the 68k-derived Dragonball & Coldfire chips (no MMU, just a bit of embedded ROM/RAM, cold sleep ability and integrated video and IO circuitry), and allegedly even on the 68000 itself, though the link for that port was dead.

    Then, after everything:
    http://www.dougbraun.com/uzi.html

    I wonder… is UZI a joke, a poor work-alike that the author just *says* is unix, or the real deal? I fear only someone with a good emulator or, e.g, an RM Z380 and some way of writing out to the requisite 8″ or 5.25″ floppies would be able to check… But still, it’s allegedly a working, 64k, Z80 unix.

    PS: Never mind C128. I damn near forgot – Spectrum 128k. And there’s enough other systems out there that have a vanilla version of the chip but can access at least half a meg if not a whole lot more. If you assume you can get just 256 banks of 64k (8 bit x 16 bit) then you have your aforementioned 16mb, which is all a 386SX or the low end Pentium would have had. Not sure how you’d implement swap space, but if you kept the code tight 16mb could be more than ample. You can run Doom in it comfortably after all :D

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">