Blame view
include/linux/bcm963xx_tag.h
3.56 KB
8fce60b8d
|
1 2 3 4 |
#ifndef __LINUX_BCM963XX_TAG_H__ #define __LINUX_BCM963XX_TAG_H__ #include <linux/types.h> |
bc49c2896
|
5 6 7 8 |
#define TAGVER_LEN 4 /* Length of Tag Version */ #define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ #define SIG1_LEN 20 /* Company Signature 1 Length */ |
25985edce
|
9 |
#define SIG2_LEN 14 /* Company Signature 2 Length */ |
bc49c2896
|
10 11 12 13 14 |
#define BOARDID_LEN 16 /* Length of BoardId */ #define ENDIANFLAG_LEN 2 /* Endian Flag Length */ #define CHIPID_LEN 6 /* Chip Id Length */ #define IMAGE_LEN 10 /* Length of Length Field */ #define ADDRESS_LEN 12 /* Length of Address field */ |
696569f75
|
15 |
#define IMAGE_SEQUENCE_LEN 4 /* Image sequence Length */ |
bc49c2896
|
16 17 18 19 |
#define RSASIG_LEN 20 /* Length of RSA Signature in tag */ #define TAGINFO1_LEN 30 /* Length of vendor information field1 in tag */ #define FLASHLAYOUTVER_LEN 4 /* Length of Flash Layout Version String tag */ #define TAGINFO2_LEN 16 /* Length of vendor information field2 in tag */ |
bc49c2896
|
20 21 22 23 24 25 26 27 28 |
#define ALTTAGINFO_LEN 54 /* Alternate length for vendor information; Pirelli */ #define NUM_PIRELLI 2 #define IMAGETAG_CRC_START 0xFFFFFFFF #define PIRELLI_BOARDS { \ "AGPF-S0", \ "DWV-S0", \ } |
1f29cb19c
|
29 30 31 32 |
/* Extended flash address, needs to be subtracted * from bcm_tag flash image offsets. */ #define BCM963XX_EXTENDED_SIZE 0xBFC00000 |
bc49c2896
|
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
/* * The broadcom firmware assumes the rootfs starts the image, * therefore uses the rootfs start (flash_image_address) * to determine where to flash the image. Since we have the kernel first * we have to give it the kernel address, but the crc uses the length * associated with this address (root_length), which is added to the kernel * length (kernel_length) to determine the length of image to flash and thus * needs to be rootfs + deadcode (jffs2 EOF marker) */ struct bcm_tag { /* 0-3: Version of the image tag */ char tag_version[TAGVER_LEN]; /* 4-23: Company Line 1 */ char sig_1[SIG1_LEN]; /* 24-37: Company Line 2 */ char sig_2[SIG2_LEN]; /* 38-43: Chip this image is for */ char chip_id[CHIPID_LEN]; /* 44-59: Board name */ char board_id[BOARDID_LEN]; /* 60-61: Map endianness -- 1 BE 0 LE */ char big_endian[ENDIANFLAG_LEN]; /* 62-71: Total length of image */ char total_length[IMAGE_LEN]; /* 72-83: Address in memory of CFE */ char cfe__address[ADDRESS_LEN]; /* 84-93: Size of CFE */ char cfe_length[IMAGE_LEN]; /* 94-105: Address in memory of image start * (kernel for OpenWRT, rootfs for stock firmware) */ char flash_image_start[ADDRESS_LEN]; /* 106-115: Size of rootfs */ char root_length[IMAGE_LEN]; /* 116-127: Address in memory of kernel */ char kernel_address[ADDRESS_LEN]; /* 128-137: Size of kernel */ char kernel_length[IMAGE_LEN]; |
696569f75
|
72 73 74 75 |
/* 138-141: Image sequence number * (to be incremented when flashed with a new image) */ char image_sequence[IMAGE_SEQUENCE_LEN]; |
bc49c2896
|
76 77 78 79 80 81 82 |
/* 142-161: RSA Signature (not used; some vendors may use this) */ char rsa_signature[RSASIG_LEN]; /* 162-191: Compilation and related information (not used in OpenWrt) */ char information1[TAGINFO1_LEN]; /* 192-195: Version flash layout */ char flash_layout_ver[FLASHLAYOUTVER_LEN]; /* 196-199: kernel+rootfs CRC32 */ |
805166783
|
83 |
__u32 fskernel_crc; |
bc49c2896
|
84 85 86 |
/* 200-215: Unused except on Alice Gate where is is information */ char information2[TAGINFO2_LEN]; /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */ |
805166783
|
87 |
__u32 image_crc; |
bc49c2896
|
88 |
/* 220-223: CRC32 of rootfs partition */ |
805166783
|
89 |
__u32 rootfs_crc; |
bc49c2896
|
90 |
/* 224-227: CRC32 of kernel partition */ |
805166783
|
91 |
__u32 kernel_crc; |
bc49c2896
|
92 93 |
/* 228-235: Unused at present */ char reserved1[8]; |
7da34c1da
|
94 |
/* 236-239: CRC32 of header excluding last 20 bytes */ |
805166783
|
95 |
__u32 header_crc; |
bc49c2896
|
96 97 98 |
/* 240-255: Unused at present */ char reserved2[16]; }; |
8fce60b8d
|
99 |
#endif /* __LINUX_BCM63XX_TAG_H__ */ |