leoserra / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

CRC update failed #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1../extract-firmware.sh firmware.bin working_directory/
2../ipkg_install.sh some_package-1.2.5.ipk working_directory/   
3. cp new-telnetd working_dir_mini1/rootfs/usr/sbin/telnetd
3. ./build-firmware.sh -nopad

What is the expected output? 
Build successful

What do you see instead?
root@adrian-VirtualBox:~/firmware_mod_kit/firmware-mod-kit-read-only# 
./build-firmware.sh ./working_dir_mini1 -nopad
Firmware Mod Kit (build-ng) 0.82, (c)2011-2013 Craig Heffner, Jeremy Collake

Building new squashfs file system...
Creating big endian 3.0 filesystem on 
/home/adrian/firmware_mod_kit/firmware-mod-kit-read-only/working_dir_mini1/new-f
ilesystem.squashfs, block size 131072.

Big endian filesystem, data block size 131072, compressed data, compressed 
metadata, compressed fragments
Filesystem size 6534.22 Kbytes (6.38 Mbytes)
32.25% of uncompressed filesystem size (20261.86 Kbytes)
Inode table size 7484 bytes (7.31 Kbytes)
24.20% of uncompressed inode table size (30926 bytes)
Directory table size 8819 bytes (8.61 Kbytes)
55.94% of uncompressed directory table size (15765 bytes)
Number of duplicate files found 18
Number of inodes 988
Number of files 670
Number of fragments 57
Number of symbolic links 218
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 100
Number of uids 1
root (0)
Number of gids 0
Padding of firmware image disabled via -nopad
Processing 1 header(s) from 
/home/adrian/firmware_mod_kit/firmware-mod-kit-read-only/working_dir_mini1/new-f
irmware.bin...
Processing header at offset 0...checksum update(s) failed!
CRC update failed.
Firmware header not supported; firmware checksums may be incorrect. New 
firmware image has been saved to: 
/home/adrian/firmware_mod_kit/firmware-mod-kit-read-only/working_dir_mini1/new-f
irmware.bin
root@adrian-VirtualBox:~/firmware_mod_kit/firmware-mod-kit-read-only#

What version of the product are you using? On what operating system?
Firmware Mod Kit v0.99 on ubuntu 12

Please provide any additional information below.
This is the first time I have used your mod-kit so I am not sure if I am doing 
something wrong or not.
The firmware I used was ddwrt 21676 on TP Link WDR3600 router
link to firmware 
ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2013/05-27-2013-r21676/tp
link_tl-wdr3600v1/tl-wdr3600-webflash.bin

The output bin is smaller as I expected because I removed four packages.

Thank you for your help
spanman

Original issue reported on code.google.com by adriansp...@gmail.com on 17 Jul 2013 at 3:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ignore last comment, though DO update to the latest FMK.

I was able to reproduce the checksum error.

The -nopad is causing that.

Remove -nopad and it should work fine (no guarantees). Be sure you know how to 
recover from a potential brick. TP-Links are a pain to recover, often requiring 
serial port headers be added.

Original comment by jeremy.collake@gmail.com on 17 Jul 2013 at 4:13

GoogleCodeExporter commented 8 years ago
Isn't v0.99 the latest? 
https://code.google.com/p/firmware-mod-kit/downloads/detail?name=fmk_099.tar.gz&
can=2&q=

I tried with this and with using checkout.
Ok I will try again with  v0.99

Original comment by adriansp...@gmail.com on 17 Jul 2013 at 4:15

GoogleCodeExporter commented 8 years ago
Ok Well the purpose of using the kit was to make the firmware smaller so I can 
enable jffs

Original comment by adriansp...@gmail.com on 17 Jul 2013 at 4:17

GoogleCodeExporter commented 8 years ago
-nopad isn't going to help anything with regards to the actual firmware size. 
Padding just makes the file a bit bigger, but the actual firmware.

For the version, I was going by the text in your outpu "Firmware Mod Kit 
(build-ng) 0.82"

To make an image smaller:

1. Use the -min switch to cause use of 1MB blocks. That router should have 
enough resources to handle block sizes that large. This will improve the 
compression ratio.
2. Continue removing packages, as you suggested.

The beauty of OTHER aftermarket firmwares (e.g. Gargoyle is a good consumer 
firmware for TP-Links!) is that they use an overlaid JFFS2 partition so that 
the entire file system is writable. So it's JFFS2 on top of Squashfs-lzma, with 
the squashfs-lzma holding all the static files, so that they can be compressed 
tight.

I'd definitely try Gargoyle (based on OpenWrt), or OpenWrt, unless you need 
DD-WRT. OpenWrt based firmwares run great on the 3600/4300

Original comment by jeremy.collake@gmail.com on 17 Jul 2013 at 4:21

GoogleCodeExporter commented 8 years ago
Ok thank you for your suggestions, I will have a look

Original comment by adriansp...@gmail.com on 17 Jul 2013 at 4:22

GoogleCodeExporter commented 8 years ago
Good luck! What you'll find most advantageous is the package system. Gargoyle 
references the Openwrt repositories. They come with the basics, and if you want 
additional functionality, then you install those packages to the writable root 
filesystem. Much easier than DD-WRT, where they try to cram everything people 
might need into one static image.

For instance, after you flash and ssh into the router:
opkg update
opkg install nano
opkg install htop

To get you nano and htop :)

Original comment by jeremy.collake@gmail.com on 17 Jul 2013 at 4:27

GoogleCodeExporter commented 8 years ago

Original comment by jeremy.collake@gmail.com on 18 Jul 2013 at 4:19