Closed GoogleCodeExporter closed 8 years ago
Should be able to work around this by running build-ng.sh as root, but I'll add
a sudo in front of the cat command.
Original comment by heffne...@gmail.com
on 26 Jan 2012 at 7:59
Fix checked in. Thanks!
Original comment by heffne...@gmail.com
on 12 Feb 2012 at 2:41
Hi,
Could anyone tell me how to use firmware-mod-kit to extract jffs2 filesystem
from a firmware?
Any help will be appreciated.
Original comment by kirbyt2...@gmail.com
on 16 Feb 2012 at 9:30
The automated scripts don't support jffs2. However, you can use binwalk
(included in FMK) to search a firmware image for jffs2 filesystems, then you
just have to dd the file system out of the firmware image.
Original comment by heffne...@gmail.com
on 16 Feb 2012 at 8:49
[deleted comment]
[deleted comment]
[deleted comment]
[deleted comment]
[deleted comment]
The unjffs2 tool will extract all the files from the jffs2 file system once it
is extracted from the firmware image. The primary reason jffs2 support isn't
built into the *ng scripts is that the jffs2 signature is only 2 bytes long and
results in a lot of false positives matches. Binwalk does a pretty good job of
filtering out false positives, but it doesn't always catch them all; this could
potentially break other firmware if a false positive jffs2 match is hit.
It can be added to the ng scripts, but probably want to attempt to build a
better signature, if possible.
Original comment by heffne...@gmail.com
on 17 Feb 2012 at 1:16
Thanks for bringing me up to speed, I was rambling about, as I do. Even at 2
bytes there may be fewer false positives than thought. After all, if no other
matches are found, we can defer to *trying* UNJFFS2. If it works, then we know
it was JFFS2. If it doesn't, then false positive.
Original comment by jeremy.collake@gmail.com
on 17 Feb 2012 at 1:20
I will make sure UNJFFS2 returns the appropriate exit code on failure or
success, and has proper exception handling or data validation so it won't crash
if we feed it random data. Then, I'll integrate it on in.
Original comment by jeremy.collake@gmail.com
on 17 Feb 2012 at 9:45
Changed status to 'Started' since I really want to add this given the number of
routers firmware images that may come with a 'starter' JFFS2 FS image, or even
have their primary FS as JFFS2 (though most are smart enough to use
squashfs-lzma, then 'overlay' it with JFFS2 to make the file-system writable).
Original comment by jeremy.collake@gmail.com
on 17 Feb 2012 at 9:47
Hi,
adding that sudo did not help me fix the problem. I'm running Ubuntu 12. My
firmware image extracts fine and fmk sees the squashfs 3.0 (it has a
non-standard signature) but when I try to rebuild without any modifications it
gives the following output:
Building new squashfs file system...
Parallel mksquashfs: Using 2 processors
Creating little endian 3.0 filesystem on
/home/life/Desktop/DIR300_204_root//new-filesystem.squashfs, block size 65536.
Remaining free bytes in firmware image: 2322432
Processing 1 header(s) from
/home/life/Desktop/DIR300_204_root//new-firmware.bin...
Processing header at offset 96...checksum(s) updated OK.
CRC(s) updated successfully.
Finished! New firmware image has been saved to:
/home/life/Desktop/DIR300_204_root//new-firmware.bin
However
new-filesystem.squashfs is empty and binwalk does not recognise the filesystem
in new-firmware.bin - it's just padded with 2322432 times 0xff bytes
Original comment by urbanski...@gmail.com
on 11 Dec 2012 at 7:55
Original comment by jeremy.collake@gmail.com
on 13 Apr 2013 at 2:08
Original issue reported on code.google.com by
simanin...@gmail.com
on 25 Jan 2012 at 6:38