Re: ROM-only FS and persisting registry on USB HD



If you could not find the root cause of EHCI loading failure, I will suggest
you have a debug version of OS Image and of course a debug build of EHCI
driver and step into the code to figure out how it failed.
Once you get EHCI loaded, you might be lucky enough to get the whole thing
working, but might be encounter another issue there. Cheers!
Are you using a PCI based EHCI controller?
If so, that makes thing kind of complexity...
While the EHCI driver should be loaded by PCI bus driver rather being a
Built-in driver (under BuiltIn key), that also implicitly indicate that your
PCI bus driver and its relative registry setting should be moved into BOOT
HIVE section so that the PCI Bus driver will be loaded in Boot Phase 1.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23wIzuT8UIHA.4880@xxxxxxxxxxxxxxxxxxxxxxx
Registry entries needed to get to the point of loading the media on which
the hive is stored must be in the

; HIVE BOOT SECTION
; END HIVE BOOT SECTION

comments in your registry. That's what those apparently useless things
are that you see laying around in reginit.ini. Items between these two
tags are incorporated into the boot registry which is stored in nk.bin and
used to get to the point where the actual registry can be loaded from the
hive. Therefore, you have to have your USB host controller's driver
settings, settings for the USB client driver for mass storage devices,
etc. in the boot registry so that the drive can be mounted and used. Most
of your stuff clearly is in the right place, if the system hive is being
created on your memory stick, but it appears that the EHCI driver is
missing a few of its needed settings, causing your boot to stop.

Paul T.

"Dusan Arsenijevic" <DusanArsenijevic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:5084BD7A-AEFD-4535-84C0-ACDFC75BBF6F@xxxxxxxxxxxxxxxx
Paul, thank you for the reply.

I get this:

5911 PID:400002 TID:b20002 EHCI86xx ERROR: PhysicalMemoryAddress or
PhysicalMemoryLength not found in registry

5911 PID:400002 TID:b20002 EHCI86xx ERROR: Driver can not be loaded

And later a lot of "Exception 'Access Violation'" stuff.

It seems that the EHCI error means that the driver expects some registry
values in order to load, but I assume that system tries to load it before
the
registry hive is copied to the usb disk. Could I be right? If so, then
what?



"Paul G. Tobey [eMVP]" wrote:

They actually can only appear once, although they might be in
reginit.ini
multiple times. The last value found there is the one that 'wins'. You
can
put the items in platform.reg or project.reg and that will take
precedence
over anything in any of the PUBLIC folders, including common.reg.
Documentation for the exact registry location for those flags is in the
help.

You actually would not expect everything to be copied to the 'hard disk'
when you're using the ROM-only filesystem. In fact, most of the things
in
nk.bin/Windows folder *can't* be copied to the hard disk because they're
not
really files but just execute-in-place pieces of code.

You might try this in a DEBUG build with all of the debug zones for
filesys.exe and device.exe turned on. That should give you some idea of
what's going on. At a guess, I'd say that there's an exception
occurring.
It may not even be related to the hive stuff.

Paul T.

"Dusan Arsenijevic" <DusanArsenijevic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in
message news:77AACC5D-20E1-4F9D-B8F3-F3085B7F51ED@xxxxxxxxxxxxxxxx
Thanks for your reply!

I have tried to implement the steps you described but I am still not
sure
about the details:
Where exactly should MountAsBootable and MountAsRoot be placed? Must
they
appear only once in registry?

At present my device hangs after some time into boot process. The LED
on
the
drive shows lots of activity but then becomes constantly lit without
audible
disk activity. When I plug the usb drive into PC I see that the
folders
have
been generated, registry hives are there, but the windows folder is
not
fully
populated.



"K. S. Huang" wrote:

For USB Disk it might be more complexity, while the driver of USB
disk is
not a BuiltIn/Default driver which mean it is loaded by someone else
instead
of just loaded at initial (as IDE Hard Driver driver).
Basically, the USB Disk driver is depends on and loaded USB Host
driver
to
so the very first thing is make sure your USB Host driver is loaded
in
boot
phase (by enclosed the HCD registries with HIVE BOOT as you did for
IDE
and
other registry settings), and the relative USB class key is put into
BOOT
HIVE as well so that not only the USB Host (HCD) will be loaded in
Early
Boot Phase and the USB Disk could be loaded successful.
And make sure the Device Manager is loaded in Boot Phase 1 by
applying
HKEY_LOCAL_MACHINE\init\BootVars\Flags = 3 rather than 1 that only
loaded
Storage Manager which is not enough in your case but might work on
IDE.

A summary is listed as following
Include the
1) HCD host driver key (Could be a builtIn or PCI based)
2) USB Mass Storage Key usually enclosed with CE_MODULES_USBMSC
CESYSGEN
tag
3) USB Disk Storage Profile usually enclosed with CE_MODULES_USBDISK6
CESYSGEN tag
4) Loaded Storage and Device Manager in Boot phase 1
HKEY_LOCAL_MACHINE\init\BootVars\Flags = 3

And also make sure the MountAsRoot and MountAsBootable key are
included.

"Dusan Arsenijevic" <DusanArsenijevic@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in
message news:7EADB61D-4D66-4322-AF4B-7B8148B4A256@xxxxxxxxxxxxxxxx
Hi,

I have successfuly modified the reg files to achieve ROM-only FS
and
persistant hive-based registry on IDE HD, but I am not able to
achieve
the
same for USB hard disk or memory stick.

Which (additional) registry keys have to be wrapped in:
; HIVE BOOT SECTION

XXXXX

"Flags"=dword:1000
; END HIVE BOOT SECTION

and where should
"MountAsBootable"=dword:1
and
"MountAsRoot"=dword:1
be placed in this case?
Is there something else I am missing?


(using wince 6.0)
Thanks!










.



Relevant Pages