none
关于Hive-base Register保存的问题 RRS feed

  • 问题

  • 大家好:

    在WinCE6平台上,将NAND分了两个区,Binfs区(64M)与Fatfs区(16M),还有400多M空间没有分配,Binfs仅仅存放NK.bin,没有使用Multi-bin;然后fatfs想存放注册表信息,和存放少许数据,于是设置了如下注册表。编译之后,系统可以正常启动并进入系统。在根目录下可以看到Flash这个文件夹,但是并没有预期的看到Flash\Documents and Settings\下有default.hv这样的文件,而是完全空白,但在根目录下Documents and Settings可以找到default.hv等*.hv文件。

            Flash文件夹可以正常写入文件并且在系统重启并不会丢失。不知道为何不可保存Hive Register,各位看看注册表有什么问题?

    ; @CESYSGEN IF FILESYS_FSREGHIVE
        ; HIVE BOOT SECTION
            
        [HKEY_LOCAL_MACHINE\init\BootVars]
            "SystemHive"="Documents and Settings\\default.hv"
            "Flags"=dword:3
            "Start DevMgr"=dword:1
            IF PRJ_ENABLE_REGFLUSH_THREAD
                "RegistryFlags"=dword:1
            ELSE PRJ_ENABLE_REGFLUSH_THREAD
                "RegistryFlags"=dword:1 ; aggressive flush
            ENDIF PRJ_ENABLE_REGFLUSH_THREAD


        ; END HIVE BOOT SECTION
        ; @CESYSGEN ENDIF FILESYS_FSREGHIVE
        
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; 1.4: Storage Manager settings
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; @CESYSGEN IF CE_MODULES_FATUTIL
        ; @CESYSGEN IF CE_MODULES_FSDMGR
        
        ; HIVE BOOT SECTION
        
        [HKEY_LOCAL_MACHINE\DebugZones]
            "FATFS"=dword:FFFFFFFF
            "FATUTIL"=dword:ffffffff
            
        ; Use AutoLoad\MSFlash will result in flash driver loaded in FileSys process.
        ; However our flash driver depends on GIO device driver so we should not use
        ; this possibility. Scenario with flash driver loaded to FileSys process can
        ; have small performance advantages.
        [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
            "DriverPath"="Drivers\\BuiltIn\\MSFlash"
            "LoadFlags"=dword:1
            "BootPhase"=dword:0
            "Order"=dword:4
            "AutoMount"=dword:1
            "AutoPart"=dword:1
            "AutoFormat"=dword:1
            "Name"="MSFLASH for NAND FLASH"
            "Folder"="Storage"
            "MountHidden"=dword:0
            "DefaultFileSystem"="FATFS"
            "MountAsBootable"=dword:1
            "PartitionDriver"="mspart.dll"
            "Flags"=dword:00001000


        IF PRJ_ENABLE_REGFLUSH_THREAD
        [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        ; Timeout period in ms for a flush (flush occurs if there have been some changes during this period).
            "FlushPeriod"=dword:1388 ;5 seconds instead default 120s
        ENDIF PRJ_ENABLE_REGFLUSH_THREAD


        [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\FATFS]
        "Dll"="exfat.dll"
            "MountAsBootable"=dword:1
            "MountHidden"=dword:0
            "FormatTFAT"=dword:1
            "EnableWriteBack"=dword:1
            "CheckForFormat"=dword:1
            "Util"="fatutil.dll"
            "Folder"="Flash"


       
        ; END HIVE BOOT SECTION
        
        ; @CESYSGEN ENDIF CE_MODULES_FSDMGR
        ; @CESYSGEN ENDIF CE_MODULES_FATUTIL
        
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; 1.6: Miscellaneous
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


        ; HIVE BOOT SECTION   
        [HKEY_LOCAL_MACHINE\Software\Marvell\BSP\RTCTX]
            "DLLBaseName"="$(_TGTPLAT_PFX)_rtctx.dll"
            "LogEntryNumber"=dword:1000
        [HKEY_LOCAL_MACHINE\Software\Marvell\BSP\KITL]
            "oalcfg"=dword:0;
        ; END HIVE BOOT SECTION
        ; =============================================================================
    ; Section 2:  Kernel Modules
    ; =============================================================================


        ; HIVE BOOT SECTION
        
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; CLKMGR Driver
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\CLKMGR]
            "Prefix"="CKM"
            "Dll"="$(_TGTPLAT_PFX)_clkmgr_driver.dll"
            "Order"=dword:0
            "Flags"=dword:00001000; DEVFLAGS_BOOTPHASE_1, this driver only load at system phase 1 
            
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; MFP Driver
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MFP]
            "Prefix"="MFP"
            "Dll"="$(_TGTPLAT_PFX)_MFP.dll"
            "Order"=dword:1; It should be load before other driver DLL loading 
            "Flags"=dword:00001000; DEVFLAGS_BOOTPHASE_1, this driver only load at system phase 1 


        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; GDE - Marvell DMA Engine
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\DMAEngine]
            "Prefix"="GDE"
            "Dll"="$(_TGTPLAT_PFX)_dma_driver.dll"
            "Order"=dword:1
            "Flags"=dword:00001000; DEVFLAGS_BOOTPHASE_1, this driver only load at system phase 1 


        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; NAND Flash Driver
        ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        ; @CESYSGEN IF CE_MODULES_FATUTIL
        ; @CESYSGEN IF CE_MODULES_FSDMGR
        IF BSP_NONAND !


        [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MSFlash]
            "Prefix"="DSK" 
            "Dll"="$(_TGTPLAT_PFX)_nandflsh.dll"
            "Index"=dword:1
            "Order"=dword:4      ; Must follow the MFP
            "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
            "Profile"="MSFlash"
        ; @CESYSGEN IF FILESYS_FSREGHIVE
            "Flags"=dword:00011000
        ; @CESYSGEN ENDIF FILESYS_FSREGHIVE
        ENDIF BSP_NONAND !
        ; @CESYSGEN ENDIF CE_MODULES_FSDMGR
        ; @CESYSGEN ENDIF CE_MODULES_FATUTIL
        ; END HIVE BOOT SECTION

    2012年3月29日 8:33

全部回复

  • 各位:

           使用了Multi-bin BinFs,RAM and ROM filesystem,Hive-base Register,系统可以正常的启动,并且在Storage文件夹内可以看到Documents and Settings,并且有default.hv,default.mky,defaultvol,system.mky,文件夹default内也有user.hv

           但是有个问题:注册表信息不能保持,每次重启后,修改的设置又恢复为原样了,但是在Storage建立的文件夹还是存在的。不知道何故?

    注册表如下:

    ; HIVE BOOT SECTION
        
        [HKEY_LOCAL_MACHINE\DebugZones]
            "FATFS"=dword:FFFFFFFF
            "FATUTIL"=dword:ffffffff
            
        IF PRJ_ENABLE_REGFLUSH_THREAD
        [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        ; Timeout period in ms for a flush (flush occurs if there have been some changes during this period).
            "FlushPeriod"=dword:1388 ;5 seconds instead default 120s
        ENDIF PRJ_ENABLE_REGFLUSH_THREAD


    ; Use AutoLoad\MSFlash will result in flash driver loaded in FileSys process.
        ; However our flash driver depends on GIO device driver so we should not use
        ; this possibility. Scenario with flash driver loaded to FileSys process can
        ; have small performance advantages.
        [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
        "MountAsBootable"=dword:0
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
       "MountAsBootable"=dword:0
        [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk]
            "DriverPath"="Drivers\\BuiltIn\\NAND_Flash"
            "LoadFlags"=dword:1
            "BootPhase"=dword:0
            "Order"=dword:4
            "AutoMount"=dword:1
            "AutoPart"=dword:1
            "AutoFormat"=dword:1
            "Name"="MSFLASH for NAND FLASH"
            "Folder"="Storage"
            "MountAsROM"=dword:1
            ;"MountHidden"=dword:1
            ;"MountAsRoot"=dword:0
            ;"MountSystem"=dword:0
            "DefaultFileSystem"="BINFS"
            "PartitionDriver"="mspart.dll"
        [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk\BINFS]
            "MountHidden"=dword:0
            "MountAsROM"=dword:1
            "XIP"=dword:0
        [HKEY_LOCAL_MACHINE\System\StorageManager\BinFS]
       "FriendlyName"="BIN Filesystem"
       "Dll"="binfs.dll"
       "Paging"=dword:1
        "Folder"="BINFS"     
        [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk\FATFS]
            "Dll"="exfat.dll"
            "MountAsBootable"=dword:1
            "MountAsRoot"=dword:0
            "Flags"=dword:00000014
            "MountAsROM"=dword:0
            "MountHidden"=dword:0
            ;"FormatExfat"=dword:1
            "FormatTFAT"=dword:1
            "EnableWriteBack"=dword:1
            "CheckForFormat"=dword:1
            "Util"="fatutil.dll"


        ; END HIVE BOOT SECTION
        

    2012年3月30日 8:59
  • 各位:

    实验了一下执行RegFlushKey,可以将注册表信息保持,重启后也没有问题。

    [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        ; Timeout period in ms for a flush (flush occurs if there have been some changes during this period).
            "FlushPeriod"=dword:1388 ;5 seconds instead default 120s

    似乎不起作用,不知道何故?

    2012年4月1日 5:20