2012-06-23 17:03:25 +02:00
|
|
|
Copyright (C) 2007-2011 pancake <pancake@youterm.com>
|
|
|
|
|
Copyright (C) 2011-2012 Pali Rohár <pali.rohar@gmail.com>
|
|
|
|
|
|
2007-10-20 02:32:24 +02:00
|
|
|
SPECS FOR TEH FIASCO FIRMWARE FILE FORMAT ffff!
|
|
|
|
|
-----------------------------------------------
|
|
|
|
|
|
|
|
|
|
These notes has not been taken properly and may be wrong. It must
|
|
|
|
|
be revised to fit the reality. But this is mostly a general idea:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FILE HEADER
|
|
|
|
|
|
|
|
|
|
1 byte = 0xb4 -- signature
|
2012-06-23 17:03:25 +02:00
|
|
|
4 bytes -- FW header length (big endian)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FW HEADER
|
|
|
|
|
|
2012-07-14 09:22:47 +02:00
|
|
|
4 bytes -- number of FW header blocks (big endian)
|
2012-06-23 17:03:25 +02:00
|
|
|
block {
|
|
|
|
|
1 byte -- type of block
|
2012-07-14 09:22:47 +02:00
|
|
|
0xE8 - Fiasco name
|
2012-06-23 17:03:25 +02:00
|
|
|
0x31 - FW name
|
2012-07-14 09:22:47 +02:00
|
|
|
1 byte -- length of block data
|
2012-06-23 17:03:25 +02:00
|
|
|
N bytes -- block data
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IMAGE
|
|
|
|
|
|
|
|
|
|
1 byte = 0x54 -- signature
|
2012-07-14 09:22:47 +02:00
|
|
|
1 byte -- number of subsection blocks + 1
|
2012-06-23 10:43:20 +02:00
|
|
|
5 bytes -- unknown (always 0x2e 0x19 0x01 0x01 0x00)
|
2012-07-14 09:22:47 +02:00
|
|
|
2 bytes -- checksum for the image contents (xorpair) (big endian)
|
|
|
|
|
12 bytes -- image name type (first byte is FF if is the last image)
|
|
|
|
|
4 bytes -- length of image data (big endian)
|
2012-06-23 10:43:20 +02:00
|
|
|
4 bytes -- unknown (always 0x00 0x00 0x00 0x00)
|
2007-10-20 02:32:24 +02:00
|
|
|
block {
|
2012-07-14 09:22:47 +02:00
|
|
|
1 byte -- type of subsection block
|
2012-06-23 10:43:20 +02:00
|
|
|
'1' - version
|
2012-07-14 09:22:47 +02:00
|
|
|
'2' - device & hw revisions (separated by char 0x00, max size of device is 16, hw revision 8)
|
2012-06-23 10:43:20 +02:00
|
|
|
'3' - layout
|
|
|
|
|
'4' - unknown
|
|
|
|
|
'/' - unknown
|
2012-07-14 09:22:47 +02:00
|
|
|
1 byte -- length of subsection block
|
|
|
|
|
N bytes -- subsection block data
|
2007-10-20 02:32:24 +02:00
|
|
|
}
|
2012-06-23 17:03:25 +02:00
|
|
|
1 byte -- unknown (maybe end of subsections?)
|
|
|
|
|
N bytes -- image data
|