2440 SD卡上实现hive注册表,问题请教。

jiereliyi 2016-05-27 02:41:01
我要实现HIVe注册表放在SD卡上。通过配置注册表已经实现SD卡在启动阶段的挂载。但是挂载顺序还是在装载hive注册表之后,
调了很久还是无法实现,特请高人指点。
注册表配置:

;---------------------------------HIVE BEGIN-NEW-----------------------------------------------
; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\init\BootVars]
"SystemHive"="\\SDCard\\system.hv"
"ProfileDir"="\\SDCard"
"Flags"=dword:00000003
"Start DevMgr"=dword:00000001
"RegistryFlags"=dword:00000001
;"DefaultUser"="default"


[HKEY_LOCAL_MACHINE\Drivers\Builtin\SDBusDriver]
"Order"=dword:1
"Dll"="SDBus.dll"
"Prefix"="SDC"
"ThreadPriority"=dword:64 ; default thread priority for dispatch thread
"RequestListDepth"=dword:30 ; pre-allocated requests
"Flags"=dword:1000
"IClass"=multi_sz:"{20FA98A8-B298-4b32-8D72-C716AEE2FA84}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"



; SD Memory Storage class driver
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
"Dll"="SDMemory.dll"
"Order"=dword:1
"Prefix"="DSK"
"BlockTransferSize"=dword:40 ; send no more than 64 blocks of data per bus transfer
;"SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block access
;"IdleTimeout"=dword:7D0 ; 2000 milliseconds
;"IdlePowerState"=dword:2 ; 0 == D0, 1 == D1, etc.
;"DisablePowerManagement"="" ; if value present, then disable (remove value to enable)

"Profile"="SDMemory"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
"Flags"=dword:1000
; SDHC Memory Storage class driver
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]
"Dll"="SDMemory.dll"
"Prefix"="DSK"
"Index"=dword:1
"BootPhase"=dword:0
"BlockTransferSize"=dword:40 ; send no more than 64 blocks of data per bus transfer
;"SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block access
;"IdleTimeout"=dword:7D0 ; 2000 milliseconds
;"IdlePowerState"=dword:2 ; 0 == D0, 1 == D1, etc.
;"DisablePowerManagement"="" ; if value present, then disable (remove value to enable)

"Profile"="SDMemory"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
"Flags"=dword:1000

; MMC Storage Class Driver
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]
"Dll"="SDMemory.dll"
"Prefix"="DSK"
"BlockTransferSize"=dword:40 ; send no more than 64 blocks of data per bus transfer
;"SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block access
;"IdleTimeout"=dword:7D0 ; milliseconds
;"IdlePowerState"=dword:2 ; 0 == D0, 1 == D1, etc.
;"DisablePowerManagement"="" ; if value present, then disable (remove value to enable)

"Profile"="MMC"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
"Flags"=dword:1000
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
"Name"="MMC Memory Card"
"Folder"="MMCCard"
"PartitionDriverName"="MSPART"
"DefaultFileSystem"="FATFS"
"BootPhase"=dword:0
"MountAsBootable"=dword:1

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC\FATFS]
"MountAsBootable"=dword:1
"MountAsROM"=dword:1
"MountAsRoot"=dword:1
"AutoFormat"=dword:1
"AutoPart" =dword:1
"AutoMount"=dword:1
"BootPhase"=dword:0
IF BSP_NOSD !

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDHC_SMDK2440]
"Profile"="SDMemory"
"MountFlags"=dword:11
"BootPhase"=dword:1
"Ioctl"=dword:4
"Flags"=dword:1000

"Order"=dword:0
"Dll"="sdhc_sc2440.dll"
"Prefix"="SDH"

"DMAChannel"=dword:0 ; DMA channel to use. Set to 0xffffffff to disable DMA
"DMAIrq"=dword:11
"DMA_IST_Priority"=dword:96

"SDIOIrq"=dword:15
"SDIO_IST_Priority"=dword:97

"PollingTimeout"=dword:100 ; 100 ms
"CardDetect_Thread_Priority"=dword:98

"CardDetectGPIO"="G" ; card detect on GPG8
"CardDetectMask"=dword:100
"CardDetectFlag"=dword:0
"CardDetectControlMask"=dword:fffcffff
"CardDetectControlFlag"=dword:0
"CardDetectPullupMask"=dword:fffffeff
"CardDetectPullupFlag"=dword:100

"CardReadWriteGPIO"="H" ; card R/W on GPH8
"CardReadWriteMask"=dword:100
"CardReadWriteFlag"=dword:100
"CardReadWriteControlMask"=dword:fffcffff
"CardReadWriteControlFlag"=dword:0
"CardReadWritePullupMask"=dword:fffffeff
"CardReadWritePullupFlag"=dword:100

"HandleBusyFinishOnCommand38"=dword:1
"DmaTransferTimeoutFactor"=dword:8
"DmaTransferTimeoutConstant"=dword:3000

ENDIF BSP_NOSD !
; @CESYSGEN ENDIF CE_MODULES_SDBUS

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\SDMemory]
;"DriverPath"="Drivers\\BuiltIn\\SDHC_SMDK2440"
;"DriverPath"="Drivers\\Builtin\\SDBusDriver"
"DriverPath"="Drivers\\SDCARD\\ClientDrivers\\Class\\SDMemory_Class"
"LoadFlags"=dword:1 ; load synchronously
"BootPhase"=dword:0
"MountAsBootable"=dword:1 ; for hive-based registry
"Order"=dword:0


[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]

"Folder"="SDCard"
"Name"="SD Memory Card"
"Folder"="SDCard"
"AutoFormat"=dword:0
"AutoMount"=dword:1
"AutoPart"=dword:0
"BootPhase"=dword:0
"DefaultFileSystem"="FATFS"
"Order"=dword:0
;"DriverPath"="Drivers\\BuiltIn\\SDHC_SMDK2440"
"DriverPath"="Drivers\\SDCARD\\ClientDrivers\\Class\\SDMemory_Class"
"MountAsBootable"=dword:1
"MountAsROM"=dword:1



[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory\FATFS]
"Flags"=dword:14
"MountAsBootable"=dword:1
"MountAsROM"=dword:1
"MountAsRoot"=dword:1
"AutoFormat"=dword:1
"AutoPart" =dword:1
"AutoMount"=dword:1
"BootPhase"=dword:0

; END HIVE BOOT SECTION

...全文
677 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jiereliyi 2016-05-28
  • 打赏
  • 举报
回复
是不是支持SD卡启动的处理器才可以支持HIVE放在sD卡 比如s5pV210
  • 打赏
  • 举报
回复
用sd卡启动吧,不然系统启动的时候,你的sd卡驱动还没起来吧。
91program 2016-05-27
  • 打赏
  • 举报
回复
这个问题,只从注册表,或者系统配置来修改个人认为肯定是不行的。 因为 SD 卡的驱动加载本身就比较晚,再加上识别的过程,真的可能赶上 HIVE 注册表操作的速度。 可能需要硬件 + 驱动一齐修改才能满足要求。
jiereliyi 2016-05-27
  • 打赏
  • 举报
回复
因为装载hive注册表的时候SD卡还没有挂载,系统自动建了一个“SDCard”的文件夹用来保存hive,当SD卡挂载后SD卡名称为SDCard2。如果设置可以让SD卡挂载在hive装载之前呢
jiereliyi 2016-05-27
  • 打赏
  • 举报
回复
SDSetCardInterfaceForSlot - HC ClockRate differs desired setting: desired: 100000 Hz, Actual : 195312 Hz GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05 GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05 GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05 GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05 GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01 GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01 GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01 GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT) SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01 FSREG: Invalid HKEY 0xd0130390 FSREG: Invalid HKEY 0xd0130390 SDBusDriver: The SDIO card does not support block mode. Use Soft-Block instead. HandleAddDevice: LoadDevice type = 2, slot 0DEVICE!RegReadActivationValues RegQueryValueEx(\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\BusPrefix) returned 2 SDMemory: +SMC_Init SDGetDeviceHandle: ActivePath: Drivers\Active\4294967283 SDGetClientFunctions: +Init SDGetClientFunctions: -Init SDMemCalcDataAccessClocks: Tpd:f ns, Asynch: f ns, AsyncClocks:0 , SyncClocks: 1078198272, ReadTotal: 0, Write Factor: 1098060496 WriteTotal: 500000 SDMemory: Initialize: Using block transfer size of 64 blocks SDMemory: Idle Timeout: 2000 Idle Power State: 2 SDMemory: Power Management Setup complete SDMemory: -SMC_Init DeviceFolder::LoadDevice(\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class) last 142 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Notify\BusPrefix) returned 2 FSDMGR!MountStore: Attaching new storage device "DSK1:"SDMemory: GetDeviceInfo - Profile = SDMemory, length = 18 FSDMGR!StoreDisk_t::OpenDisk(0xD00E1650) DeviceInfo Class(0x00000001) Flags(0x00000001) Type(0xA0000000) Profile(SDMemory) SDMemory: GetStorageID Insufficient buffer space SDMemory: -GetStorageID FSDMGR!DumpRegKey: Dumping registry for key System\StorageManager\Profiles AutoMount = 00000001 AutoPart = 00000000 AutoFormat = 00000000 MountFlags = 00000000 DefaultFileSystem = PartitionDriverName = MSPART Folder = Mounted Volume ActivityEvent = PowerManager/ActivityTimer/SystemActivity FSDMGR!DumpRegKey: Dumping registry for key SDMemory Name = SD Memory Card Folder = SDCard AutoFormat = 00000000 AutoMount = 00000001 AutoPart = 00000000 BootPhase = 00000000 DefaultFileSystem = FATFS Order = 00000000 DriverPath = Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class MountAsBootable = 00000001 MountAsROM = 00000001 FSDMGR!LoadPartitionDriver: Loading partition driver mspart.dll hModule=83DA0F3C FSDMGR!StoreDisk_t::MountStore: Opened the store "DSK1:" hStore=0xD00E2270 FSDMGR!StoreDisk_t::MountStore: Geometry: NumSec=3885056 BytesPerSec=512 FreeSec=0 BiggestCreatable=0 Partition Part00 NumSectors=3884925 MSPART!PD_OpenPartition: dwStoreId=D00E2270, PartName=Part00 FSDMGR!StoreDisk_t::LoadPartition: mounting partition "Part00" on store "DSK1:"FSDMGR!ParitionDisk::LoadPartition: Partition Type 0x06 --> "FATFS" FSDMGR!ParitionDisk::MountPartition: "FATFS" --> exfat.dll udevice.exe $udevice_0003 FSD_MountDisk: Mounting volume for hDsk=D00E25B0 FATFS!ReadRegistryValues: Registry flags = 0x14 FATFS!ReadRegistryValues: Force write through disabled FATFS!ReadRegistryValues: Automatic formatting enabled FATFS!ReadRegistryValues: Transact data disabled FATFS!ReadRegistryValues: Security Support disabled CreateCache: Successful. Cache Size: 119 KB, Start: 4, End: 479, CreateFlags: 0. CreateCache: Successful. Cache Size: 238 KB, Start: 480, End: 3884924, CreateFlags: 0. FSDMGR!MountTable_t::RegisterVolumeName: Registered "$udevice_0003" at index 7APISCreateAPIHandle: pvData == NULL FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 7 (Name="$udevice_0003", MountFlags=0x101)FSDMGR!MountTable_t::RegisterVolumeName: Registered "SDCard2" at index 8FSDMGR!RegisterVolume: WARNING: AFS_FLAG_ROOTFS MountFlag ignored; a root file system is already mounted.FSDMGR!RegisterVolume: WARNING: AFS_FLAG_BOOTABLE MountFlag ignored; a boot file system is already mounted.FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 8 (Name="SDCard2", MountFlags=0x10)FSDMGR!MountedVolume_t::InstallFilter: Loading f[NOTIFY] Module loaded ilter "cachefilt.dll" from key "System\StorageManager\FATFS\Filters\CacheFilt" [NOTIFY] Initializing. DB:OpenDB fail: DB DB_notify_queue not found DB:OpenDB fail: DB DB_notify_events not found [NOTIFY] Initialization completed successfully [NOTIFY] ProcessDatabase::started at local time 05/27/2016 13:29:45 [NOTIFY] HandleSystemEvent 7 /ADD DSK1: [NOTIFY] HandleSystemEvent 7 /ADD NFY0: CACHEFILT:DllMain, Attach process ID=0x00400002 CACHEFILT:CacheViewPool_t::Init, Pool VM Addr=0xd0500000 Size=0x02000000 CACHEFILT:HookVolume, hDsk=0xd00e42b0 pHook=0xd00e2a98 CACHEFILT: pVolume=0xd04f02f0 in write-back mode, prio=255 timeout=5000 FATFS!RegisterVolume: Mounted volume HVOL=0x01650003 at "SDCard2" FATFS!MountVolume: Successfully mounted regular FAT16 volume.
jiereliyi 2016-05-27
  • 打赏
  • 举报
回复
调试信息输出: Start Windows CE...;Windows CE Kernel for ARM (Thumb Enabled) Built on Jan 21 2009 at 18:03:00 ProcessorType=0920 Revision=0 OEMAddressTable = 802010b4 +OEMInit DCache: 8 sets, 64 ways, 32 line size, 16384 size ICache: 8 sets, 64 ways, 32 line size, 16384 size -OEMInit Setting up softlog at 0x83dfc000 for 0x800 entries Booting Windows CE version 6.00 for (ARM) &pTOC = 8200ac1c, pTOC = 81c4eb2c, pTOC->ulRamFree = 8200f000, MemForPT = 00001000 Old or invalid version stamp in kernel structures - starting clean! Configuring: Primary pages: 7655, Secondary pages: 0, Filesystem pages = 1435 Booting kernel with clean memory configuration: Memory Sections: [0] : start: 82011000, extension: 00004000, length: 01de7000 NKStartup done, starting up kernel. Windows CE KernelInit Reserve VM for kernel XIP DLls, first = c0010000, last = c0f00000 g_pprcNK == 0x82008aa0 Updated eptr->e32_vsize to = 000cc000 Initializing Memory Mapped File Support Scheduling the first thread. Detecting VFP... VFP Not Found! LoaderInit: Initialing loader Updated eptr->e32_vsize to = 000cc000 Updated eptr->e32_vsize to = 000a2000 PGPOOL: Reserved 768 pages for Loader pool PGPOOL: Reserved 256 pages for File pool Message Queue support initialized, g_hMsgQHeap = d0080010 FSDMGR!DllMain: DLL_PROCESS_ATTACH CertMod.dll not found, using old OEM Trust Model FileSystem Starting - starting with clean file system FSDMGR!STOREMGR_Initialize FSDMGR!InitializeStoreAPI FSDMGR!MountTable_t::RegisterVolumeName: Registered "StoreMgr" at index 2FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 2 (Name="StoreMgr", MountFlags=0x1)FSDMGR!InitializeROMFileSystem: File System=ROM FSDMGR!MountTable_t::RegisterVolumeName: Registered "ROM" at index 3FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 3 (Name="ROM", MountFlags=0x71)FSVOL: Opening existing volume FSVOL: Volume heap already initialized FSREG: Mounted ROM portion of boot registry FSVOL: Creating clean virtual volume FSVOL: Initializing volume heap FSREG: Mounted RAM portion of boot registry FS: Creating signal event SYSTEM/DevMgrApiSetReady FS: Creating signal event SYSTEM/PowerManagerReady FS: Creating signal event SYSTEM/GweApiSetReady FILESYS: Starting boot phase 0. FSDMGR!STOREMGR_StartBootPhase BootPhase=0 (PrevBootPhase=-1) FSDMGR: File security disabled. FSDMGR!AutoLoadFileSystems: CurrentBootPhase=0, LoadFlags=1 FSDMGR!AutoLoadFileSystem: CurrentBootPhase=0, RootKey=System\StorageManager\AutoLoad, FileSystem_t=ObjectStore FILESYS: RAM File System FSD_MountDisk registering folder "Object Store" FSDMGR!MountTable_t::RegisterVolumeName: Registered "Object Store" at index 4FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 4 (Name="", MountFlags=0x46)FSDMGR!AutoLoadFileSystem: CurrentBootPhase=0, RootKey=System\StorageManager\AutoLoad, FileSystem_t=SDMemory FSDMGR!AutoLoadBlockDevice: Auto-loading block driver from "Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class"FSDMGR!MountStore: Failed opening new store "SDMemory"; error=4319 FSDMGR!StoreDisk_t::~StoreDisk_t: deleting store (D00452F0)FSDMGR!AutoLoadFileSystems: Unable to auto-load HKLM\System\StorageManager\AutoLoad\SDMemory; error=4319FILESYS: Starting boot phase 1. FSDMGR!STOREMGR_StartBootPhase BootPhase=1 (PrevBooFSDMGR!PNPThread: Using PNPUnloadDelay of 4096 FSDMGR!PNPThread: PNPThread starting! tPhase=0) FSDMGR!AutoLoadFileSystems: CurrentBootPhase=1, LoadFlags=1 FILESYS: Starting device and waiting for boot file system. *** DLL_PROCESS_ATTACH - Current Process: 0x42, ID: 0x400002 *** Filesys: Loaded device.dll FILESYS: Waiting for device manager to signal BootPhase1 completion. +InitDeviceFileSystems FSDMGR!MountTable_t::RegisterVolumeName: Registered "$device" at index 5FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 5 (Name="$device", MountFlags=0x1)FSDMGR!MountTable_t::RegisterVolumeName: Registered "$bus" at index 6FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 6 (Name="$bus", MountFlags=0x1)-InitDeviceFileSystems: status is 1 Ceddk!CalibrateStallCounter: Enter Ceddk!CalibrateStallCounter: Could not find stall counter Ceddk!BeginCalibration: min(1001) max(1112) Ceddk!BeginCalibration: Elapsed is 1091 Ceddk!BeginCalibration: Delay is 21 DEVICE!DevloadInit DEVICE!InitDevices: Root Key is Drivers\BuiltIn. DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\Prefix) returned 2 DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\BusPrefix) returned 2 DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\SDBusDriver\BusPrefix) returned 2 SDBusDriver: PROCESS_ATTACH SDBusDriver: +SDC_Init SDBusDriver: Bus Driver instance created : 0xD0048590 ! -SDC_Init DeviceFolder::LoadDevice(Drivers\BuiltIn\SDBusDriver) last 45 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\SDHC_SMDK2440\BusPrefix) returned 2 SDHCDGetHCFunctions: +Init SDHCDGetHCFunctions: -Init SDHC +Init SDHCDInitialize starts GPIO registers mapped to d0330000 SDI control registers mapped to d0340000 Clock & Power Management Special Register mapped to d0350000 DMA Register mapped to d0360000 SDHCDInitialize ends SDHC -Init DeviceFolder::LoadDevice(Drivers\BuiltIn\SDHC_SMDK2440) last 72 TicksDEVICE!RegReadActivationValues RegOpenKeyEx(Notify) returned 2. DEVICE!I_ActivateDeviceEx: can't find all required activation values in 'Notify' DEVICE!RegReadActivationValues RegOpenKeyEx(Notify) returned 2. DEVICE!I_ActivateDeviceEx: can't find all required activation values in 'Notify' FILESYS: Waiting for bootable file system to be mounted. FILESYS: Device started. Boot file system ready. FSREG: Unable to read value "SystemHiveInitialSize" under HKEY_LOCAL_MACHINE\init\BootVars FSVOL: Opening existing volume FSVOL: Volume heap already initialized FSREG: Mounted ROM portion of system hive FILESYS: Loading system hive from \SDCard\system.hv. FSREG: Mounting clean system hive BuildPath: SDCard FSVOL: Creating new volume (size=28672 bytes) FSVOL: Initializing volume heap FSREG: Taking down boot registry. Any open keys will be invalid. FILESYS: Registry in place.

19,502

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧