zoukankan      html  css  js  c++  java
  • windowsCE镜像文件结构

    Formats:
    struct BinFile{
        BYTE signature[7];     // = { 'B', '0', '0', '0', 'F', 'F', '\a' }
        DWORD   ImageStart
        DWORD   ImageLength
        Record  ImageRecords[RecordNum]
      };


    struct Record{
        DWORD address;
        DWORD length;
        DWORD chksum;
      };
    在文件的最开端,会放置一个BinFile结构,imageStart和ImageLength分别对应镜像展开后在内存中存放的首地址和长度。该结构中的RecordNum为不确定的,通常在最后一个记录之后增加一个address和Chksum都为0的纪录表示结束,而这个表示结束的结构中的Length则标示其实际入口点。

    Image
    Offset   -----------
      0x00    | ImageStart   
                 |
                 |
      0x40    | Rom Signature { 0x43454345 }
      0x44    | Pointer to the ROMHDR for this Region
                 |
                 |
      0x???? | ROMHDR{
                 | };
                 |

    Chain file

    struct _XIPCHAIN_ENTRY {
        LPVOID  pvAddr;                 // address of the XIP
        DWORD   dwLength;               // the size of the XIP
        DWORD   dwMaxLength;            // the biggest it can grow to
        USHORT  usOrder;                // where to put into ROMChain_t
        USHORT  usFlags;                // flags/status of XIP
        DWORD   dwVersion;              // version info
        CHAR    szName[XIP_NAMELEN];    // Name of XIP, typically the bin file's name, w/o .bin
        DWORD   dwAlgoFlags;            // algorithm to use for signature verification
        DWORD   dwKeyLen;               // length of key in byPublicKey
        BYTE    byPublicKey[596];       // public key data
      };

      Offset   --------------------------
      0x00    | DWORD Count;
      0x04    | XIPCHAIN_ENTRY[1]{
                 | };
                 | XIPCHAIN_ENTRY[2]{
                 | };
                 | ...

  • 相关阅读:
    haproxy报错解决
    haproxy安装
    gitlab配置webhook报错解决
    git_push报错
    DNS配置
    centos7 选定默认启动内核,及删除无用内核
    ansible安装、配置ssh、hosts、测试连接
    公司手机打卡app时间和百度时间差30秒解决
    所有编辑语言的共性内容元素
    php使用正则函数使用详解
  • 原文地址:https://www.cnblogs.com/nasiry/p/62792.html
Copyright © 2011-2022 走看看