關於 ROM-only Files System

這幾天在弄 WinCE 5.0 OS
OS Catalog 裡面 Core OS/Windows CE devices/ Files Systems and Data Store
下面 有一個 File System – Internal(Choose 1)
有一個 RAM and ROM File System
與 ROM-only File System
選了 ROM-Only 後, 原本使用 mDOC 會在掛在 Mounted Volume 變成掛在 “"(Root) 下面
WinCE Help 裡的 Object Store 泛指系統內的各種被儲存的物件(Object) (Ex. Registry, Files, …….)
而選了 RAM and ROM 後 在下面所述應該會可以將Object 存在 RAM 裡面, 這樣有了一個問題在於 Suspend 時 需要將 RAM 內的 Object 保存的問題。
而採用 ROM-only 如果有一個 External Files System 則可以將 Object 存在 External Files System ( CF Card, SD, mDOC, OneNAND)

Platform Builder for Microsoft Windows CE 5.0
Selecting the Internal File System for your Target Device

The internal file system in your target device controls access to ROM. The file system can also provide file storage in the object store, which is in RAM. Two internal file system options are available: the RAM and ROM file system and the ROM-only file system. These have different properties and you will want to select the correct one for your target device. Both internal file systems provide the ability to mount additional external file systems, such as file allocation table (FAT).

The RAM and ROM file system provides file storage in the object store, as well as access to the ROM. The object store is the root of the file system, and all data under the root is stored in the object store, with the exception of external file systems, which are mounted as directories under the root. Data in ROM is accessible through the Windows directory. The RAM and ROM file system is most useful in target devices that continuously power RAM because the object store is lost when RAM is not refreshed.

The ROM-only file system does not allow applications to place files in the object store. Data in ROM is accessible through the Windows directory, and external file systems are again mounted as directories under the root. Additionally, with the ROM-only file system, you have the option of choosing an external file system to be placed at the root of the file system. If you mount a file system as the root, all data below the root directory is stored in that file system, with the exception of other external file systems.


Platform Builder for Microsoft Windows CE 5.0

Mounting an Installable File System as the Root Directory

Send Feedback on this topic to the authors

A Windows Mobile-based device can mount an installable file system as the root of the virtual file system (“"). When you mount an external file system as the root, all data below the root directory is stored in the mounted file system. Files and directories of the external file system appear as directories off the root directory; subdirectories of the external file system appear as subdirectories of the root directory. Calls routed to other external volumes, such as NETWORK or HardDisk, will retain those names, and calls into those volumes will be routed appropriately.

Including the ROM-only component

To implement an installable file system as the root, you must include the ROM-only file system component in the run-time image instead of the ROM/RAM file system component (SYSGEN_FSROMONLY=1). If the combined RAM and ROM object store system is present in the run-time image, then the object store will always become the root file system.

Note If you choose to use a file system other than the object store as the root file system, the majority of ActiveSync functionality will not work correctly. ActiveSync assumes that the object store is used as the root file system.

Only one file system may be registered as the root file system. After one root file system is registered, any subsequent file system making the attempt will be registered, but will not become the root file system. To register a different file system as the root file system, first de-register the previous root file system. At that point, there will be no root file system and the directory Windows will no longer be shadowed.

Registering the file system as root

When drivers are loaded and file systems are mounted, the desired file system is registered in a special way to indicate that it should become the root. Before this registration is made, all file API calls accessing files or directories in paths off the root will fail, except those paths that are in ROM.

The following list describes important registry values that must be set in the HKEY_LOCAL_MACHINESystemStorageManagerProfiles<MyProfile><MyFileSystem> registry key.

Value:type Description
MountAsRoot: dword To explicitly mount a file system as the root directory, set the MountAsRoot value to 1. 

The root file system is defined as the first file system volume to mount that has the MountAsRoot property. The property is specified in the registry profile of a storage device.

MountAsBootable: dword To explicitly mount a file system as the boot file system, set the MountAsBootable value to 1. 

If multiple mounted file systems have the MountAsBootable value set, the first one to mount will be used as the boot file system.

For most target devices, Microsoft recommends mounting the same file system as both the root and boot file system.

MountPermanent To explicitly prevent a file system from being programmatically dismounted, set the MountPermanent value to 1. 

A boot partition typically contains critical system files, such as the registry. If you mount a partition as bootable, this value ensures that the bootable partition cannot later be programmatically dismounted.

Example

The following example mounts the first FATFS partition on a storage device reporting profile MyProfile as both the root and boot file system, and makes the partition permanent to prevent programmatic dismounting:

[HKEY_LOCAL_MACHINESystemStorageManagerProfiles<MyProfile>FATFS]
    "MountAsRoot"=dword:1
    "MountAsBootable"=dword:1
    "MountPermanent"=dword:1

File shadowing

In Windows CE 4.x, true shadowing was not possible; the Windows directory was either the installed file system, or a ROM-only file system, rather than the combination of both implied by the term shadow.

In Windows CE versions 5.0 and later, an installed file system provides true shadowing between a Windows directory at the root and the ROM; that is, the files a user sees are in a combination of the two places.

See Also

Installable File System

廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: