#define TAGINFO_LEN 20 /* Length of vendor information field in tag */
#define TAGVER_LEN 4 /* Length of Tag Version */
#define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */
#define NUM_TAGID 5
#define IMAGETAG_CRC_START 0xFFFFFFFF
@ -15,18 +16,18 @@ struct tagiddesc_t {
chartagiddesc[80];
};
// what is called bc308 may actually be BT Voyager-specific
// bc310 should be right
// bc221 is used by BT Voyager and should be right
// bc310 should be right,and may apply to 3.08 code as well
#define TAGID_DEFINITIONS { \
{"bccfe","Broadcom CFE flash image"}, \
{"bc300","Broadcom code version 3.00-3.06 and all ftp/tftp flash"}, \
{"ag306","Alice Gate (Pirelli, based on Broadcom 3.06)"}, \
{"bc308","Broadcom code version 3.08"}, \
{"bc221","Broadcom code version 2.21"}, \
{"bc310","Broadcom code version 3.10-3.12"}, \
}
structbcm_tag_bccfe{
unsignedchartagVersion[TAGVER_LEN];// 0-3: Version of the image tag
unsignedchartagVersion[TAGVER_LEN];// 0-3: Version of the image tag
unsignedcharsig_1[20];// 4-23: Company Line 1
unsignedcharsig_2[14];// 24-37: Company Line 2
unsignedcharchipid[6];// 38-43: Chip this image is for
@ -52,7 +53,7 @@ struct bcm_tag_bccfe {
};
structbcm_tag_bc300{
unsignedchartagVersion[4];// 0-3: Version of the image tag
unsignedchartagVersion[TAGVER_LEN];// 0-3: Version of the image tag
unsignedcharsig_1[20];// 4-23: Company Line 1
unsignedcharsig_2[14];// 24-37: Company Line 2
unsignedcharchipid[6];// 38-43: Chip this image is for
@ -80,7 +81,7 @@ struct bcm_tag_bc300 {
};
structbcm_tag_ag306{
unsignedchartagVersion[4];// 0-3: Version of the image tag
unsignedchartagVersion[TAGVER_LEN];// 0-3: Version of the image tag
unsignedcharsig_1[20];// 4-23: Company Line 1
unsignedcharsig_2[14];// 24-37: Company Line 2
unsignedcharchipid[6];// 38-43: Chip this image is for
@ -105,8 +106,8 @@ struct bcm_tag_ag306 {
unsignedchartagId[TAGID_LEN];// 250-255: Identifies which type of tag this is, currently two-letter company code, and then three digits for version of broadcom code in which this tag was first introduced
};
structbcm_tag_bc308{
unsignedchartagVersion[4];// 0-3: Version of the image tag
structbcm_tag_bc221{
unsignedchartagVersion[TAGVER_LEN];// 0-3: Version of the image tag
unsignedcharsig_1[20];// 4-23: Company Line 1
unsignedcharsig_2[14];// 24-37: Company Line 2
unsignedcharchipid[6];// 38-43: Chip this image is for
@ -121,12 +122,12 @@ struct bcm_tag_bc308 {
unsignedcharkernelLength[IMAGE_LEN];// 128-137: Size of kernel
unsignedchardualImage[2];// 138-139: Unused at present
unsignedcharinactiveFlag[2];// 140-141: Unused at present
unsignedcharinformation1[TAGINFO_LEN+2];// 142-163: Unused at present
unsignedcharrsa_signature[TAGINFO_LEN];// 142-161: RSA Signature (unused at present; some vendors may use this)
unsignedcharreserved5[2];// 162-163: Unused at present
unsignedchartagId[TAGID_LEN];// 164-169: Identifies which type of tag this is, currently two-letter company code, and then three digits for version of broadcom code in which this tag was first introduced
unsignedcharrootAddress[ADDRESS_LEN];// 170-181: Address in memory of rootfs partition
unsignedcharrootLength[IMAGE_LEN];// 182-191: Size of rootfs partition
unsignedcharflashLayoutVer[2];// 192-193: Version flash layout
unsignedcharcurflashLayoutVer[2];// 194-195: Unused at present
unsignedcharflashLayoutVer[4];// 192-195: Version flash layout
unsignedcharkernelCRC[4];// 196-199: Guessed to be kernel CRC
unsignedcharreserved4[16];// 200-215: Reserved area; unused at present
unsignedcharimageCRC[4];// 216-219: CRC32 of images