2 * TRX image file header format.
4 * Copyright (C) 2010, Broadcom Corporation. All Rights Reserved.
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 * $Id: trxhdr.h,v 13.16.10.1 2010-09-07 19:23:08 Exp $
26 #define TRX_MAGIC 0x30524448 /* "HDR0" */
27 #define TRX_VERSION 1 /* Version 1 */
28 #define TRX_MAX_LEN 0x7A0000 /* Max length */
29 #define TRX_NO_HEADER 1 /* Do not write TRX header */
30 #define TRX_GZ_FILES 0x2 /* Contains up to TRX_MAX_OFFSET individual gzip files */
31 #define TRX_OVERLAYS 0x4 /* Contains an overlay header after the trx header */
32 #define TRX_MAX_OFFSET 3 /* Max number of individual files */
33 #define TRX_UNCOMP_IMAGE 0x20 /* Trx contains uncompressed rtecdc.bin image */
35 #define TRX_MAGIC_F7D3301 0x20100322 /* Belkin Share Max */
36 #define TRX_MAGIC_F7D3302 0x20090928 /* Belkin Share */
37 #define TRX_MAGIC_F7D4302 0x20091006 /* Belkin Play */
38 #define TRX_MAGIC_F5D8235V3 0x00017116 /* Belkin F5D8235V3 */
39 #define TRX_MAGIC_QA 0x12345678 /* QA firmware */
42 uint32 magic
; /* "HDR0" */
43 uint32 len
; /* Length of file including header */
44 uint32 crc32
; /* 32-bit CRC from flag_version to end of file */
45 uint32 flag_version
; /* 0:15 flags, 16:31 version */
46 uint32 offsets
[TRX_MAX_OFFSET
]; /* Offsets of partitions from start of header */
50 typedef struct trx_header TRXHDR
, *PTRXHDR
;
52 #endif /* _TRX_HDR_H */