Or Continue to Thread: Matsunichi/Innocomm 'Griffin' …
Find Your Device:
23rd January 2012, 02:53 AM   |  #80  
OP Junior Member
Thanks Meter: 35
 
20 posts
Join Date:Joined: Oct 2010
The Innocomm 'packer' (and the latest version of the 'unpacker') are finally done and you can find the source code attached to this post.
You can compile them as follows:

gcc -O -Wall -o packer packer.c -lz -lcrypto
gcc -O -Wall -o unpacker unpacker.c -lz -lcrypto

Some notes on how to use them:

- First the 'unpacker'

unpacker [-v] [-c] <firmware file>

where the new command line options are as follows:

-v verbose; prints a bunch of debugging information to stderr
-c print configuration; prints the configuration file for the 'packer' to stdout

so a possible use of the 'unpacker' would be:

unpacker -c griffin.ifw > griffin.conf

The configuration file is a simple text file and, if you want to start 'packing' your own firmware for the TC970/griffin, you may want to take a look at it (and possibly edit it to your liking before 'packing')


- The 'packer' does pretty much the reverse of the 'unpacker'; you just run it in a directory with all the images you want to pack and the configuration file (either the 'griffin.conf' from the previous step or an edited version of it to suit your needs).
The packer can be run from the command line as follows:

packer mygriffin.ifw < griffin.conf

(of course you have to rename 'mygriffin.ifw' to 'griffin.ifw' before you copy it to the SD card).


Please note that the only missing part from the unpacker/packer is the whole file checksum; I haven't figure out (yet) how to compute it, but chinabull found out the Innocomm xloader (MLO) and u-boot don't check it (while 'idownload' probably does), so firmwares created with the 'packer' should be loaded without any problem by the TC970/griffin.

I think that's it.

Let me know if you have any problems or questions.

Franco
Attached Files
File Type: tar unpacker.tar - [Click for QR Code] (30.0 KB, 30 views)
File Type: tar packer.tar - [Click for QR Code] (20.0 KB, 20 views)
The Following 7 Users Say Thank You to fv+ For This Useful Post: [ View ]