Enable IMGFS Step by Step

Prepare your BSP for Magneto:
  Choose/Get a sample BSP for Magneto
  Make your block device driver ready for Magneto
      New features, new IOCTLs
  Modify/Add configuration files
      build environment, SYSGEN_xxx …
      files in Platform/%_TGTPLAT%/files
  “Magneto Pre-Release Documentation”
Build IPL for your device:
    Magneto Pre-Release Documentation
    Bringing Up a Windows Mobile Platform > Developing a BSP for Windows Mobile > Using the Image Update Model > Image Update > Image Update Device Side Features > Initial Program Loader
Build the disk image for your device:
    Set MAKEIMG_BIN_FORMAT=imageupdate
    Set di_debug_info=1, for more error messages
    Memory.cfg.xml
          Bringing Up a Windows Mobile Platform > Developing a BSP for Windows Mobile > Using the Image Update Model > Image Update > Package Generation Process > Image Update Files > Memory Configuration File
    PostDiskimage.bat

<?xml version="1.0" encoding="utf-8" ?>
<MEMORYCFG xmlns="http://schemas.microsoft.com/embedded/2004/10/ImageUpdate">

    <HARDWARE>
        <RAM START="0x8C200000" LENGTH="0x1D00000"></RAM>
        <NAND SECTORSIZE="0x200" BLOCKSIZE="0x4000" LENGTH="0x1F20000" ID="SmartMedia" />
    </HARDWARE>

    <PARTITIONS>
        <BINARY DATAFILE="uldr.nb0" ID="ULDR" COMPRESS="1" STORAGE_ID="SmartMedia" />
        <RAMIMAGE FIXUP_ADDRESS="0x8C200000" STORAGE_ID="SmartMedia" COMPRESS="1" ROMFLAGS="2" FSRAMPERCENT="0x00000004" ID="NK" />
        <IMGFS ID="OS" STORAGE_ID="SmartMedia" FREE_SPACE_BUFFER="0x10000"></IMGFS>
        <USERSTORE STORAGE_ID="SmartMedia" ID="Storage" PART_TYPE="0x04" />
    </PARTITIONS>

</MEMORYCFG>

Debug the XIP kernel:
      Persistent storage should be mounted as ROOT(“/”) in Magneto
      Hive-based Registry
      Make sure the drivers and files which are needed to mount IMGFS and persistent storage are all in XIP kernel
      Correct Registry setting
      rgucomp –o boot.hv > boot.hv.txt
Registry setting for IMGFS (1/6):
   HKEY_LOCAL_MACHINE/init/BootVars]
    "Flags"=dword:3
    "RequireCertMod"=dword:1
    "ProfileDir"="Documents and Settings"
    "SystemHive"="Documents and Settings//default.hv"
 
  ; Valid Bits for Flags registry value
  ; If no flags are set, the hive will be stored in the object store.
  ;
  ; 0x00000001    Start storage manager in boot phase 1 for hive-based registry
  ; 0x00000002    Start device manager in boot phase 1 for hive-based registry
  ; 0x00000004    Start storage manager in boot phase 1 for registry in
  ;                         external ROM (such as BINFS)
  ; 0x00000008    Start device manager in boot phase 1 for registry in
  ;                         external ROM (such as BINFS)

  ;"Start DevMgr"=dword:1
   ; It should be equal to set “Flags”=dword:3, and it will overwrite the setting
   ; of “Flags”


[HKEY_LOCAL_MACHINE/System/StorageManager]
  "PNPUnloadDelay"=dword:1000
  "Dll"="fsdmgr.dll"

[HKEY_LOCAL_MACHINE/System/StorageManager/AutoLoad/TFFS]
  "Order"=dword:0
  "BootPhase"=dword:0
  "LoadFlags"=dword:1
  "DriverPath"="Drivers//BuiltIn//TrueFFS"
[HKEY_LOCAL_MACHINE/Drivers/BuiltIn/TrueFFS]
  "UseCache"=dword:1
  "AutoDPDMode"=dword:1
  "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
  "WindowBase"=dword:c000000
  "Ioctl"=dword:4
  "Order"=dword:1
  "Index"=dword:1
  "Prefix"="DSK"
  "Dll"="TrueFFS.dll"
  "Profile"="TRUEFFS_DOC"
  "Flags"=dword:11000
[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles]

; Default values for all profiles
; These can overridden in the particular named profile
; Various Flags
;   AutoFormat - Formats the store automatically
;   AutoPart   - Automatically partitions the store with largest creatable partition
;   AutoMount  - Automatically Mounts each detected partition (if FSD driver is available)
;   MountFlags (deprecated)- Flags on how the partition is mounted
;       1  - Hidden file system
;       2  - May contain system registry
;       4  - Mount as root of file system, "/"
;      10  - Mount filesystem as an external ROM filesystem
;      20  - Treat all files and subdirectories as system files
;   The following registry values override the MountFlags:
;      MountHidden - Hidden file system (same as MountFlags=1)
;      MountAsBootable - May contain system registry (same as MountFlags=2)
;      MountAsRoot - Mount as root of file system, "/" (same as MountFlags=4)
;      MountAsROM - Mount as an external ROM filesystem (same as MountFlags=10)
;      MountSystem - Treat all files and subdirectories as system files (same as MountFlags=20)

HKEY_LOCAL_MACHINE/System/StorageManager/Profiles]
  "Folder"="Mounted Volume"
  "PartitionDriverName"="MSPART"
  "DefaultFileSystem"=""
  "MountFlags"=dword:0
  "AutoFormat"=dword:0
  "AutoPart"=dword:0
  "AutoMount"=dword:1

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/TRUEFFS_DOC]
[HKEY_LOCAL_MACHINE/System/StorageManager/MSPART]
  "Dll"="mspart.dll"

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/TRUEFFS_DOC/mspart]
[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles]
  "MountFlags"=dword:0
           :

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/TRUEFFS_DOC]


[HKEY_LOCAL_MACHINE/System/StorageManager/IMGFS]
  "ShadowROM"=dword:1
  "Paging"=dword:1
  "Dll"="imgfs.dll"
  "FriendlyName"="Image-Update Filesystem"

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/TRUEFFS_DOC/IMGFS]
  "XIP"=dword:0
  "MountAsROM"=dword:1
  "MountAsHidden"=dword:1


Registry setting for FATFS :


[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles]
  "MountFlags"=dword:0
           :

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/TRUEFFS_DOC]

 

[HKEY_LOCAL_MACHINE/System/StorageManager/FATFS]
  "CacheDll"="diskcache.dll"
  "Util"="fatutil.dll"
  "CacheSize"=dword:0
  "EnableCache"=dword:1
  "Paging"=dword:1
  "Flags"=dword:64
  "Dll"="fatfsd.dll"
  "FriendlyName"="FAT FileSystem"

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles]
  "MountFlags"=dword:0
           :

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/TRUEFFS_DOC]

[HKEY_LOCAL_MACHINE/System/StorageManager/FATFS]
           :

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/TRUEFFS_DOC/FATFS]
  "CheckForFormat"=dword:1    ; IOCTL_HAL_QUERY_FORMAT_PARTITION
  "EnableWriteBack"=dword:1
  "FormatTFAT"=dword:1
  "Flags"=dword:14
  "MountAsRoot"=dword:1
  "MountAsBootable"=dword:1

Suggestions for Debugging:

Verify the contents of your disk image
Check your device drivers
FMD driver, … etc.
Check the media contents in your device
Check the registry settings
rgucomp –o boot.hv > boot.hv.txt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值