I'm trying to play with the firmware of a router, which is basically a squashfs filesystem.
If I create a squashfs filesystem and look at it with a hex editor it does look very similar to the one I have for the router, but I have been unable to mount the firmware on my test box. I think this is because it has been compressed with lzma to improve the compression ratio, and this is not compiled into squashfs by default.
So: Does that sound plausible? Are there any good distros for this kind of thing (eg a live CD I can experiment with), or should I try and set something up myself? I'm thinking probably a VMWare virtual machine would do what I need. (Basically I want to extract the firmware and hack the HTML, then recompress it and use it to break^H^H^H^H^H tweak my router.)
Anyone here done this kind of thing?
On Thu, Jun 01, 2006 at 12:31:22PM +0100, Mark Rogers wrote:
I'm trying to play with the firmware of a router, which is basically a squashfs filesystem.
If I create a squashfs filesystem and look at it with a hex editor it does look very similar to the one I have for the router, but I have been unable to mount the firmware on my test box. I think this is because it has been compressed with lzma to improve the compression ratio, and this is not compiled into squashfs by default.
What model of router is it? Have you seen OpenWRT (http://openwrt.org/)?
Anyone here done this kind of thing?
I've built, modified and installed OpenWRT on a handful of routers. I believe others on list have as well.
J.
Jonathan McDowell wrote:
What model of router is it? Have you seen OpenWRT (http://openwrt.org/)?
It's a Solwise SAR-600E. Its based on AR7 (http://www.linux-mips.org/wiki/AR7)
I have looked at OpenWRT but wasn't clear whether it would work on this router (right chipset I think but not listed as supported).
I've built, modified and installed OpenWRT on a handful of routers. I believe others on list have as well.
Sounds like I'm in the right place!
What routers have you used? I don't need anything beyond basic ADSL+router (ie no wireless needed) but I'm not especially tied to the Solwise kit (we just use them for other stuff and the SAR-600E is cheap). NB: I'm prepared to risk breaking my SAR-600E, its only for testing some ideas anyway.
On Thu, Jun 01, 2006 at 12:54:00PM +0100, Mark Rogers wrote:
Jonathan McDowell wrote:
What model of router is it? Have you seen OpenWRT (http://openwrt.org/)?
It's a Solwise SAR-600E. Its based on AR7 (http://www.linux-mips.org/wiki/AR7)
I have looked at OpenWRT but wasn't clear whether it would work on this router (right chipset I think but not listed as supported).
Ah, the joyous AR7. I have a DG834G, which is based on the same chipset. OpenWRT doesn't support AR7 at present in any usable fashion. And the SAR-600E appears to only have 2MB flash so OpenWRT isn't likely to be an option.
What routers have you used? I don't need anything beyond basic ADSL+router (ie no wireless needed) but I'm not especially tied to the Solwise kit (we just use them for other stuff and the SAR-600E is cheap). NB: I'm prepared to risk breaking my SAR-600E, its only for testing some ideas anyway.
There's nothing in the way of ADSL routers that I can really recommend at present. AR7 is the best hope and I'm not sure anyone's really working on it at present. I've ended up with a Netgear WGT634U that has USB2 on it with a USB Speedtouch attached.
Getting back to your original question about squashfs I assume you didn't rebuild the kernel? Does the firmware source from Solwise not include a suitable mksquashfs? The Netgear one does.
OpenWRT has target/linux/image/squashfs/patches/100-lzma.patch which might help as well?
J.
Jonathan McDowell wrote:
Getting back to your original question about squashfs I assume you didn't rebuild the kernel? Does the firmware source from Solwise not include a suitable mksquashfs? The Netgear one does.
I haven't tried building a kernel yet (mainly because so far tests have been on boxes I didn't want to break). I expected to find some of the smaller distros (eg DSL) using squashfs+lzma but it seems not (of the ones I've found). If I had found one a liveCD would have been all I needed.
Solwise can't supply the source, on account of the fact that they're still trying to get it from the manufacturer. I could perhaps persue this a little harder.
OpenWRT has target/linux/image/squashfs/patches/100-lzma.patch which might help as well?
I'll take a look, thanks. Looks like I need a VM in which to build a suitable kernel.
On Thu, Jun 01, 2006 at 04:33:26PM +0100, Mark Rogers wrote:
Jonathan McDowell wrote:
Getting back to your original question about squashfs I assume you didn't rebuild the kernel? Does the firmware source from Solwise not include a suitable mksquashfs? The Netgear one does.
I haven't tried building a kernel yet (mainly because so far tests have been on boxes I didn't want to break). I expected to find some of the smaller distros (eg DSL) using squashfs+lzma but it seems not (of the ones I've found). If I had found one a liveCD would have been all I needed.
I think it's unlikely you'll be able to take a standard x86 live CD and recompile it in a manner that's going to run on your router, if that's what you're saying you were hoping for. They're really aimed at very different environments.
Solwise can't supply the source, on account of the fact that they're still trying to get it from the manufacturer. I could perhaps persue this a little harder.
You might want to raise that with the gpl-violation project, though they already have plenty to be getting on with.
OpenWRT has target/linux/image/squashfs/patches/100-lzma.patch which might help as well?
I'll take a look, thanks. Looks like I need a VM in which to build a suitable kernel.
Why do you need a VM (virtual machine?)? All you need is a cross compiler.
J.
Jonathan McDowell wrote:
I think it's unlikely you'll be able to take a standard x86 live CD and recompile it in a manner that's going to run on your router, if that's what you're saying you were hoping for. They're really aimed at very different environments.
No, what I'm hoping to do is open the squashfs filesystem and look at the files in it, which means I need a PC (or VM) which can mount it. So far I've not achieved this (but I haven't purpose-built a kernel yet).
My (simplistic) reasoning is that the same reasons that my router uses a heavily compressed squashfs filesystem would apply to the smaller mini-distros (like DSL), therefore if I could find one that used squashfs+lzma itself then having booted from it I should be able to mount the router's filesystem (without having to mod the kernel), extract the files, change them, and build a new squashfs file to tranfer to the router.
All I'll probably look to change is some of the HTML files in the web GUI. I may try to take it further later when I realise I can't do what I want by hacking the HTML, but I'm some way off that yet! Mostly what I want to achieve is simplifying some of the GUI (eg replacing some form text fields with hidden fields which set the right values so that users don't have to know what VCI and VPI, etc, are), maybe re-skinning it too if I'm feeling artistic.
Solwise can't supply the source, on account of the fact that they're still trying to get it from the manufacturer. I could perhaps persue this a little harder.
You might want to raise that with the gpl-violation project, though they already have plenty to be getting on with.
Indeed, and the slow release of firmware source seems to be quite common. There must be a decent way to encourage (enforce) the code release, but I guess even the mighty Microsoft's of this world have problem getting people to keep to the terms of their licences.
If I knew the manufacturer I'd start with them (maybe I'll open the case and have a look).
Why do you need a VM (virtual machine?)? All you need is a cross compiler.
Miscommunication, sorry! I'll need a PC with a kernel I can rebuild to try and get squashfs+lzma in order to mount the squashfs image. That could be any PC but since my Linux stuff is mostly standard distro installs I don't really want to disturb them by recompiling the kernel, so a VM is simplest.
Hi all This is the annoying post which will spark of as many complaints from slef for its poor choice of advertising location as it will for its actual content, but hey -
I'm looking to recruit some code monkeys (that is going to be their official job title) - possibly just out of Uni or similar, and can program relativily well (preferably in C# or Java). The job is in Peterbourgh (south side) so don't bother applying if you dont want to bother with moving or commuting...
The details are at: http://www.activefone.com/job/
James Taylor
On Thu, Jun 01, 2006 at 08:59:30PM +0100, James Taylor wrote:
Hi all This is the annoying post which will spark of as many complaints from slef for its poor choice of advertising location as it will for its actual content, but hey -
I'm looking to recruit some code monkeys (that is going to be their official job title) - possibly just out of Uni or similar, and can program relativily well (preferably in C# or Java). The job is in Peterbourgh (south side) so don't bother applying if you dont want to bother with moving or commuting...
The details are at: http://www.activefone.com/job/
Dude! If you're going to do annoying posts, can you at least make them new posts, not a post to a thread on a *completely* different topic ;)
Annnnd... I wasn't aware that this list had turned in to a MS based job advertising place! ALUG is for Alternative operating systems, Linux, BSD, OSX, Hurd, UNIXoids, ReactOS... that appears to be a job advert for a .NET developer, what on earth do people employ those for?!
(Sheesh!)
On 1 Jun 2006, at 22:00, Brett Parker wrote:
Annnnd... I wasn't aware that this list had turned in to a MS based job advertising place! ALUG is for Alternative operating systems, Linux, BSD, OSX, Hurd, UNIXoids, ReactOS... that appears to be a job advert for a .NET developer, what on earth do people employ those for?!
Well, not just MS job advertising but any job advertising. Mind you, I hold my hands up in a gulity-as-charged way in the past, but don't do it now. And besides which, I doubt anybody else has ever joined and read the Linuxmovies mailing list. For a list that's supposedly about discussing how Linux fits in with post-production facilities, technical discussion about it, etc. it's almost now entirely job advertisements from Pixar, Sony ImageWorks and other companies that should (but don't) know any better. I'll have to get my smiting stick out at some point..
M.