Closed GoogleCodeExporter closed 9 years ago
The DIR600 DD-WRT image has both a TRX header and a uImage header, which I
think confuses the extract_firmware.sh script. Looking at the extract.log file,
you should see something like:
untrx 0.54 beta - (c)2006-2010 Jeremy Collake
Opening dir600b-revb-ddwrt-webflash.bin
read 3661852 bytes
Writing test/image_parts/segment1
size 3661824 from offset 28 ...
Done!
In other words, the untrx tool saw a TRX header and assumed the file system
immediately followed the TRX header at offset 28, when in fact the file system
is located at offset 868380.
A temporary fix is to comment out the untrx call in the extract_firmware.sh
script, forcing the splitter3 tool to be invoked instead, which will properly
locate and extract the SquashFS file system.
In the extract_firmware.sh file, comment out lines 111, 112, and 122. The file
should then look like:
110 echo " Extracting firmware"
111 #"src/untrx" "$1" "$2/image_parts" >> extract.log 2>&1
112 #if [ $? != 0 ]; then
113 echo "! untrx failed, trying splitter3";
114 "src/splitter3" "$1" "$2/image_parts" >> extract.log
2>&1
115 if [ $? != 0 ]; then
116 echo " Not recognized by splitter3";
117 # exit 1
118 else
119 touch "$2/.linux_raw_type3"
120 touch "$2/.squashfs3_lzma_fs"
121 fi
122 #fi
Re-run extract_firmware.sh and it should work.
Original comment by heffne...@gmail.com
on 8 Aug 2011 at 2:31
The firmware is properly extracted with the extract-ng.sh script (requires
binwalk).
Original comment by heffne...@gmail.com
on 30 Aug 2011 at 12:15
This issue still exists with me on the ng script.
A temporary workaround was to modify line 62 to this:
$BINWALK -f "$BINLOG" -d -x invalid -y squashfs "$IMG"
Original comment by seth.sk...@gmail.com
on 16 Nov 2011 at 1:34
Original issue reported on code.google.com by
leixu...@gmail.com
on 21 Apr 2010 at 10:03