I'm looking at something similiar for another Belkin product. They recently switched format from header+cramfs+cramfs+cramfs+{etc}+trailer which was failry easy to tweak (different developer, new tools or something I suppose).
I think there's something like a set of JFFS2 partitions with a header and trailer in there. JFFS has built in compression, which would explain why theres no obvious HTML tags, JPEG headers etc.
The following script uses dd and file to walk through the rom image pulling small chunks out and logging what file thinks they are. I used it to work out where JFFS headers might be. It's the least pretty script I've ever writtin, and it takes forever. If you can tidy it up, (particularly speed it up, this takes 15 mins on a pentium D 945 in a ramdisk) please do. The size of the particular binary I'm looking at is 615249 bytes:
[barry@dell mem]$ cat looper.sh
#!/bin/bash
for ((i=1;i<=615249;i+=1)); do
dd if=F5D7230-4v6_UK_8.01.09.bin skip=$i count=256 bs=1 of=temp.bin
echo $i, >> log.txt
file temp.bin -b >> log.txt
done
I then grep log.txt:
grep -v fs log.txt
which yields lots of nonsense as you'd expect. grepping for jffs gives:
15713,
Linux old jffs2 filesystem data little endian
195706,
Linux old jffs2 filesystem data little endian
397166,
Linux old jffs2 filesystem data little endian
543503,
Linux old jffs2 filesystem data little endian
I read this as saying there's 5 chnks:
15KByte header (which seems unlikely)
40KByte JFFS partition
200KByte JFFS partition
150KByte JFFS partition
70KByte JFFS partition +trailer
I found very little relevant about opening JFFS firmware files online (why I'm writing this now really), but the following look useful:
http://esslab.tw/wiki/index.php/%E5%88% … 9E:MTD_SOP
somebody's notes on mounting ready-made JFFS2 partitons
https://svn.openwrt.org/openwrt/trunk/s … ugimage.pl
this is a perl script that the OpenSlug people used to crack open the linksys firmware images for the NSLU2 storage device.
I'm irritated by the fact I don't fully understand this, so it's my project for the next week or so. Post back if you get anywhere...
0ctal