今天在6410+wince600系统上实现了 xip+hive注册表保存,现在贴出来跟大家一起分享一下. 软件平台:wince600 硬件平台:深圳友坚恒天科技 UT_S3C6410开发板 http://www.urbetter.com
实现方法: 1. 必须加入HIVE based regiters这个组件到OS(在PB右边的文件系统选项里) 2. 注册表添加,必须将一下部分加入你的注册表中实现hive ;HIVE BOOT SECTION
[HKEY_LOCAL_MACHINEinitBootVars] "SYSTEMHIVE"="Documents and Settingssystem.hv" ;system.hv会保存到HDDDocuments and Settingssystem.hv ;"PROFILEDIR"="Documents and Settings" ;user.hv会保存到HDDDocuments and Settingsdefaultuser.hv "Start DevMgr"=dword:1 ;这个说是启动device.exe,但是wince 5.0好像不用这个 "DefaultUser"="default" ;咱们只有一个用户default,基本上就是决定user.hv的路径了 "Flags"=dword:3 ;这个应该是wince 5.0下决定在哪个阶段启动device.exe的表项 "RegistryFlags"=dword:1 ;这个就是设置注册表每次改动后自动flush到system.hv
;########################################################################### ;这个部分是binfs的注册表项,如果你不是用的binfs那么不用将它们拉到boot.hv中 [HKEY_LOCAL_MACHINESystemStorageManagerAutoLoadSMFlash] "DriverPath"="DriversBlockDeviceSMFlash" "LoadFlags"=dword:1 "MountFlags"=dword:11 "BootPhase"=dword:0 "Flags"=dword:1000 [HKEY_LOCAL_MACHINEDriversBlockDeviceSMFlash] "Prefix"="DSK" "Dll"="BIBDrv.dll" "Order"=dword:0 "Ioctl"=dword:4 "Profile"="SMFlash" "FriendlyName"="Samsung Flash Driver" "MountFlags"=dword:11 "BootPhase"=dword:0 "Flags"=dword:1000 ; Bind BINFS to the block driver [HKEY_LOCAL_MACHINESystemStorageManagerProfilesSMFlash] "DefaultFileSystem"="BINFS" ;binfs的路径为/BINFS "PartitionDriver"="mspart.dll" "AutoMount"=dword:1 "AutoPart"=dword:1 "MountFlags"=dword:11 "Folder"="ResidentFlash" "Name"="Samsung Flash Disk" "BootPhase"=dword:0 "Flags"=dword:1000 "MountHidden"=dword:0 ;###########################################################################
;###########################################################################
[HKEY_LOCAL_MACHINEDriversBuiltInPocketStore] "Prefix"="DSK" "Dll"="ONDisk.dll" "Order"=dword:1 "Profile"="PocketStore" "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}" "BmlVolumeId"=dword:0 ; BML volume ID = 0 "BmlPartitionId"=dword:8 ; BML parition ID = PARTITION_ID_FILESYSTEM "Index"=dword:2 "Flags"=dword:1000 ;这个flag指定这个驱动只在boot.hv中加载一次 [HKEY_LOCAL_MACHINESystemStorageManagerProfilesPocketStore] "DefaultFileSystem"="FATFS" "PartitionDriver"="mspart.dll" "AutoMount"=dword:1 "AutoPart"=dword:1 "AutoFormat"=dword:1 "MountAsBootable"=dword:1 ;这个是wince 5.0下指定这个分区保存system.hv的关键 "Folder"="HDD" "Name"="NAND Drive" "Ioctl"=dword:4
[HKEY_LOCAL_MACHINESystemStorageManagerProfilesPocketStoreFATFS] "EnableCacheWarm"=dword:0 ENDIF ;###########################################################################
;END HIVE BOOT SECTION
; HIVE BOOT SECTION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Support BINFS Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Add BinFS to partition table [HKEY_LOCAL_MACHINESystemStorageManagerPartitionTable] "21"="BINFS"
[HKEY_LOCAL_MACHINESystemStorageManagerBINFS] "Folder"="BINFS" "FriendlyName"="Bin FileSystem" "Dll"="binfs.dll" ; MountFlags: ; 0x10 specifies that this file system is to be mounted as an external ; ROM filesystem shadowing the windows directory ; 0x1 specifies that the mountpoint BINFS is to be hidden ; "MountFlags"=dword:10 "BootPhase"=dword:0 ; END HIVE BOOT SECTION
3. config.bib文件修改 MEMORY pdwXIPLoc 00000000 803FF000 FIXUPVAR XIPKERNEL 80200000 001FF000 RAMIMAGE CHAIN 803FF000 00001000 RESERVED NK 80400000 01E00000 NANDIMAGE RAM 80400000 07C00000 RAM FLASH 92000000 00100000 RESERVED CONFIG AUTOSIZE=ON COMPRESSION=ON DLLADDR_AUTOSIZE=ON KERNELFIXUPS=ON PROFILE=OFF RAM_AUTOSIZE=OFF ROMFLAGS=0 ;ROMSIZE=01E00000 ;ROMSTART=800B8000 ;ROMWIDTH=32 ROM_AUTOSIZE=OFF XIPSCHAIN=803FF000
4. 必须将下列文件加入到XIPKERNEL里 "nk.exe", "coredll.dll", "filesys.exe", "fatfsd.dll", "diskcache.dll", "fatutil.dll", "binfs.dll", "fsdmgr.dll", "mspart.dll", "smflash.dll", "boot.hv", 加入方法如下: nk.exe $(_FLATRELEASEDIR)kern.exe XIPKERNEL SH 其他项类似方法添加. 注:可以直接修改common.bib文件 编译完成后,将xip.bin文件烧写到你的板子上即可.
|