Git Product home page Git Product logo

firmware-mod-kit's People

Contributors

devttys0 avatar jeremycollake avatar

firmware-mod-kit's Issues

Cannot Extract DD-WRT Images

What steps will reproduce the problem?
1. Install mod packages per the instructions on the web page.
2. Enter the following command at the command prompt: ./extract_firmware.sh 
dd-wrt.v24-15508_NEWD_micro-plus_ssh.bin ./15508_micro/


What is the expected output? What do you see instead?

I get the following output: 
Firmware Mod Kit (extract) v0.63 beta, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of ./15508_micro/ ...
 WARNING: You must be 'root' when extracting and building some images.
          This is because some images need to create devices in your fs.
          For DD-WRT, do NOT extract or build as root, use standard user.
 Building tools ...
 Build seems successful.
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
! untrx failed, trying splitter3
 ERROR: Could not split firmware into component parts (unrecognized)

From the extract.log file:
 untrx 0.54 beta - (c)2006-2010 Jeremy Collake
 Opening dd-wrt.v24-15508_NEWD_micro-plus_ssh.bin
 read 1892352 bytes
  Writing ./15508_micro//image_parts/segment1
    size 2472 from offset 28 ...
  Writing ./15508_micro//image_parts/segment2
    size 675388 from offset 2500 ...
 SQUASHFS magic: 0x74717368
 SQUASHFS version: 3.0
  SQUASHFS v3.0 image detected
  Writing ./15508_micro//image_parts/squashfs_magic
  Writing ./15508_micro//image_parts/squashfs-lzma-image-3_0
    size 1214464 from offset 677888 ...
  Done!
 splitter3 0.10 beta - (c)2010 Jeremy Collake
 Opening dd-wrt.v24-15508_NEWD_micro-plus_ssh.bin
 read 1892352 bytes
 SQUASHFS magic: 0x74717368
 SQUASHFS version: 3.0
 Found segment type 0x4 Kernel length is a5800
 File system length is 128800
 Trailer is 0 bytes
  Writing ./15508_micro//image_parts/vmlinuz
    size 677888 from offset 0 ...
 SQUASHFS magic: 0x74717368
 SQUASHFS version: 3.0
  SQUASHFS v3.0 image detected
  Writing ./15508_micro//image_parts/squashfs_magic
  Writing ./15508_micro//image_parts/squashfs-lzma-image-3_0
    size 1214464 from offset 677888 ...
  Writing ./15508_micro//image_parts/hwid.txt
    size 0 from offset 1892352 ...
 ERROR could not write ./15508_micro//image_parts/hwid.txt


What version of the product are you using? On what operating system?

Latest version downloaded from here, 0.63
Ubuntu 10.04 x64

Thanks very much for your help!


Original issue reported on code.google.com by [email protected] on 11 Nov 2010 at 6:28

Credit added to new contributor

Credit needs to be added for heffnercj .. Please add your name as prominently 
as mine, e.g. "Jeremy Collake, Name Here" at your leisure. Attribute yourself 
by real name or alias, up to you. I wanted to create this so you know you have 
explicit permission to do this.

Original issue reported on code.google.com by [email protected] on 28 Aug 2011 at 1:41

Extracting DD-WRT FON images fails...

What steps will reproduce the problem?
1. Trying to extract the content of DD-WRT FON firmware
2. Trying to extract the content of DD-WRT Ubiquiti firmware
3. Trying to extract the content of original Ubiquiti firmware

What is the expected output? What do you see instead?

All end up with errors very similar to this (except for the file and folder
names of course)

 Extracting NS2.ar2316.v3.2.3734.080909.1631.bin to NS2 ...
 Error: filesystem not extracted properly.
  firmware image format not compatible?

What version of the product are you using? On what operating system?
v0.6
CentOS release 5, X86_64

Please provide any additional information below.

The same kit works perfectly on DD-WRT linksys images

What am I missing? any tweaks should I be aware of?
Kindly advice

Original issue reported on code.google.com by [email protected] on 22 Oct 2008 at 11:32

extract_firmware DIR-600 error



Hi, 

When I run 

sudo ./extract_firmware.sh dir600b-revb-ddwrt-webflash.bin ./work/ 

have error: 
=========== 
Firmware Mod Kit (extract) v0.62 beta, (c)2008 Jeremy Collake 
http://www.bitsum.com 
Checking for updates ... 
! WARNING: Could not check for update. No connectivity or server down? 
LINUX system detected. Compatibility ok. 
Testing file system of ./work/ ... 
Building tools ... 
Build seems successful. 
Preparing working directory ... 
Removing any previous files ... 
Creating directories ... 
Extracting firmware 
Attempting raw linux style firmware package (i.e. TEW-632BRP) ... 
Extracting dir600b-revb-ddwrt-webflash.bin to ./work/ ... 
Can't find a SQUASHFS superblock on ./work//image_parts/squashfs-3-lzma.img 
Error: filesystem not extracted properly. 
firmware image format not compatible?

Original issue reported on code.google.com by [email protected] on 21 Apr 2010 at 10:03

Advanced Problem, Request Immediate Help! willing to donate.

What steps will reproduce the problem?
1. Would like that it be abble to "open" realtek 8186 firmware files
2. willing to donate to help your project
3. donation could be in the 4 digits ammount.

What is the expected output? What do you see instead?

Will provide all the help and previous knowdlegd on this firmware.

What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Jan 2010 at 4:01

DIR-615 firmware failed to extract

What steps will reproduce the problem?
# ./extract_firmware.sh dd-wrt-dlink-dir615d-factory-webflash.bin dlink-dir615/

What is the expected output? What do you see instead?

 Firmware Mod Kit (extract) v0.64 beta, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
  !!! There is a newer version available: 0.63
     You are currently using 0.64
 LINUX system detected. Compatibility ok.
 Testing file system of dlink-dir615/ ...
 Building tools ...
 Build seems successful.
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
! untrx failed, trying splitter3
 Attempting squashfs 3.0 lzma ...
 Trying 'damn small' variant - used by DD-WRT v24 ...
 Firmware appears extracted correctly!
 Now make changes and run build_firmware.sh.



What version of the product are you using? On what operating system?
Ubuntu 8.04 Server


Please provide any additional information below.

# cat extract.log 
make: Entering directory `/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src'
make -C ./uncramfs/
make[1]: Entering directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/uncramfs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/uncramfs'
make -C ./cramfs-2.x/
make[1]: Entering directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/cramfs-2.x'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/cramfs-2.x'
make -C ./squashfs-2.1-r2/
make[1]: Entering directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/squashfs-2.1-r2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/squashfs-2.1-r2'
make -C ./squashfs-3.0/
make[1]: Entering directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/squashfs-3.0'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/squashfs-3.0'
make -C ./squashfs-3.0-lzma-damn-small-variant/
make[1]: Entering directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/squashfs-3.0-lzma-damn-small-v
ariant'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/squashfs-3.0-lzma-damn-small-v
ariant'
make -C ./wrt_vx_imgtool/
make[1]: Entering directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/wrt_vx_imgtool'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src/wrt_vx_imgtool'
make: Leaving directory `/home/wifi/fw-mod-kit/dlink-fw-mod-kit/trunk/src'
 untrx 0.54 beta - (c)2006-2010 Jeremy Collake
 Opening dd-wrt-dlink-dir615d-factory-webflash.bin
 read 3536811 bytes
 ERROR trx header not found
 splitter3 0.10 beta - (c)2010 Jeremy Collake
 Opening dd-wrt-dlink-dir615d-factory-webflash.bin
 read 3536811 bytes
 SQUASHFS magic: 0x74717368
 SQUASHFS version: 3.0
 Found segment type 0x4 Kernel length is c0060
 File system length is 29efa0
 Trailer is 7ab bytes
  Writing dlink-dir615//image_parts/vmlinuz
    size 786528 from offset 0 ...
 SQUASHFS magic: 0x74717368
 SQUASHFS version: 3.0
  SQUASHFS v3.0 image detected
  Writing dlink-dir615//image_parts/squashfs_magic
  Writing dlink-dir615//image_parts/squashfs-lzma-image-3_0
    size 2748320 from offset 786528 ...
  Writing dlink-dir615//image_parts/hwid.txt
    size 1963 from offset 3534848 ...
  Done!

created 0 files
created 1 directories
created 0 symlinks
created 0 devices
created 0 fifos


Original issue reported on code.google.com by [email protected] on 6 Dec 2010 at 2:55

Using same version file for everything.

Because it was started in other files, I'm changing the scripts to use the 
common include script which sets the version from a central file so everyone 
agrees on each other.

Original issue reported on code.google.com by [email protected] on 25 Feb 2011 at 3:59

Unable to extract cramfs.img with cramfsck or uncramfs.

When I try to extract the cramfs image  I got following error:
"
./cramfsck  -v -x /root/tmp /root/IMAGGINI_CRAMFS/cramfs.2.img 
./cramfsck: unsupported filesystem features
"

The cramfs image is based on a openrg firmware of  BCM96358 broadcom plaform.

file cmd output:

file cramfs.2.img

cramfs.2.img: Linux Compressed ROM File System data, little endian size
1376256 version #2 sorted_dirs CRC 0xe514a6b4, edition 0, 85 blocks, 30 files.


The uncramfs command gives "uncompress error":

./uncramfs  /root/tmp /root/IMAGGINI_CRAMFS/cramfs.2.img 
[Volume size: 0x150000]
[Volume serial: b4a614e500000000550000001e000000]
[Volume name: Compressed]

/root/tmp: File exists
drwxr-xr-x 1020/120           16(16)      /

/:
drwxr-xr-x 1020/120           20(20)      lib

/lib:
drwxr-xr-x 1020/120          732(732)     modules

/lib/modules:
Uncompression failed-rw-r--r-- 1020/120         9160(2344116) bcm53xx_mod.o
Uncompression failed-rw-r--r-- 1020/120       628452(21000700
bcm963xx_adsl_mod.o
Uncompression failed-rw-r--r-- 1020/120        22124(-1519611
bcm963xx_atm_mod.o
Uncompression failed-rw-r--r-- 1020/120        99508(-1958960
bcm963xx_atmapi_mod.o
Uncompression failed-rw-r--r-- 1020/120        22752(-1519649
bcm963xx_br2684_mod.o
Uncompression failed-rw-r--r-- 1020/120        41944(19738572
bcm963xx_eth_mod.o
Uncompression failed-rw-r--r-- 1020/120        21560(-1519671
bcm963xx_jdsp_mod.o
Uncompression failed-rw-r--r-- 1020/120         3360(1384)    bcm_vdsl_mod.o
Uncompression failed-rw-r--r-- 1020/120         8036(53656177 be_pppoa_mod.o
Uncompression failed-rw-r--r-- 1020/120         7196(53655890 btn.o
Uncompression failed-rw-r--r-- 1020/120       734660(-1976173 dspdd_mod.o
Uncompression failed-rw-r--r-- 1020/120       851900(-1578481 endpointdd_mod.o
Uncompression failed-rw-r--r-- 1020/120        37892(99333825 igmp_proxy_mod.o
Uncompression failed-rw-r--r-- 1020/120         3928(1422)    jtimer.o
Uncompression failed-rw-r--r-- 1020/120         5580(53614190 log_chardev.o
Uncompression failed-rw-r--r-- 1020/120       499380(62128140 one_module.o
Uncompression failed-rw-r--r-- 1020/120        12548(-1859023 phone_mod.o
Uncompression failed-rw-r--r-- 1020/120        18788(13965768 pppoe_relay.o
Uncompression failed-rw-r--r-- 1020/120         2808(1034)    qos_ingress.o
Uncompression failed-rw-r--r-- 1020/120        10668(1838416)
rg_auth1x_pktfil.o
Uncompression failed-rw-r--r-- 1020/120         8516(1283848) rg_dhcp_pktfil.o
Uncompression failed-rw-r--r-- 1020/120         2656(936)     rg_ipv4.o
Uncompression failed-rw-r--r-- 1020/120         5520(53597077 rg_pppoe_relay.o
Uncompression failed-rw-r--r-- 1020/120        19980(13964082 rtp.o
Uncompression failed-rw-r--r-- 1020/120         4232(53596146 tcp_mss.o
Uncompression failed-rw-r--r-- 1020/120         3820(1428)    vnet_mod.o
Uncompression failed-rw-r--r-- 1020/120      1233220(16881115 wl.o

[Summary:]
[Total uncompressed size:      4320956]
[Total compressed size:      1186721213]
[Number of entries:                 30]
[Number of files compressed:        15]
[Number of files expanded:          15]





Original issue reported on code.google.com by [email protected] on 19 Aug 2008 at 3:29

Attachments:

Unable to extract WL530gV2 firmware

Hi,

apparently the extractor doesn't work with WL530gV2 firmware from

http://dlcdnet.asus.com/pub/ASUS/wireless/WL-530gV2/FW_WL_530gV2_1956EN.zip

The result is a rootfs with many broken symlinks and untrx creates a
segment1 file that is not considered by extract_firmware.sh but seems to
contain parts of the FW.

Here is the untrx output:

me@marva:~/tmp/firmware-mod-kit/trunk$ src/untrx
~/Desktop/WL-530gV2_1.9.5.6_EN.bin ../
 untrx 0.54 beta - (c)2006 Jeremy Collake
 Opening /home/me/Desktop/WL-530gV2_1.9.5.6_EN.bin
 read 2957312 bytes
  Writing ../segment1
    size 655328 from offset 32 ...
  CRAMFS v? image detected
  Writing ../cramfs-image-x_x
    size 2301952 from offset 655360 ...
  Done!

Thanks.

Original issue reported on code.google.com by [email protected] on 29 Nov 2008 at 11:18

Extract Firmware - WebGui Edit

What steps will reproduce the problem?
1. Cant find to edit the GUI pages or it is not extracted


What is the expected output? What do you see instead?
Everything runs fine

What version of the product are you using? On what operating system?
Ubuntu 

Please provide any additional information below.

Everything is extracted/build correctly, I dont know were to go now after
extrating the firmware (never extrated ddwrt before), my guess is that 1mb
file on
/root/ddwrt/firmware-mod-kit-read-only/trunk/firm/image_parts/squashfs-lzma-imag
e-3_0
is an lzma file, do I add the extension .lzm and attempt to extract it ?

Original issue reported on code.google.com by [email protected] on 5 Dec 2009 at 5:57

Can't extract dd-wrt firmware for tp-link tl-1043nd

What steps will reproduce the problem?
1. download firmware 
ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2011/06-14-11-r17201/tpli
nk_tl-wr1043nd/tl-wr1043nd-webflash.bin
2. ./extract_firmware.sh

What is the expected output? What do you see instead?
Attempting raw linux style firmware package (i.e. TEW-632BRP) ...
 Extracting /home/rion/Загрузки/tl-wr1043nd-webflash.bin to /home/rion/temp/firmware/ ...
 Error: filesystem not extracted properly.
  firmware image format not compatible?


What version of the product are you using? On what operating system?
firmware-mod-kit r186

Please provide any additional information below.
It looks like extracted squashfs-3-lzma.img is just piece of some data 
(probably cutted from invalid offset). I tried to search for magic bytes for 
lzma and squashfs in segment1 file but unsuccessfully.
After manual start of command which should extract rootfs i get

Can't find a SQUASHFS superblock on 
/home/rion/temp/firmware/image_parts/squashfs-3-lzma.img

Original issue reported on code.google.com by rion4ik on 23 Aug 2011 at 6:21

extract_firmware breaks on OS X Lion

What steps will reproduce the problem?

1. svn checkout http://firmware-mod-kit.googlecode.com/svn/trunk/ 
firmware-mod-kit-read-only
2. cd  firmware-mod-kit-read-only/trunk
3. ./extract_firmware.sh ~/Downloads/tomato.trx ~/custom-tomato

What is the expected output? 

    successfully extracted tomato.trx to ~/custom-tomato

What do you see instead?

    coolaj86@AJs-MacBook-Air:trunk $ cat extract.log 
    gcc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2   -c -o asustrx.o asustrx.c
    asustrx.c:74:24: error: ppc/endian.h: No such file or directory
    asustrx.c: In function ‘main’:
    asustrx.c:291: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘long unsigned int’
    asustrx.c:291: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘long unsigned int’
    make: *** [asustrx.o] Error 1
    coolaj86@AJs-MacBook-Air:trunk $ arch
    i386

What version of the product are you using?

    trunk

On what operating system?

    OS X Lion

Please provide any additional information below.

It's probably about time to drop OS X PPC support altogether isn't it?
Who's using a mac from before 2005 these days? I guess there are still a few, 
but it seems that most mac people upgrade every few years or run Linux.

Original issue reported on code.google.com by [email protected] on 26 Sep 2011 at 8:00

Failed to extract the dd-wrt v24 image built by build_firmware.sh

What steps will reproduce the problem?
1. ./extract_firmware.sh dd-wrt.v24-10431_VINT_std.bin work_ddwrt
2. ./build_firmware.sh outdir/ work_ddwrt/
3. ./extract_firmware.sh outdir/custom_image-generic.bin work_custom/

What is the expected output? What do you see instead?
I'd like to see all the 3 steps to succeed, but step 3 fails:
#./extract_firmware.sh outdir/custom_image-generic.bin work_custom/

 Firmware Mod Kit (extract) v0.62 beta, (c)2008 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of work_custom/ ...
 Building tools ...
 Build seems successful.
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
 Attempting squashfs 3.0 lzma ...
 Trying 'damn small' variant - used by DD-WRT v24 ...
./extract_firmware.sh: line 172:   993 Segmentation fault      
"src/squashfs-3.0-lzma-damn-small-variant/unsquashfs-lzma" -dest 
"$2/rootfs" "$2/image_parts/squashfs-lzma-image-3_0" 2> /dev/null >> 
extract.log
 Error: filesystem not extracted properly.
  firmware image format not compatible?

What version of the product are you using? On what operating system?
http://firmware-mod-kit.googlecode.com/svn/trunk/trunk@r153
OS: Ubuntu 8.04 LTS

Please provide any additional information below.
# ls -R work_custom/
work_custom/:
image_parts  installed_packages

work_custom/image_parts:
segment1  segment2  squashfs-lzma-image-3_0  squashfs_magic

work_custom/installed_packages:

#ls -R work_ddwrt
gives a lot of stuff which seems to be of no problem.

Original issue reported on code.google.com by [email protected] on 5 May 2009 at 9:52

Additional Device Support Request: CradlePoint CTR35

I recently acquired a cradle point CTR35 router. 

I was wondering if you had any recommendations on how to extract/modify the 
firmware image
http://cradlepoint.com/support/ctr35#

I would among other thing like to recompile the kernel and get USB mass storage 
support as well as SMB support. That being said, the device appears to not have 
a terminal by default and I am certainty not skilled enough to dissect the 
binary file myself.

There is some source available for the device, however it is clearly not all 
the code on the device as the uncompiled source is 1.5bm and the firmware image 
is 6+mb. Yes I know things grow when compiled, but there is no web server or 
python code there, so I am pretty sure the web interface (which allows for easy 
Wifi as Wan) in the code.

If you have recommendations please let me know.

Thanks

Ben

Product Info
Kernel based on NetBSD
CPU: Ralink SOC
Presume at least 8mb flash since the flash image > 6mb

Original issue reported on code.google.com by [email protected] on 21 Sep 2011 at 2:24

Unable to unsquashfs "failed to read data block"

What steps will reproduce the problem?

1. Download firmware for Huawei HG553 Vodafone modified 
http://atencionalcliente.vodafone.es/ayuda/descargas/descarga/particulares/es/AI
_VA_DD_HG553V100R001C03B038SP01.bin.html

2. Check with binwalk signatures and extract the squashfs file with "dd"

3. unsquashfs with version squashfs-2.1-r2 and the you get
.
.
.
write_file: failed to read data block 0x6b6c3c                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b70fe                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b715e                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b719c                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b71dc                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b8109                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b8167                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b81f4                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b8c75                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b8d0b                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b916b                                  


zlib::uncompress failed, unknown error -3                                       


write_file: failed to read data block 0x6b9456                                  


.
.
.
etc

What is the expected output? What do you see instead?

The filesystem is created but the files are empty.


What version of the product are you using? On what operating system?

I have tried with the automated scripts extract-ng.sh with the *.bin file or 
unsquashfs_all.sh *squashfs file, the don't give any error, the filesystem is 
created but is empty

Please provide any additional information below.

If you tried to unsquashfs with linux-distribution squashfs-tools the output is
.
.
.
gzip uncompress failed with error code -3                                       


Failed to write squashfs-root/etc/upnp/upnpdev.xml, skipping 
.
.
etc



I suppose its using an unknown compression, as this exceeds my knowledge I hope 
you guys can investigate and add the option to extract this kind of firmwares 
to your kit.

Best Regards


Original issue reported on code.google.com by [email protected] on 9 Sep 2011 at 2:23

DD-WRT development

Hello
I am new member in dd-wrt using and development family
I want to develop dd-wrt firmware and I shall work with IEEE 802.11n standard.
I read about firmware-mod-kit and followed the instructions to use it.
But I have a problem that the files are .o files not .c or .h so I can read, 
modify and develop the firmware. 
I use dd-wrt.v24-16785_NEWD-2_K2.6_std_usb_nas-e2k-e3k.bin
Can you help me ?
Thank you
Please i need the source code 


Original issue reported on code.google.com by [email protected] on 8 May 2011 at 7:07

./extract_firmware.sh: Syntaxerror on line 114

unexpected else 

empty section between then and else did not work for me. Adding echo (dummy) 
worked for me.


Original issue reported on code.google.com by fsbkiller on 13 Dec 2010 at 9:12

Small patch for two scripts.

One script 'check_for_upgrade' has an error performing a test between two 
strings (each of which has a space in it). This puts quotes around the strings 
and puts a note in the top of the script explaining this.

Second script, 'build_firmware', has two small "issues" (not even bugs). This 
is the note I put in the patch:
+# 20110224-1507-MCT - Two simple mods.
+# + Put the name of the build into an external file so that
+#   it's easier to customize.
+# + Modified a var to correct the spelling. :)
+#   Changed FIRMARE_BASE_NAME to FIRMWARE_BASE_NAME

Original issue reported on code.google.com by [email protected] on 24 Feb 2011 at 11:14

Attachments:

Error extracting dd-wrt v24 sp1 firmware

What steps will reproduce the problem?

I have tried to extract a dd-wrt v24 firmware with this command

/extract_firmware.sh ~/Desktop/dd-wrt.v24_mini_generic.bin 
~/Desktop/dd-wrt.v24_mini_generic

What is the expected output? What do you see instead?

I see a zlib unknown error:

./extract_firmware.sh v0.51 beta, (c)2006-2008 Jeremy Collake
 Checking for updates ...
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of /home/jesus/Desktop/dd-wrt.v24_mini_generic ...
 Building tools ...
 Build seems successful.
 Preparing working directory ...
  Removing any previous files ...
  Creating directories ...
 Extracting firmware ...
zlib::uncompress failed, unknown error -3
zlib::uncompress failed, unknown error -3
FATAL ERROR aborting: uncompress_inode_table: failed to read block
Bus error (core dumped)
 Error: filesystem not extracted properly.
   firmware image format not compatible?

What version of the product are you using? On what operating system?

I have tried with the lastest versión from 
http://www.bitsum.com/files/firmware_mod_tools.tar.gz

and with the svn trunk.


Original issue reported on code.google.com by [email protected] on 21 Aug 2008 at 10:24

Build identification.

At the start of the build process a file is created (or truncated) in the 
target system (as build-space/rootfs/etc/rebuild_info) with the contents 
showing the rebuild version identification and the tool version used to create 
it.

An example line would look like this:
Rebuilt: custom_image_00010 With: Firmware Mod Kit (build) v0.68 beta, (c)2010 
Jeremy Collake

Original issue reported on code.google.com by [email protected] on 26 Feb 2011 at 5:23

Unable to extract URoad-5000 bin image

URoad-5000 is Ralink SoC wireless AP with only one USB port. It is used to
connect to WiMax dongle and shares the WiMax internet with standard clients.
Interesting part is leaked Ralink SDK, which can be found here:
http://www.filefront.com/user/Borage
The bin image can be downloaded here:
http://www.shinseicorp.com/wimax/URoad-5000_v1450.bin
It seams it uses squashfs-lzma 3.2
Currently the extract process ends like this (from extract.log):
 untrx 0.54 beta - (c)2006 Jeremy Collake
 Opening /home/alex/Desktop/URoad-5000_v1450.bin
 read 3891216 bytes
 ERROR trx header not found

Original issue reported on code.google.com by alex%[email protected] on 14 May 2010 at 5:02

can't extract dd-wrt v24 preSP2 for buffalo whr-g300nv2

the extract_firmware.sh ended up with an error, and the untrx tool can only 
extract a file named segment1 from the firmware.

the firmware is got from 
http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/BrainSlayer-V24-preSP2/2011/
06-14-11-r17201/buffalo_whr_g300nv2/whr-g300nv2-firmware-MULTI.bin

the output of extract_firmware.sh:

 Firmware Mod Kit (extract) v0.68 beta, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of work ...
 WARNING: You must be 'root' when extracting and building some images.
          This is because some images need to create devices in your fs.
          For DD-WRT, do NOT extract or build as root, use standard user.
 Building tools ...
 Build seems successful.
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
 Attempting raw linux style firmware package (i.e. TEW-632BRP) ...
 Extracting ../whr-g300nv2-firmware-MULTI.bin to work ...
 Error: filesystem not extracted properly.
  firmware image format not compatible?

Original issue reported on code.google.com by [email protected] on 4 Sep 2011 at 5:43

The output firmware rebuilt by the firmware-mod-kit is different from the original firmware

What steps will reproduce the problem?
1. First, I used the firmware modification tool (version 0.63) to extract the 
binary of "dir600b-revb-ddwrt-webflash.bin" which was downloaded from the 
DD-WRT router database and could be correctly burn into the router model of 
D-Link DIR-600 B1/B2. The size of this binary "dir600b-revb-ddwrt-webflash.bin" 
is 3.49 MB (3,661,852 bytes)
2. Then I simply tried to use another command to rebuild the firmware of 
"dir600b-revb-ddwrt-webflash.bin" which had been extracted by the previous 
step, although the command was executed correctly and the output binary could 
be successfully generated, but the output firmware which name is 
"output-firmware.bin" was significantly different from the original firmware, 
the size of "output-firmware.bin" is 3.62 MB (3,805,240 bytes) and this output 
firmware can not be downloaded to the router of D-Link DIR-600.
3. I found that the size of "output-firmware.bin" is bigger than the original 
firmware of "dir600b-revb-ddwrt-webflash.bin", and the content of both binaries 
are totally different.

What is the expected output? What do you see instead?
[root@node 63]# ./extract_firmware.sh /v1/dir600b-revb-ddwrt-webflash.bin 
/v1/10 
 Firmware Mod Kit (extract) v0.63 beta, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
./check_for_upgrade.sh: line 19: [: too many arguments
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of /v1/10 ...
 Building tools ...
 Build seems successful.
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
! untrx failed, trying splitter3
 Attempting squashfs 3.0 lzma ...
 Trying 'damn small' variant - used by DD-WRT v24 ...
 Firmware appears extracted correctly!
 Now make changes and run build_firmware.sh.


 [root@node 63]# ./build_firmware.sh /v1/20 /v1/10
 Firmware Mod Kit (build) v0.63, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
./check_for_upgrade.sh: line 19: [: too many arguments
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of /v1/10 ...
 Building tools ...
 Build seems successful.
 Preparing output directory /v1/20 ...
 Detected linux raw type firmware.
 Building firmware from directory /v1/10 ...
 Building squashfs-lzma file system (big endian) ...
 !!! WARNING: This raw embedded linux image type is UNTESTED - added Nov 6 2010
 !!! DO NOT FLASH UNLESS YOU ARE PREPARED TO RECOVER FROM A BRICKED ROUTER
 !!! YOU HAVE BEEN WARNED AND ASSUME LIABILITY FOR DAMAGES IF YOU DO FLASH IT
 Building RAW IMAGE TYPE 3
 Firmware images built.
总计 3724
-rw-r--r-- 1 root root 3805240 02-28 16:08 output-firmware.bin
 All done!


What version of the product are you using? On what operating system?
The version of firmware downloaded from the router database is 
"dir600b-revb-ddwrt-webflash.bin"
The operating system is "Red Hat Enterprise Linux Server release 5.4 (Tikanga)"
"Linux node.com 2.6.18-164.e15"


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Mar 2011 at 9:41

Attachments:

Support for DIR-320/DIR-600 SquashFS

Some D-Link routers (at least the DIR-320 and DIR-600) use a modified LZMA 
library in their SquashFS images. These SquashFS images cause the unsquashfs 
tools seg fault:

$ ./firmware-mod-kit/trunk/src/squashfs-2.1-r2/unsquashfs-lzma dir320.squashfs 
Segmentation fault

The issue is that the ZLib.cpp code has been modified to put a "7zip" string 
marker at the beginning of each LZMA block, so the D-Link decompression routine 
looks for that string and skips over it:

//+++ add by siyou ---//
//+++ I add "7zip" id to make kernel can check if use 7zip to decompress. ---//
ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
                                   const Bytef *source, uLong sourceLen))
{

    if ( strncmp((char*)source,"7zip",4) == 0 )
    {
       source += 4;
       sourceLen -= 4;
    }
    orig_uncompress(dest,destLen,source,sourceLen);
    return Z_OK;
}

Adding this same logic to the uncompress function in the FMK's ZLib.cpp file 
results in a successful extraction of all the files in the SquashFS image:

$ ./firmware-mod-kit/trunk/src/squashfs-2.1-r2/unsquashfs-lzma dir320.squashfs 

created 825 files
created 56 directories
created 103 symlinks
created 0 devices
created 0 fifos

I've attached a patch file that adds support for these SquashFS images to FMK's 
uncompress function. The DIR-320 source code can be downloaded from: 
http://tsd.dlink.com.tw/temp/download/2991/DIR-320%20v1.00%20GPL.tar.

Original issue reported on code.google.com by [email protected] on 7 Aug 2011 at 5:05

Attachments:

TRX Header not found

What steps will reproduce the problem?
# sudo ./extract_firmware.sh ~/Downloads/router_firmware_fullImage.bin ~/kamil/

What is the expected output? What do you see instead?

Expected:

 Firmware Mod Kit (extract) v0.69 beta, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of /home/user/ ...
 Building tools ...
 Build seems successful.
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
! untrx failed, trying splitter3
 Not recognized by splitter3
 Attempting squashfs 3.0 lzma ...
 Firmware appears extracted correctly!



I'm getting:

Firmware Mod Kit (extract) v0.69 beta, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of /home/user/kamil/ ...
 Building tools ...
 Build seems successful.
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
! untrx failed, trying splitter3
 Attempting squashfs 3.0 lzma ...
 Trying 'damn small' variant - used by DD-WRT v24 ...
 Error: filesystem not extracted properly.
  firmware image format not compatible?


What version of the product are you using? On what operating system?
I'm using the latest version of the kit on ubuntu 11.04.

Please provide any additional information below.

# cat extract.log
............
 untrx 0.54 beta - (c)2006-2010 Jeremy Collake
 Opening /home/user/Downloads/router_firmware_fullImage.bin
 read 1972267 bytes
 ERROR trx header not found
 splitter3 0.10 beta - (c)2010 Jeremy Collake
 Opening /home/user/Downloads/router_firmware_fullImage.bin
 read 1972267 bytes
 SQUASHFS magic: 0x68737173
 SQUASHFS version: 512.0
 Found segment type 0x8 Kernel length is fecc
 File system length is 1d1134
 Trailer is 82b bytes
  Writing /home/labris/kamil//image_parts/vmlinuz
    size 65228 from offset 0 ...
 SQUASHFS magic: 0x68737173
 SQUASHFS version: 512.0
  ! WARNING: Unknown squashfs version.
  Writing /home/user/kamil//image_parts/squashfs-lzma-image-x_x
    size 1904948 from offset 65228 ...
  Writing /home/user/kamil//image_parts/hwid.txt
    size 2091 from offset 1970176 ...
  Done!

######################################

Can you please help me with this problem? 

Thanks in advance.

Original issue reported on code.google.com by [email protected] on 7 Sep 2011 at 8:39

extract_firmware broken on Ubuntu 11.04 32-bit (works on 64-bit)

What steps will reproduce the problem?
0. Use 32-bit Ubuntu 11.04 (64-bit does work)
1. sudo apt-get install -y build-essential
2. svn checkout http://firmware-mod-kit.googlecode.com/svn/trunk/ 
firmware-mod-kit-read-only
3. cd firmware-mod-kit-read-only/trunk
4. ./extract_firmware.sh ~/Download/tomato-mipsr2.trx ~/custom-tomato/

What is the expected output? What do you see instead?



 Firmware Mod Kit (extract) v0.71 beta, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of /home/coolaj86/custom-tomato/ ...
 Building tools ...
 ERROR - Build did not succeed. Check log file, you are probably
         missing one or more necessary pre-requisites. See docs for
         a list of pre-requsites.
 CONTINUING anyway, attempting to use pre-built binaries (x32 linux)
 Preparing working directory ...
 Removing any previous files ...
 Creating directories ...
 Extracting firmware
 Attempting squashfs 3.0 lzma ...
 Trying 'damn small' variant - used by DD-WRT v24 ...
 Error: filesystem not extracted properly.
  firmware image format not compatible?

coolaj86@macbuntuair:~/Code/firmware-mod-kit-read-only/trunk$ cat extract.log 
make: Entering directory 
`/home/coolaj86/Code/firmware-mod-kit-read-only/trunk/src'
(cd ./binwalk*/src && ./configure --disable-updates && make && cp binwalk 
../../)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... no
configure: WARNING: arpa/inet.h: accepted by the compiler, rejected by the 
preprocessor!
configure: WARNING: arpa/inet.h: proceeding with the compiler's result
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... no
configure: WARNING: fcntl.h: accepted by the compiler, rejected by the 
preprocessor!
configure: WARNING: fcntl.h: proceeding with the compiler's result
checking for fcntl.h... yes
checking stdlib.h usability... yes
checking stdlib.h presence... no
configure: WARNING: stdlib.h: accepted by the compiler, rejected by the 
preprocessor!
configure: WARNING: stdlib.h: proceeding with the compiler's result
checking for stdlib.h... yes
checking string.h usability... yes
checking string.h presence... no
configure: WARNING: string.h: accepted by the compiler, rejected by the 
preprocessor!
configure: WARNING: string.h: proceeding with the compiler's result
checking for string.h... yes
checking unistd.h usability... yes
checking unistd.h presence... no
configure: WARNING: unistd.h: accepted by the compiler, rejected by the 
preprocessor!
configure: WARNING: unistd.h: proceeding with the compiler's result
checking for unistd.h... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... no
checking for memset... no
configure: error: "Missing necessary function"
make: *** [binwalk] Error 1
make: Leaving directory 
`/home/coolaj86/Code/firmware-mod-kit-read-only/trunk/src'
 untrx 0.54 beta - (c)2006-2010 Jeremy Collake
 Opening ./tomato-K26USB-1.28.9054MIPSR2-beta-Ext.trx
 read 6602752 bytes
  Writing /home/coolaj86/custom-tomato//image_parts/segment1
    size 2672 from offset 28 ...
  Writing /home/coolaj86/custom-tomato//image_parts/segment2
    size 985460 from offset 2700 ...
 SQUASHFS magic: 0x73717368
 SQUASHFS version: 3.0
  SQUASHFS v3.0 image detected
  Writing /home/coolaj86/custom-tomato//image_parts/squashfs_magic
  Writing /home/coolaj86/custom-tomato//image_parts/squashfs-lzma-image-3_0
    size 5614592 from offset 988160 ...
  Done!



What version of the product are you using? On what operating system?

trunk

Ubuntu 11.04 32-bit

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 27 Sep 2011 at 12:07

squashfs (zlib) extension

Necessary to support firmwares that use a normal squashfs (zlib) based 
file system instead of squashfs-lzma.

Original issue reported on code.google.com by [email protected] on 16 Aug 2006 at 11:26

Corrupt DD-WRT v24 SP2+ WRT54G/S/L images (filesystem presumably corrupt)

What steps will reproduce the problem?
1. Extract DD-WRT v24 SP2
2. Rebuild
3. Flash

What is the expected output? What do you see instead?
Router should fully boot, instead it halts. Serial output not obtained.

Please use labels and text to provide additional information.
unreproduced in developer. Cause unknown. Specific model versions unknown.


Original issue reported on code.google.com by [email protected] on 29 Nov 2008 at 11:28

the output firmware rebuilt from the one after be extracted was incorrect.

What steps will reproduce the problem?
1. First I used the firmware modification tool (version 0.63) to extract the 
binary of "dlink-dir600b-factory-webflash.bin" which was downloaded from the 
DD-WRT router database and could be correctly burn into the router model of 
D-Link DIR-600 B1/B2. The size of this binary 
"dlink-dir600b-factory-webflash.bin" is 3.47 MB (3,647,334 bytes), the 
following information is the output of this command line execution.

[root@node 63]# ./extract_firmware.sh 
/v1/test1/dlink-dir600b-factory-webflash.bin /v1/10

Firmware Mod Kit (extract) v0.63 beta, (c)2010 Jeremy Collake
http://www.bitsum.com
Checking for updates ...
./check_for_upgrade.sh: line 19: [: too many arguments
You have the latest version of this kit.
LINUX system detected. Compatibility ok.
Testing file system of /v1/10 ...
Building tools ...
Build seems successful.
Preparing working directory ...
Removing any previous files ...
Creating directories ...
Extracting firmware
! untrx failed, trying splitter3
Attempting squashfs 3.0 lzma ...
Trying 'damn small' variant - used by DD-WRT v24 ...
Firmware appears extracted correctly!
Now make changes and run build_firmware.sh.

2. Then, I simply tried to use another command to rebuild the firmware of 
"dlink-dir600b-factory-webflash.bin" which had been extracted by the previous 
step, although the command was executed correctly and the output binary could 
be successfully generated, but the output firmware which name is 
"output-firmware.bin" was significantly different from the original firmware, 
the size of "output-firmware.bin" is 853.94 KB(874,438 bytes) and this output 
firmware can not be downloaded to the router of D-Link DIR-600. The following 
traces is the output information of this command execution.

[root@node 63]# ./build_firmware.sh /v1/20 /v1/10

 Firmware Mod Kit (build) v0.63, (c)2010 Jeremy Collake
 http://www.bitsum.com
 Checking for updates ...
./check_for_upgrade.sh: line 19: [: too many arguments
  You have the latest version of this kit.
 LINUX system detected. Compatibility ok.
 Testing file system of /v1/10 ...
 Building tools ...
 Build seems successful.
 Preparing output directory /v1/20 ...
 Detected linux raw type firmware.
 Building firmware from directory /v1/10 ...
 Building squashfs-lzma file system (big endian) ...
 !!! WARNING: This raw embedded linux image type is UNTESTED - added Nov 6 2010
 !!! DO NOT FLASH UNLESS YOU ARE PREPARED TO RECOVER FROM A BRICKED ROUTER
 !!! YOU HAVE BEEN WARNED AND ASSUME LIABILITY FOR DAMAGES IF YOU DO FLASH IT
 Building RAW IMAGE TYPE 3
 Firmware images built.
总计 860
-rw-r--r-- 1 root root 874438 03-02 15:47 output-firmware.bin
 All done!

3. I had checked the location of "working directory" where the intermediate 
files and the extracted file system will be stored, and I found that the folder 
of "rootfs" was empty so that the size of output firmware generated by the 
"build_firmware.sh" was too small (less than 1MB).


What is the expected output? What do you see instead?
The expected output of "output-firmware.bin" should be the firmware which is 
identical to the original firmware of "dlink-dir600b-factory-webflash.bin". 
Unfortunately, the actual result I'd seen was wrong!


What version of the product are you using? On what operating system?
The version of the product is "dlink-dir600b-factory-webflash.bin".
The operating system is "Red Hat Enterprise Linux Server release 5.4 
(Tikanga)", "Linux node.com 2.6.18-164.e15"


Please provide any additional information below.
So far, I've put a lot of time and efforts on this issue, now I really need 
your kindly helps, suggestion or solution for resolving this problem. I very 
appreciate if you would like to look into this issue and give some good ideas 
to me. Thank you very much!

Original issue reported on code.google.com by [email protected] on 2 Mar 2011 at 10:36

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.