Hello,
I have a problem with hive based registry in my platform.... i made a
block driver ( over spi for SD/MMC card's) and it is work's fine i can
see files on disk... copy paste and so on... now i try to add support
to hive based registry and have a problem with it... before it i make
hive based support with using FMD driver for internal flash but now my
board do not have flash ( i have only little spi flash for boot loader
and make wince image loader to boot it directrly from MMC/SD card and
it is work's too )
1) Block driver is working without hive based support....
2) With hive support board do not boot but it is create all needed
file's for hive on my sd card ( i can see and read it with card reader
on my PC ):
\Documents and Settings\default\user.hv
\system.hv
3) Setting's for hive ( not so clean now... becourse i do some
experements :) ) :
[SETTINGS]
; HIVE BOOT SECTION
;;;*******************************************************************
;;;
;;; HIVE REGISTRY BOOT SECTION
;;;
;;;*******************************************************************
[HKEY_LOCAL_MACHINE\init\BootVars]
"Start DevMgr"=dword:1
"Flags"=dword:3
"SystemHive"="system.hv"
"DefaultUser"="zeo"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MmcBlockDriver]
"Flags"=dword:1000
"BootPhase"=dword:1
"Dll"="mmcblockdriver.dll"
"Prefix"="DSK"
"DeviceId"=dword:0
"Ioctl"=dword:4
"Profile"="MMCSPI"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{A32942B7-920C-486b-B0E6-92A702A99B35}"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMCSPI]
"Name"="MMCSD SPI"
"Folder"="SDCard"
"AutoMount"=dword:1
"AutoPart"=dword:1
"AutoFormat"=dword:1
"MountFlags"=dword:46 ; Permanent | Root | Bootable
[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\MMCSPI]
"DriverPath"="Drivers\\BuiltIn\\MmcBlockDriver"
; LoadFlags 0x01 == load synchronously
"LoadFlags"=dword:1
"Order"=dword:0
"BootPhase"=dword:1
; END HIVE BOOT SECTION
[END]
4) Boot log:
[STARTBOOT]
x83fc70cc: FileSystem Starting - starting with clean file system
0x83fc70cc: FS: initializing ROM/RAM file system
0x83fc70cc: SC_CreateAPIHandle: pvData == NULL
0x83fc70cc: FS: Registering file system ROM, index 2, flags 0x00000031
0x83fc70cc: FS: Mount complete (ROM, index 2, flags 0x00000031)
0x83fc70cc: FSVOL: Opening existing volume
0x83fc70cc: FSVOL: Volume heap already initialized
0x83fc70cc: FSREG: Mounted ROM portion of boot registry
0x83fc70cc: FSVOL: Creating clean virtual volume
0x83fc70cc: FSVOL: Initializing volume heap
0x83fc70cc: FSREG: Mounted RAM portion of boot registry
0x83fc70cc: FS: Creating signal event SYSTEM/DevMgrApiSetReady
0x83fc70cc: FS: Creating signal event SYSTEM/PowerManagerReady
0x83fc70cc: FS: Creating signal event SYSTEM/GweApiSetReady
0x83fc70cc: FILESYS: Starting storage manager.
0x83fc70cc: FS: Registering file system StoreMgr, index 3, flags
0x00000001
0x83fc70cc: InitSharedHeap: 44200000 10000 c
0x83fc70cc: InitSharedHeap: return 44200060
0x83fc70cc: FILESYS: Restarting storage manager.
0x83fc70cc: INFO: MMC BLOCK DllMain
0x83fc70cc: INFO: MMC BLOCK DSK_Init
0x83fc70cc: INFO: SPI_CR0 000000C7
0x83fc70cc: INFO: vinf->byte_size 510132224, vinf->read_bl_len 9,
vinf->c_mult
6, vinf->c_size 3891
0x83fc70cc: INFO: MMC BLOCK DSK_Open
0x83fc70cc: INFO: IOCTL_DISK_DEVICE_INFO
0x83fc70cc: Loading partition driver mspart.dll hModule=83F9531C
0x83fc70cc: Driver mspart.dll loaded
0x83fc70cc: Opened the store hStore=000C2E20
0x83fc70cc: NumSec=996352 BytesPerSec=512 FreeSec=0 BiggestCreatable=0
0x83fc70cc: Partition Part00 NumSectors=996117
0x83fc70cc: MSPART!PD_OpenPartition: dwStoreId=000C2E20,
PartName=Part00
0x83fc70
cc: FSD_MountDisk: mounting volumes for hDsk=000C42E0
0x83fc70cc: INFO: IOCTL_DISK_DEVICE_INFO
0x83fc70cc: FATFS!MountDisk: BPB_HiddenSectors(235) != 0
0x83fc70cc: FATFS!OpenVolume: access time updates disabled
0x83fc70cc: FATFS!OpenVolume: event logging enabled
0x83fc70cc: FATFS!OpenVolume: automatic scanning disabled
0x83fc70cc: FATFS!OpenVolume: write verify disabled
0x83fc70cc: FATFS!OpenVolume: extra FAT on format disabled
0x83fc70cc: FATFS!OpenVolume: force write through enabled
0x83fc70cc: FATFS!OpenVolume: Codepage = 1
0x83fc70cc: FATFS!OpenVolume: Number of path cache entries = 50
0x83fc70cc: CreateCache: Successful. Cache Size: 122 KB, Start: 8,
End: 495.
0x83fc70cc: CreateCache: Successful. Cache Size: 244 KB, Start: 496,
End: 99611
6.
0x83fc70cc: FATFS!InitVolume: FAT version: 16
0x83fc70cc: FATFS!InitVolume: Cluster Size (Sectors): 16
0x83fc70cc: FATFS!InitVolume: TFAT enabled: FALSE
0x83fc70cc: FS: Registering file system SDCard, index 4, flags
0x00000042
0x83fc70cc: FS: Mount complete (SDCard, index 4, flags 0x00000042)
0x83fc70cc: FILESYS: Starting device and waiting for boot file system.
0x83f80a38: InitSharedHeap: 44200000 0 c
0x83f80a38: InitSharedHeap: return 44200060
0x83f80a38: *** DLL_PROCESS_ATTACH - Current Process: 0x42, ID:
0xe3f80c9e ***
0x83f80a38: +InitDeviceFileSystems
0x83f80a38: FS: Registering file system $device, index 5, flags
0x00000001
0x83f80a38: FS: Registering file system $bus, index 6, flags
0x00000001
0x83f80a38: -InitDeviceFileSystems: status is 1
0x83f80a38: Ceddk!CalibrateStallCounter: Enter
0x83f80a38: Ceddk!CalibrateStallCounter: Could not find stall counter
0x83fc70cc: FS: Waiting for device to signal BootPhase1 completion
0x83f80a38: Ceddk!BeginCalibration: min(984) max(1093)
0x83f80a38: Ceddk!BeginCalibration: Elapsed is 1024
0x83f80a38: Ceddk!BeginCalibration: Delay is 8
0x83f80a38: DEVICE!DevloadInit
0x83f80a38: DEVICE!InitDevices: Root Key is Drivers\BuiltIn.
0x83f80a38: DEVICE!RegReadActivationValues RegQueryValueEx(Drivers
\BuiltIn\Prefi
x) returned 2
0x83f80a38: DEVICE!RegReadActivationValues RegQueryValueEx(Drivers
\BuiltIn\BusPr
efix) returned 2
0x83f80a38: DEVICE!RegReadActivationValues RegQueryValueEx(Drivers
\BuiltIn\MmcBl
ockDriver\BusPrefix) returned 2
0x83fc70cc: FILESYS: Device started. Boot file system ready.
0x83fc70cc: FSREG: Unable to read value "SystemHiveInitialSize" under
HKEY_LOCAL
_MACHINE\init\BootVars
0x83fc70cc: FSVOL: Opening existing volume
0x83fc70cc: FSVOL: Volume heap already initialized
0x83fc70cc: FSREG: Mounted ROM portion of system hive
0x83fc70cc: FILESYS: Loading system hive from SDCard\system.hv.
0x83fc70cc: FATFS!FAT_CreateFileW(\system.hv) returned 0x0 (2)
0x83fc70cc: FSREG: Mounting clean system hive
0x83fc70cc: BuildPath: SDCard
0x83fc70cc: FATFS!FAT_CreateDirectoryW(1 chars: \) returned FALSE
(183)
0x83fc70cc: FATFS!FAT_CreateFileW(\system.hv) returned 0x0 (2)
0x83fc70cc: FSVOL: Creating new volume (size=49152 bytes)
0x83fc70cc: FATFS!FAT_ReadFileWithSeek: driver declines to demand-page
'SYSTEM
HV '
0x83fc70cc: Failing CreateMap on non-pageable file system
0x83fc70cc: ERROR: c:\macallan\private\winceos\coreos\filesys\heap
\heap.c line 4
54: 0x83fc70cc: CreateFileMapping failed: 50
0x83fc70cc: FSVOL: Failure in FSMapMemory
0x83fc70cc: ERROR: d:\macallan\private\winceos\coreos\filesys\reg
\reghive\regist
ry.c line 1014: 0x83fc70cc: FSREG: Unable to mount clean system hive
0x83fc70cc: FSREG: Unable to load system registry! Registry will be
unavailable
.
0x83fc70cc: FileSys: DEBUGCHK failed in file d:\macallan\private
\winceos\coreos\
filesys\reg\reghive\registry.c at line 1074
0x83fc70cc: DEBUG_BREAK @00046710 MD=1f Ignored.
0x83fc70cc: FSREG: Unable to read value "RegistryFlags" under
HKEY_LOCAL_MACHINE
\init\BootVars
0x83fc70cc: FSREG: Unable to read value "NoDefaultUser" under
HKEY_LOCAL_MACHINE
\init\BootVars
0x83fc70cc: FSREG: Logging in default user.
0x83fc70cc: FSREG: Unable to read value "DefaultUser" under
HKEY_LOCAL_MACHINE\i
nit\BootVars
0x83fc70cc: SetCurrentUser: Logging out (nobody), logging in default
0x83fc70cc: BuildPath: SDCard
0x83fc70cc: FATFS!FAT_CreateDirectoryW(1 chars: \) returned FALSE
(183)
0x83fc70cc: BuildPath: SDCard\Documents and Settings
0x83fc70cc: BuildPath: SDCard\Documents and Settings\default
0x83fc70cc: FSREG: Mounting ROM portion of user hive
0x83fc70cc: FSVOL: Opening existing volume
0x83fc70cc: FSVOL: Volume heap already initialized
0x83fc70cc: Mounting user hive from SDCard\Documents and Settings
\default\user.h
v
0x83fc70cc: FATFS!FAT_CreateFileW(\Documents and Settings\default
\user.hv) retur
ned 0x0 (2)
0x83fc70cc: FSREG: Mounting clean user hive
0x83fc70cc: FATFS!FAT_CreateFileW(\Documents and Settings\default
\user.hv) retur
ned 0x0 (2)
0x83fc70cc: FSVOL: Creating new volume (size=49152 bytes)
0x83fc70cc: FATFS!FAT_ReadFileWithSeek: driver declines to demand-page
'USER
HV '
0x83fc70cc: Failing CreateMap on non-pageable file system
0x83fc70cc: ERROR: c:\macallan\private\winceos\coreos\filesys\heap
\heap.c line 4
54: 0x83fc70cc: CreateFileMapping failed: 50
0x83fc70cc: FSVOL: Failure in FSMapMemory
0x83fc70cc: SetCurrentUser failed!
0x83fc70cc: FSREG: Unable to read value "RegistryFlags" under
HKEY_LOCAL_MACHINE
\init\BootVars
0x83fc70cc: FSREG: Unable to read value "DBFlags" under
HKEY_LOCAL_MACHINE\init\
BootVars
0x83fc70cc:
Initializing Database
0x83fc70cc: DB:Validation: Name already exists DB_notify_events
0x83fc70cc: DB:CeCreateDatabase failed
0x83fc70cc: Filesystem initialized!
0x83fc70cc: FILESYS: Waiting for kernel to be ready to launch apps
0x83fcaa40: InitMUI: DISABLED (-1039860968)
0x83fc70cc: FS: HKLM\System\Events not available, no signal events
created.
0x83fc70cc: FILESYS: Launching apps
0x83fc70cc: ERROR: d:\macallan\private\winceos\coreos\filesys\main
\fsmain.c line
4103: 0x83fc70cc: Unable to locate init key for starting apps!
0x83fc70cc: FILESYS: Done launching apps
0x83fc70cc: -DEVICE!DevloadPostInit
0x83fc70cc: This device has booted 0 times !!!
[END]
I can undestand why it does not working.... i see already in group
something problem like mine.. but i see also with no success with
it.... maybe problem with this: "Failing CreateMap on non-pageable
file system" ... and i need to make this possobilites in my driver...
maybe anyone already know about this problem?
Tnx