huminan
驱动牛犊
驱动牛犊
  • 注册日期2003-01-07
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2767回复:3

4.2下HIVE-based Resgistry实现的问题

楼主#
更多 发布于:2003-12-03 14:06
4.2下我照帮助添加了HIVE-based Registry,设置了环境变量,修改了[HKEY_LOCAL_MACHINE\\init\\BootVars]下面的设置,但是我的系统起不来。我用flash来存储HIVE,因为我没有专门的外部存储器。除了上面的设置外,还要做哪些修改???
huminan
驱动牛犊
驱动牛犊
  • 注册日期2003-01-07
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-12-03 16:04
下面是我的串口打出的消息:
>>> Loading module NK.EXE at address 0x800B8000-0x80166000 (RW data at 0x81376000-0x813E4A4B)
0x83cb7024: first = 01f40000, last = 02000000, SharedDllBase = 02e80000
0x83cb7024: >>> Loading module coredll.dll at address 0x03F10000-0x03FF6000 (RW data at 0x01FFF000-0x01FFFFD0)
0x83ca48c0: >>> Loading module filesys.exe at address 0x04010000-0x0408C000
0x83ca48c0: FileSystem Starting - starting with clean file system
0x83ca48c0: FSVOL: Opening existing volume
0x83ca48c0: FSVOL: Volume heap already initialized
0x83ca48c0: FSVOL: Initializing volume heap
0x83ca48c0: >>> Loading module fsdmgr.dll at address 0x03D30000-0x03D4C000 (RW data at 0x01FE1000-0x01FE1754)
0x83ca48c0: InitSharedHeap: 46200000 10000 c
0x83ca48c0:   InitSharedHeap: return 46200050
0x83ca48c0: >>> Loading module relfsd.dll at address 0x03E80000-0x03E8B000 (RW data at 0x01FF4000-0x01FF4ABC)
0x83c6e184: InitSharedHeap: 46200000 0 c
0x83c6e184:   InitSharedHeap: return 46200050
0x83c6e184: >>> Loading module pm.dll at address 0x03EE0000-0x03EFD000 (RW data at 0x01FFB000-0x01FFB6C4)
0x83c6e184: *** Power Manager: DLL_PROCESS_ATTACH - Current Process: 0x42, ID: 0x83c6e3e6 ***
0x83c6e184: >>> Loading module device.exe at address 0x06010000-0x06020000
0x83c6e184: >>> Loading module ceddk.dll at address 0x03D10000-0x03D16000 (RW data at 0x01FDD000-0x01FDD068)
0x83c6e184: Ceddk!CalibrateStallCounter: Enter
0x83c6e184: Ceddk!CalibrateStallCounter: Could not find stall counter
0x83c6e184: Ceddk!BeginCalibration: min(368) max(460)
0x83c6e184: Ceddk!BeginCalibration: elapsed is 432
0x83c6e184: Ceddk!BeginCalibration: delay is 22
0x83c6e184: +PmInit
0x83c6e184: +PlatformValidatePMRegistry
0x83c6e184: -PlatformValidatePMRegistry: returning 0
0x83c6e184: DeviceListsInit: default GUID found in registry as expected
0x83c6e184: DeviceListCreate: creating list entry for class 8dd679ce-8ab4-43c8-a14a-ea4963faa715
0x83c6e184: PlatformDeviceListInit: using stream interface to access class 8dd679ce-8ab4-43c8-a14a-ea4963faa715
0x83c6e184: DeviceListCreate: creating list entry for class 98c5250d-c29a-4985-ae5f-afe5367e5006
0x83c6e184: PlatformDeviceListInit: using stream interface to access class 98c5250d-c29a-4985-ae5f-afe5367e5006
0x83c6e184: DeviceListCreate: creating list entry for class eb91c7c9-8bf6-4a2d-9ab8-69724eed97d1
0x83c6e184: PlatformDeviceListInit: using display interface to access class eb91c7c9-8bf6-4a2d-9ab8-69724eed97d1
0x83c6e184: InitDisplayDeviceInterface: returning 1
0x83c6e184: DeviceListCreate: creating list entry for class a32942b7-920c-486b-b0e6-92a702a99b35
0x83c6e184: PlatformDeviceListInit: using stream interface to access class a32942b7-920c-486b-b0e6-92a702a99b35
0x83c5d424: +PnpThreadProc: thread 0x03c5d662
0x83c5da94: +ResumeThreadProc: thread 0x03c5dcd2
0x83c59400: +ActivityTimersThreadProc: thread 0x03c5dfb2
0x83c59400: ActivityTimerCreate: ActivityTimerCreate(\'UserActivity\') returning 0x00000000
0x83c59400: ActivityTimerCreate: ActivityTimerCreate(\'SystemActivity\') returning 0x00000000
0x83c57628: +SystemThreadProc: thread 0xe3c5df7e
0x83c57628: +PlatformManageSystemPower
0x83c57628: PlatformPMActivelyManagesPower: returning 1
0x83c57628: PlatformManageSystemPower: waiting for initialization to complete
0x83c57d4c: +BatteryMonitorThreadProc: thread 0xe3c596f2
0x83c57d4c: BatteryMonitorThreadProc: battery interface APIs not available, exiting
0x83c57d4c: -BatteryMonitorThreadProc: exiting
0x83c6e184: -PmInit: returning 1
0x83c57628: PlatformManageSystemPower: initialization complete
0x83c57628: PlatformLoadTimeouts: ACUserIdle 60000, ACSystemIdle 300000, ACSuspend -1, BattUserIdle 60000, BattSystemIdle 180000, BattSuspend 300000
0x83c6e184: DEVICE!DevloadInit
0x83c6e184: DEVICE!InitDevices: Root Key is Drivers\\BuiltIn.
0x83c6e184: DEVICE!ActivateDeviceEx(Drivers\\BuiltIn) entered
0x83c6e184: >>> Loading module regenum.dll at address 0x03F00000-0x03F07000 (RW data at 0x01FFD000-0x01FFD4A4)
cczmm
驱动牛犊
驱动牛犊
  • 注册日期2003-10-15
  • 最后登录2004-07-02
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2003-12-15 13:18
看看帮助,里面有详细介绍。
xing_xin
驱动牛犊
驱动牛犊
  • 注册日期2004-08-02
  • 最后登录2008-05-14
  • 粉丝0
  • 关注0
  • 积分30分
  • 威望3点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
地板#
发布于:2005-01-31 14:51
我遇倒过这样的提示。可能是得从common.reg中抄点东东过来。我刚写了个笔记,参考一下吧。英文的,给客户用的。

Howto use hive-based registry on CF/HDD.

Howto use hive-based registry on HDD.

1. Add HDD support to platform and verify it works with ram-based registry.
2. Add hive-based registry catalog entry to platform.
3. Modify registry file plagform.reg:
3.1 Verify the following registry settings in the Platform.reg file.

[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="Documents and Settings\\system.hv"
"PROFILEDIR"="Documents and Settings"
"Start DevMgr"=dword:1
"DefaultUser"="default"

SystemHive is the location and name of the system hive file. Do not include
the name of the file system on which the file will be stored; the system will
decide which file system to use based on other registry settings. Typically,
this is a simple location such as "Documents and Settings\System.hv" or
"System.hv".

Start DevMgr is a Boolean value indicating whether or not to start the Device
Manager so it can start the drivers necessary to reach the registry hives. A
value of 1 causes the Device Manager to start; 0 keeps the Device Manager from
starting. The only case in which the Device Manager should not start is if you
want to store the hives in the object store, which causes the hives to be lost
on a cold boot. Typically, the hives are stored outside RAM, so it is necessary
to start the Device Manager.

The value of DefaultUser, a REG_SZ value in HKEY_LOCAL_MACHINE\init\BootVars,
determines the default user hive to load. DefaultUser is set to the name of the
user to use as the default profile when the system boots. If it is an existing
user, the appropriate user hive is loaded. If it is a new user, the user profile
is created.

3.2 Verify that all registry entries necessary for starting drivers in the first boot
phase are wrapped in the comments. These drivers are used to access the persistent
file system where the hives are stored. The following code example shows typical
comments. And don't forget to place the above section, 3.1, in also.

; HIVE BOOT SECTION
<your registry settings>
; END HIVE BOOT SECTION

These tags are commands that tell the ROM registry builder to add the entries to
the boot hive.

3.3 Set the following flag bit on each driver that is loaded during the first boot
phase.

[HKEY_LOCAL_MACHINE\Drivers\...]
   "Flags"=dword:1000
   
For Cirrus's EP931x board, the setting is like bellow.
 
; HIVE BOOT SECTION

IF BSP_EP931X_ATAPI
; Master IDE Hard Drive
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Ep931xAtapi00]
"Flags"=dword:1000

; Slave CD ROM Drive
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Ep931xAtapi01]
"Flags"=dword:1000

; Only Flags related parts are listed here!!! Other parts are omitted!!!
ENDIF

; END HIVE BOOT SECTION

The flags are a bitmask to OR with any existing settings. This flag tells the
Device Manager to load your driver in the first boot phase with the boot registry,
and not to load it a second time in the second boot phase with the system registry.
It prevents the driver from being started twice.

If this value is missed, there will be two sets of folders for each hard disk. For
example one hard disk with only one partition. After CE starts up, there will be two
folders for the hard disk, "hard disk" and "hard disk1". Both of them could be
accessed separately.

3.4 Set the MountFlags registry value equal to DWORD:2. Set this value on the Storage
Manager profile of the file system driver for the medium that contains the registry.
This indicates that the file system contains the following registry key.

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\<ProfileName>\<FileSystemName>]
   "MountFlags"=dword:2
   
For hard disk, copy the following lines from common.reg and add one line mentioned
above.

; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
   "Name"="IDE Hard Disk Drive"
   "Folder"=LOC_STORE_HD_FOLDER
"MountFlags"=dword:2
; END HIVE BOOT SECTION

3.5 You can use aggressive flushing in the registry. With aggressive flushing,
RegFlushKey is called every time RegCloseKey is called. The following registry
key shows how to enable aggressive flushing:

[HKEY_LOCAL_MACHINE\init\BootVars]
   "RegistryFlags"=dword:1
   
Setting the RegistryFlags value equal to one enables aggressive flushing.
If this registry value is not present or is set to zero, the registry flushes
nondeterministically. For more information on nondeterministic registry
flushing, see Nondeterministic Registry Flushing.

The RegistryFlags value is read only once during boot time, and is not read
again until a reboot. Therefore, you cannot toggle the aggressive flushing
functionality. When aggressive flushing is on, the semantics do not start
until all processes in the initialization sequence have started. These
delayed effects attempt to avoid adversely affecting the boot speed. This
assumes that registry settings written during boot time are likely to apply
only to the current device state, and therefore would not require the same
level of permanence that most registry settings need.

If the flush fails, for example, due to an out-of-disk error, the key is
still closed. In that case, RegCloseKey returns the error resulting from
the failed flush.

3.6 The boot registry in file platform.reg.


; HIVE BOOT SECTION

IF BSP_EP931X_ATAPI
;
; Master IDE Hard Drive
;
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Ep931xAtapi00]
   "Dll"="ep931xatapi.dll"
   "Prefix"="DSK"
   "DeviceId"=dword:0
   "UDMAEnable"=dword:0
   "BestUDMAMode"=dword:4
   "FSD"="fatfs.dll"
   "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Flags"=dword:1000

;
; Slave CD ROM Drive
;
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Ep931xAtapi01]
   "Dll"="ep931xatapi.dll"
   "Prefix"="DSK"
   "DeviceId"=dword:1
   "UDMAEnable"=dword:0
   "BestUDMAMode"=dword:2
   "FSD"="udfs.dll"
   "IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Flags"=dword:1000

IF CE_MODULES_ATAPI !

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
   "Name"="IDE Hard Disk Drive"
   "Folder"="Hard Disk"

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile\FATFS]
   "EnableCacheWarm"=dword:0

ENDIF

ENDIF

[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="Documents and Settings\\system.hv"
"PROFILEDIR"="Documents and Settings"
"Start DevMgr"=dword:1
"DefaultUser"="default"
"RegistryFlags"=dword:1

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
   "Name"="IDE Hard Disk Drive"
   "Folder"=LOC_STORE_HD_FOLDER
"MountFlags"=dword:2

; END HIVE BOOT SECTION

4. Rebuild the platform.


Howto use hive-based registry on CF card(PCMCIA).


1. Add HDD support to platform and verify it works with ram-based registry.
2. Add hive-based registry catalog entry to platform.
3. Modify registry file plagform.reg:
3.1 Verify the following registry settings in the Platform.reg file.

[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="Documents and Settings\\system.hv"
"PROFILEDIR"="Documents and Settings"
"Start DevMgr"=dword:1
"DefaultUser"="default"

3.2 Verify that all registry entries necessary for starting drivers in the first boot
phase are wrapped in the comments bellow.

; HIVE BOOT SECTION
<your registry settings>
; END HIVE BOOT SECTION

3.3 Set the following flag bit on each driver that is loaded during the first boot
phase.

[HKEY_LOCAL_MACHINE\Drivers\...]
   "Flags"=dword:1000
   
For Cirrus's EP931x board, the setting is like bellow.
 
; HIVE BOOT SECTION

IF BSP_EP931X_PCMCIA

; Copied from common.reg !!!
[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\ATADisk]
   "Dll"="ATADISK.DLL"
   "Prefix"="DSK"
   "Ioctl"=dword:4
   "Profile"="PCMCIA"
   ; Indicate we are a power manageable interface and a storage driver
   "IClass"=multi_sz:"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}","{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Flags"=dword:1000  

; Copied from common.reg !!!
[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\50]
  "Dll"="ATADISK.DLL"
  "Entry"="DetectATADisk"
"Flags"=dword:1000

[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\90]
"Flags"=dword:1000  

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCMCIA]
"Flags"=dword:1000

ENDIF

; END HIVE BOOT SECTION


3.4 Set the MountFlags registry value equal to DWORD:2.

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\<ProfileName>\<FileSystemName>]
   "MountFlags"=dword:2
   
For CF card, copy the following lines from common.reg and add one line mentioned
above.

; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\PCMCIA]
   "Name"="PCMCIA/Compact Flash Device"
   "Folder"="PCMCIA"   ;LOC_STORE_PCMCIA_FOLDER
"MountFlags"=dword:2
; END HIVE BOOT SECTION

3.5 You can use the following value in the registry to enable aggressive flushing:

[HKEY_LOCAL_MACHINE\init\BootVars]
   "RegistryFlags"=dword:1
   
3.6 The boot registry in file platform.reg.

; HIVE BOOT SECTION

; @CESYSGEN IF CE_MODULES_PCMCIA

IF BSP_EP931X_PCMCIA

[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\ATADisk]
   "Dll"="ATADISK.DLL"
   "Prefix"="DSK"
   "Ioctl"=dword:4
   "Profile"="PCMCIA"
   ; Indicate we are a power manageable interface and a storage driver
   "IClass"=multi_sz:"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}","{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Flags"=dword:1000  

[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\50]
  "Dll"="ATADISK.DLL"
  "Entry"="DetectATADisk"
"Flags"=dword:1000  


;[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\ATADisk]
; Use this to override the default name of the Storage Card.  Windows CE will use "Storage Card",
; "Storage Card2", "Storage Card3", etc. for the name(s).
;   "Folder"="PC Card Storage Card"

;HACK:
;HACK: Title: TrueFFS not working
;HACK:
;HACK: This takes the TrueFFS driver out of the registry (so we don't have to edit
;HACK: common.reg or cesysgen.bat). It is taken out because it doesn't work on
;HACK: the platform. Not sure what the problem is yet.  If this turns into a permanent
;HACK: workaround, probably want to modify cesysgen.bat.
;HACK:
[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\90]
  "Dll"=""
  "Entry"=""
"Flags"=dword:1000  

;
; Make sure the driver gets loaded. The PCMCIA driver opens its own key
; in HKLM\Drivers\PCMCIA to extract useful info so this key only needs to
; provide enough info to get the dll loaded at the right time. The GUID
; the IClass value is immutable and matches the one in cardserv.h.
;
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCMCIA]
  "Dll"="PCMCIA.dll"
  "Order"=dword:0
  "IClass"=multi_sz:"{6BEAB08A-8914-42fd-B33F-61968B9AAB32}=PCMCIA Card Services"
  "Flags"=dword:1000
ENDIF

; @CESYSGEN ENDIF CE_MODULES_PCMCIA
 
[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="Documents and Settings\\system.hv"
"PROFILEDIR"="Documents and Settings"
"Start DevMgr"=dword:1
"DefaultUser"="default"

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\PCMCIA]
   "Name"="PCMCIA/Compact Flash Device"
   "Folder"="PCMCIA"   ;LOC_STORE_PCMCIA_FOLDER
"MountFlags"=dword:2

; END HIVE BOOT SECTION

4. Rebuild the platform.
xing_xin
游客

返回顶部