Remove SNTP from ap121, that will allow to build images with silent console
[oweals/u-boot_mod.git] / u-boot / include / tpLinuxTag.h
1
2 /**************************************************************************************
3 * File Name  : tpLinuxTag.h
4 *
5 * Description: add tag with validation system to the firmware image file to be uploaded
6 *              via http
7 *
8 * Created    : 16Sep07, Liang Qiming
9 **************************************************************************************/
10
11 #ifndef _TP_LINUX_TAG_H_
12 #define _TP_LINUX_TAG_H_
13
14 /*
15  * File tag (head) structure all is in clear text
16  * except validationTokens (crc, md5, sha1, etc).
17  *
18  * Total: 128 unsigned chars
19  */
20 #define TAG_LEN                 512
21 #define SIG_LEN                 24
22 #define SIG_LEN_2               12 // Original second SIG = 20 is now devided into 14 for SIG_LEN_2 and 6 for CHIP_ID
23 #define CHIP_ID_LEN             8
24 #define TOKEN_LEN               20
25 #define BOARD_ID_LEN    16
26
27 /*
28  * TAG for downloadable image (kernel plus file system)
29  * integer in the structure is stored in Network-Byte order (BIG-endian)
30  */
31 typedef struct _tplink_image_header_t {
32         unsigned long   tagVersion;
33     char                        signiture_1[SIG_LEN];                           // text line for company info
34         char                    signiture_2[SIG_LEN_2];                         // additional info (can be version number)
35     char                        chipId[CHIP_ID_LEN];                            // chip id
36     char                        boardId[BOARD_ID_LEN];                          // board id
37     unsigned long       productId;                                                      // product id
38     unsigned long       productVer;                                                     // product version
39     unsigned long       reserved1;                                                      // reserved for future
40
41     unsigned char       imageValidationToken[TOKEN_LEN];        // image validation token - md5 checksum
42     unsigned char       kernelValidationToken[TOKEN_LEN];       // kernel+tag validation token - md5 checksum
43
44         unsigned long   kernelTextAddr;                                         // text section address of kernel
45         unsigned long   kernelEntryPoint;                                       // entry point address of kernel
46         
47         unsigned long   totalImageLen;                                          // the sum of kernelLen+rootfsLen+tagLen
48
49         unsigned long   kernelAddress;                                          // starting address (offset from the beginning of FILE_TAG) of kernel image
50         unsigned long   kernelLen;                                                      // length of kernel image
51
52         unsigned long   rootfsAddress;                                          // starting address (offset) of filesystem image
53         unsigned long   rootfsLen;                                                      // length of filesystem image
54
55         unsigned long   bootloaderAddress;                                      // starting address (offset) of boot loader image
56         unsigned long   bootloaderLen;                                          // length of boot loader image
57         
58 } tplink_image_header_t;
59
60 #endif /* ifndef _TP_LINUX_TAG_H_ */