也写在S3C2440A平台+winCE5.0+NAND +HIVE注册表的实现
引用自:http://blog.csdn.net/shuiii/archive/2007/04/18/1569268.aspx
最近一直弄这个注册表的永久保存,在网上看到很多相关的贴子,就像大部分人说的一样,很少有人照着做就可以成功的。 今天总算成功了,总结经验如下,但愿对后来者有所帮助。
首先,要实现注册表的永久保存,你的NAND FLASH一定要可以分一块区出来,实现永久保存数据。这一步我的做法是在nand flash驱动里面实现的,也就没有用到binfs文件格式。如果这一步成功的话,也就完成的一大半了。剩下的就只是改一下注册表了。这部分网上也很多贴子,感觉很多键多没有什么用。又几个键少不了,试了半天才试出来。还是贴出来吧。
; @CESYSGEN IF FILESYS_FSREGHIVE
; HIVE BOOT SECTION
; 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)
[HKEY_LOCAL_MACHINE\init\BootVars]
"SystemHive"="system.hv"
"DefaultUser"="default"
"Flags"=dword:3
"RegistryFlags"=dword:1
[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\FlashDrv]
"DriverPath"="Drivers\\BuiltIn\\FlashDrv"
"LoadFlags"=dword:1
"BootPhase"=dword:0
"Flags"=dword:1000
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FlashDrv]
"Prefix"="DSK"
"Dll"="FLASHDRV.dll"
"Order"=dword:0
"Ioctl"=dword:4
"Profile"="FlashDrv"
"FriendlyName"="MS Flash Driver"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
; Bind BINFS to the block driver
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDrv]
"DefaultFileSystem"="FATFS"
"PartitionDriver"="mspart.dll"
"AutoMount"=dword:1
"AutoPart"=dword:1
"AutoFormat"=dword:1
"MountAsBootable"=dword:1
"Flags"=dword:1000
"Folder"="ResidentFlash"
"Name"="Microsoft Flash Disk"
"BootPhase"=dword:0
; Keep FATFS from trying to shadow \Windows
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDrv\FATFS]
"Flags"=dword:00000024
"EnableCacheWarm"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\FATFS]
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
"Flags"=dword:00000064
"Paging"=dword:1
"EnableCache"=dword:1
"CacheSize"=dword:0
IF TODO
[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\Relfsd]
"Dll"="relfsd.dll"
"Paging"=dword:0
"LoadFlags"=dword:1
ENDIF TODO
; END HIVE BOOT SECTION
; @CESYSGEN ENDIF FILESYS_FSREGHIVE