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]{
                 | };
                 | ...

  • 相关阅读:
    【leetcode】496. Next Greater Element I
    工具网站
    [err]Traceback (most recent call last): File "/usr/local/bin/pip", line 7, in <module> from pip._internal import main ImportError: No module named 'pip._internal'
    []TLD code run
    【动手学深度学习】
    【论文阅读】Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks
    【linux基础】ubuntu系统NVIDIA驱动安装
    【linux基础】linux不能进入系统
    【leetcode】492. Construct the Rectangle
    【leetcode】485. Max Consecutive Ones
  • 原文地址:https://www.cnblogs.com/nasiry/p/62792.html
Copyright © 2011-2022 走看看