Accton bix multiple image format

I just realized the design of and the reason for the accton multiple image format. The .BIX format for older switches only has a 32-byte header in front of the gzipped runtime:

PC:/tmp$ xxd ES3528M-SFP-38_V1.3.3.3.bix | head -5
0000000: 1a2b 3c4d ae70 77a2 0103 0303 0041 d3ec  .+<M.pw......A..
0000010: 0905 0001 018a 0312 0012 382b bd84 a038  ..........8+...8
0000020: 1f8b 0808 d6e7 a24b 0000 7261 6d2e 6269  .......K..ram.bi
0000030: 6e00 ec3c 6d6c 5cd5 95f7 cd8c ed37 1f24  n..<ml\......7.$
0000040: 0f98 b263 33c1 2fca 908e 6363 0ceb d219  ...c3./...cc....
PC:/tmp$

The .BIX format for older switches appears to have a 48-byte header in front of the 32-byte header:

PC:/tmp$ xxd s3h03_00s56p07.bin | head -8
0000000: 9a8b 7c6d 0002 0030 0132 1b55 000e 381b  ..|m...0.2.U..8.
0000010: 9896 3560 0300 0a07 0300 0a07 0037 49f0  ..5`.........7I.
0000020: 0300 0b07 0014 2884 0000 0000 0000 0000  ......(.........
0000030: 1a2b 3c4d ea3e a727 0300 0a07 0037 49f0  .+<M.>.'.....7I.
0000040: 0070 0001 0186 0a0d 000e 3622 f2da e4b3  .p........6"....
0000050: 1f8b 0808 f20a 3045 0000 6861 6772 6964  ......0E..hagrid
0000060: 2e62 696e 00bc 3c7f 6c54 759e df37 9d96  .bin..<.lTu..7..
0000070: 99d2 98d1 1b75 8029 9d42 b9b4 dbd1 4c6f  .....u.).B....Lo
PC:/tmp$

But I was able to uncompress them without any problems, just a warning:

PC:/tmp$ dd if=s3h03_00s56p07.bin bs=80 skip=1 | gunzip > /dev/null
gzip: stdin: decompression OK, trailing garbage ignored
PC:/tmp$

But there was actually more. I noticed that the 3749f0 corresponds with the compressed size of the runtime. So if I skip this (3623408 + 80 of the header):

PC:/tmp$ dd if=s3h03_00s56p07.bin bs=3623488 skip=1 | xxd | head -5
0000000: 1a2b 3c4d 27ce 57cd 0300 0b07 0014 2884  .+<M'.W.......(.
0000010: 0070 0001 0386 0a0d 000e 3729 3d09 7526  .p........7)=.u&
0000020: 1f8b 0808 400b 3045 0000 6f70 7469 6f6e  ....@.0E..option
0000030: 2e62 696e 00bc 3c6d 7053 5776 57b2 4c24  .bin..<mpSWvW.L$
0000040: 5ba4 a223 7644 2296 e7c4 b4f6 5a49 e5c4  [..#vD".....ZI..
PC:/tmp$

Ha! Another 32-byte header with gzipped blob.

This is because this device has room for a 10GE module which has its own 4MB Flash and MPC8241 running its own copy of VxWorks.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: