Chinaunix首页 | 论坛 | 博客
  • 博客访问: 425744
  • 博文数量: 56
  • 博客积分: 2262
  • 博客等级: 大尉
  • 技术积分: 711
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-08 20:04
文章分类

全部博文(56)

文章存档

2013年(1)

2012年(9)

2011年(10)

2010年(7)

2009年(7)

2008年(22)

我的朋友

分类: WINDOWS

2008-07-22 22:21:53

typedef struct _TOC {
   DWORD               dwSignature;
         BYTE                                     udid[8];
    // How to boot the images in this TOC.
    // This could be moved into the image descriptor if desired,
    // but I prefer to conserve space.
    BOOT_CFG            BootCfg;
    // Array of Image Descriptors.
    IMAGE_DESCRIPTOR    id[MAX_TOC_DESCRIPTORS];
//    UCHAR Pad[12];      // align on SECTOR_SIZE
    CHAININFO           chainInfo;
} TOC, *PTOC;           // 512 bytes
 
typedef struct _BOOTCFG {
    ULONG       ImageIndex;
    ULONG       ConfigFlags;
    ULONG       BootDelay;
    EDBG_ADDR   EdbgAddr;
    ULONG       SubnetMask;
} BOOT_CFG
 
typedef struct _IMAGE_DESCRIPTOR {
    // File version info
    DWORD dwVersion;                    // e.g: build number
    DWORD dwSignature;                  // e.g: "EBOT", "CFSH", etc
    UCHAR ucString[IMAGE_STRING_LEN];   // e.g: "PocketPC_2002"
    DWORD dwImageType;      // IMAGE_TYPE_ flags
    DWORD dwTtlSectors;     // TTL image size in sectors.
                            // We store size in sectors instead of bytes
                            // to simplify sector reads in Nboot.
    DWORD dwLoadAddress;    // Virtual address to load image (ImageStart)
    DWORD dwJumpAddress;    // Virtual address to jump (StartAddress/LaunchAddr)
    // This array equates to a sector-based MXIP MultiBINInfo in blcommon.
    // Unused entries are zeroed.
    // You could chain image descriptors if needed.
    SG_SECTOR sgList[MAX_SG_SECTORS];
    // BinFS support to load nk region only struct
         //{
                   ULONG dwStoreOffset;    // byte offset - not needed - remove!
                   //ULONG RunAddress;     // nk dwRegionStart address
                   //ULONG Length;         // nk dwRegionLength in bytes
                   //ULONG LaunchAddress;  // nk dwLaunchAddr
         //} NKRegion;
} IMAGE_DESCRIPTOR, *PIMAGE_DESCRIPTOR;
typedef struct _CHAININFO {
    DWORD   dwLoadAddress;          // Load address in SDRAM
    DWORD   dwFlashAddress;         // Start location on the NAND
    DWORD   dwLength;               // The length of the image
} CHAININFO, *PCHAININFO;
 
typedef struct _SG_SECTOR {
    DWORD dwSector;     // Starting sector of the image segment
    DWORD dwLength;     // Image length of this segment, in contigious sectors.
} SG_SECTOR, *PSG_SECTOR;
 
typedef struct _EDBG_ADDR {
         DWORD  dwIP;         // @field IP address (net byte order)
         USHORT wMAC[3];      // @field Ethernet address (net byte order)
         USHORT wPort;        // @field UDP port # (net byte order) - only used if appropriate
} EDBG_ADDR;
阅读(2148) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~