Modified squashfs dictionary

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

Modified squashfs dictionary

#1 Post by Patriot »

Hmmm .....

[rant mode ON]

I have several old modem routers with broadcom bcm6345/6348 chipset. They're working fine (yeah, linux is on them all) ... just that I need to make several changes to the apps, like busybox, ssh, wol, configurations, removing stuffs, etc, etc ... Only doing the changes that I need to have a more stable and secure routers ...

The firmware format is more or less known. The gpl sources for the platform is available from several verndors (BT-voyager, siemens, Usr, etc, etc) ... but the rootfs which is using Squashfs-lzma v1 were modified to use a different dictionary (known as broadcom variant) ... and the modified dictionary headers/sources (or even a compatible mksquashfs binary) are not included with the gpl sources ..... :x

I've found a working unsquashfs for the rootfs image. Scouring the net for compatible mksquashfs has not been fruitful ..... (Querying the vendors have all came back empty .....)

I've been working on-and-off on this (in my free time) for the past two weeks ..... did some modified mksquashfs binaries while guessing the proper dictionary/mods used in the broadcom variant. All I want is to unsquash, modify/upgrade some files/apps and squash it back. Now, only the last part is the show stopper ....

The the best result so far that I got was a version that must've borked up the content at certain point due to wrong dictionary .... meaning that re-combining the rootfs into the firmware and flashing to the routers resulted in bootable routers with a listable rootfs but scrambled file contents in certain parts ....

I've had better results finding (broadcom variant) squashfs v2/v3 but using them would mean changing the kernel and recompile the whole thing from scratch ... If this was a x86 PC platform, it's a non-issue ... but this is a MIPS platform with broken driver sources ...

So, I wonder .... if anyone here understand the old squashfs v1 format (with lzma) and how to reverse engineer the dictionary/headers. Any pointers would be much obliged ........

[rant mode OFF]

Yeah, not really a programming question .... Its been a lot of fun to be able to do cross compile on puppy and running qemu-mips on puppy too ..... An eye opener for me to see how they squeeze all that OS stuff into 2MB of flash ..... Maybe I'll just KIV this until I have more free time .....


Rgds

Post Reply