NO Flash - TFAT file system integration



Hi everybody out there,

I'm trying to integrate a persistent file system (FS) and the hive
registry in a WinCE-based board.

My Flash address mapping (128 MB Spansion flash chip) is like this:

; 9FFF.FFFF -+
; | (4) GAP (not used, 3 MB)
; 9FCD.0000 -+
; | (3) ROM space for BOOT LOADER (1 MB)
; 9FC0.0000 -+-> Reset vector (MIPS specific)
; |
; |
; |
; |
; | (2) Free FLASH area to be used as storage (104 MB)
; |
; |
; |
; 9940.0000 -+
; |
; | (1) reserved FLASH area for NK.bin (20 MB)
; |
; |
; 9800.0000 -+


Being my first time integrating this components, I am confused with the
information about FS found in MS PB 5.0.

For the internal file system I did not select any component from the
catalog. As far as I read anywhere, in that case my system is using (by
default) the 'RAM and ROM file system' FS. Not really sure about the
role of this FS in the system (?).

I want to use TFAT for the storage (2). To carry out this, I integrated
the FMD provided in PB at
'C:\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\BLOCK\MSFLASHFMD\FASL' in our
BSP.

Question: I followed the instructions from one of the articles written
by Steve Maillet in MSDN to create the copy in my BSP. It worked fine,
but I read that with PB 5.0 you can do now some similar using the
instructions in the help titled 'Cloning a Catalog Item'.
Never tried it. Is the second one the way to go when cloning items now?


I also took from PB the following components:

- Storage Manager
- TFAT file system
- Partition driver
- Storage Manager control panel applet

My current registry settings are:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FASLD]
"Dll"="fasld.dll"
"Order"=dword:2
"Prefix"="DSK"
"Ioctl"=dword:4
"Profile"="MSFlash"
"IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"MemBase"=dword: 19400000; yes, it uses physical addresses
"MemLen"=dword: 6800000; 104 MB (2)

; Override names in default profile
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"Name"="MSFLASH for FASL FLASH"
"Folder"="NOR Flash"

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\MSFlash]
"DriverPath"="Drivers\\BuiltIn\\FASLD"
; LoadFlags 0x01 == load synchronously
"LoadFlags"=dword:1
"Order"=dword:0

So far, it seems to be working (?). I can see the applet in the control
panel of my board. I could use the format option and finally create a
new partition.
I can see now the 'NOR Flash' folder in my system and I already stored
some files there, and after cold boot they are still there.

Question: that is my current state. Is it Ok what I did? What I really
don't like at this stage is that after every new cold boot the applet
shows always different 'capacity' values, normally more than the 104 MB
that I assigned in the registry (i.e. 109.51 MB, 106,8 MB, and so).

Q: is there a way that I can include in the storage area the upper 3 MB
(4)?

Now I'm checking some registry settings that could be useful. For
example:

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"Name"="MSFLASH for FASL FLASH"
"Folder"="NOR Flash"

;Automatically Mounts each detected partition (if FSD driver is
available)
; "AutoMount"=dword:1
;Automatically partitions the store with largest creatable
partition (???)
; "AutoPart"=dword:1
;Formats the store automatically
; "AutoFormat"=dword:1

As far as I know, with them I can do the formating and/or handling of
partition (?) after (the first) booting, so I would avoid to do it
manually (as I did it above).
Q: Am I right? It would be very useful in mass production.
Q: What would be the adventage to include the BOOTPART library in the
Boot Loader?

I am not sure if some of the following options could be useful also
(specially the 'DataCacheSize'):

;TFAT volumes are configured as "FATFS" volumes

;[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\FATFS]
; "Flags"=dword:00000014 ; or 000000024 ????
; "FormatTFAT"=dword:1
; "MountAsBootable"=dword:1
; "MountAsRoot"=dword:1
; "CheckForFormat"=dword:1
; "EnableWriteBack"=dword:1
; "DataCacheSize"=dword:00000080 ;128 sectors(128*512=64KB)

I also found in the documentation information about the BinFS file
system. I don't understand its use. Should I include it as file system
for the area reserved for NK.bin (1)?
Would that allow to do updates of individual components of the kernel?
That would be great. If it is the case, how could integrate it so that
ir can coexist with the TFAT?

Is there any additional steps that I'm missing for the FS till now?

//

Ok, assuming that I will get working my file system functionality (with
your help ;-) ), the next step would be to add the Hive-Based Registry.
As far I read in the newsgroups, the steps in the documentation are not
enough. Not sure if they were taking of an older PB version. It is
accurate the information in PB 5.0 to integrate the Hive-Based
Registry? Or should I check some additional remarks somewhere?

For the 'HIVE BOOT SECTION' tag, I don't get the concept of using it
for "starting drivers in the first boot phase...". May anybody explain
me that, please?

Thanks a lot for your help!

Alexander

.



Relevant Pages

  • [opensuse] Re: Grub bugs ... should I file separate bugs for each one?
    ... Right -- so when they choose XFS, ... generic boot code and mark current boot partition as active). ... helplessly and uselessly saying you don't support the user's choice of file system. ...
    (SuSE)
  • Re: Ho to run CF driver before reading hive-based registry
    ... BOOT SECTION": ... so I had to rewrite the driver for it. ... The problem is now the hive-based registry. ... FileSystem Starting - starting with clean file system ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Ho to run CF driver before reading hive-based registry
    ... Did you place all the registry settings related to your CF driver inside ... ; END HIVE BOOT SECTION ... The problem is now the hive-based registry. ... FileSystem Starting - starting with clean file system ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Aftter this ... a new question about Fedora Core 5
    ... can be reduced to a single / partition and a swap ... At the same time it can be good to have different file systems, as some are good at few but large files and others on many small ones, you can that way tune your system for high speed by selecting the best file system for the slice, but yes, the default file systems are all okey for home users. ... /home is quite good to place on it's own slice, as you that way have easy access to your private files, regardless which of the distros you boot into. ... a boot loader to the partition,or for the whole disk. ...
    (alt.linux)
  • Re: Ho to run CF driver before reading hive-based registry
    ... Did you read the documentation for hive registry? ... Are those settings included in the boot hive? ... ; MMC Storage Class Driver ... FileSystem Starting - starting with clean file system ...
    (microsoft.public.windowsce.platbuilder)

Loading