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;
相关热门文章
给主人留下些什么吧!~~
评论热议