summaryrefslogtreecommitdiffstats
path: root/doc/fiasco
blob: bf19f2fc9d6cdddd2af6967192888dfdbb877ca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
   4 bytes          --  firmware name length (big endian)
   6 bytes          --  versioning info ( byte 4 is format version )
   N-6 bytes        --  firmware name (zero fill)


PIECE HEADER

   1 byte = 0x54    --  piece signature
   1 byte           --  unknown:
                          N800/N810:
                            0x02 - initfs, rootfs, kernel (2007)
                            0x03 - xloader, 2nd, secondary, kernel (DIABLO)
                          N900:
                            0x03 - kernel, rootfs, cmt-2nd, cmt-algo, cmt-mcusw
                            0x04 - xloader, 2nd, secondary
                            0x05 - mmc
   5 bytes          --  unknown (always 0x2e 0x19 0x01 0x01 0x00)
   2 bytes          --  checksum for the piece contents (xorpair)
  12 bytes          --  piece name (first byte is FF if is the last)
   4 bytes          --  piece size (big endian)
   4 bytes          --  unknown (always 0x00 0x00 0x00 0x00)
             block {
   1 byte           --  if (value '1'-'4' or '/') { ..there's a comment.. }
                          '1' - version
                          '2' - device & hw revisions
                          '3' - layout
                          '4' - unknown
                          '/' - unknown
   1 byte           --  length of comment
   N bytes          --  comment
             }
   N bytes          -- piece data