在SD/MMC卡上实现hive (Implement WinCE HIVE&ROM system on NAND or SD system )
Implement WinCE HIVE&ROM
system on NAND or SD system
1.0 Scope
This document details in how toimplement the WinCE6 HIVE&ROM system. Two types of media are widely used in Au1300 system, the NAND flash and the SD card. The document will describe the steps implementing HIVE&ROM system for both media type.
2.0 Hardware details
NAND flash is connected with Au1300’s static memory controller. The SD card is connected with SD slot.
3.0 Creating HIVE&ROM system
Section 3.1 will describe how to implement HIVE&ROM system on NAND flash disk while section 3.2 describes the similar system way to create HVIE&ROM system on SD card.
3.1 HIVE&ROM system on NAND flash
3.1.1 Add catalog components
catalog->CEBASE->File Systems and Data Store->File system->ROM-only File System
catalog->CEBASE->File Systems and Data Store->Registry Storage- >Hive-based Registry
catalog->CEBASE-> File Systems and Data Store->Storage Manager ->FAT File System
catalog->CEBASE-> File Systems and Data Store->Storage Manager ->Partition Driver
catalog->Third Party->AVN13xx:MIPSII->Storage->NAND
3.1.2 Step2: Registry settings
Update nand fmd driver registry with following content. The nand fmd driver registry is located /Drivers/Nandfmd/nandfmd.reg.
; HIVE BOOT SECTION
; This file is to be included in platform.reg if required.
[HKEY_LOCAL_MACHINE\Drivers\Builtin\NAND]
"Profile"="NAND"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Order"=dword:0
"FriendlyName"="NAND FLASH Driver"
"Dll"="NANDFMD.dll"
"Prefix"="DSK"
"Index"=dword:1
"Flags"=dword:1000
[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\NAND]
"DriverPath"="Drivers\\Builtin\\NAND"
"LoadFlags"=dword:1
"Order"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NAND]
"Name"="NAND FLASH Storage"
"DefaultFileSystem"="FATFS"
"PartitionDriver"="mspart.dll"
"Folder"="NAND FLASH"
"AutoPart"=dword:1
"AutoMount"=dword:1
"AutoFormat"=dword:1
[HKEY_LOCAL_MACHINE\init\BootVars]
"SystemHive"="Documents and Settings\\system.hv"
"ProfileDir"="Documents and Settings"
"Flags"=dword:3
"RegistryFlags"=dword:1
"NoDefaultUser"=dword:0
; END HIVE BOOT SECTION
3.2 HIVE&ROM system on SD card
3.2.1 Add catalog components
catalog->CEBASE->File Systems and Data Store->File system->ROM-only File System
catalog->CEBASE->File Systems and Data Store->Registry Storage- >Hive-based Registry
catalog->CEBASE-> File Systems and Data Store->Storage Manager ->FAT File System
catalog->CEBASE-> File Systems and Data Store->Storage Manager ->Partition Driver
catalog->Third Party->AVN13xx:MIPSII->Storage->Removable->Secure Digital/MMC
3.2.2 Step2: Registry settings
Update SDIO host driver registry with following content. The SDIO driver registry is located /Drivers/SDIO/sdio.reg.
;
;
; Alchemy Au1100 SD Controller registry settings
; HIVE BOOT SECTION
; setting for SD bus driver to load driver
[HKEY_LOCAL_MACHINE\Drivers\Builtin\SDHC_Au1100]
"Dll"="SDIO.dll"
"Order"=dword:1
"Prefix"="SDP"
; force the host controller to run in the PIO mode instead of
; of DMA mode.
"PIOMode"=dword:0
; Disable the MMC 8 bit wide data bus for SD0, the eMMC slot, which is slot 1
; for emmc device, dont disable 8 bits bus
; for sd device, only support 4 bits bus
"Disable8BitBus"=dword:1
"Index"=dword:1
"Flags"=dword:1000
[HKEY_LOCAL_MACHINE\Drivers\Builtin\SDBusDriver]
"Dll"="SDBus.dll"
"Order"=dword:0
"Index"=dword:1
"Prefix"="SDC"
"ThreadPriority"=dword:64 ; default thread priority for dispatch thread
"RequestListDepth"=dword:30 ; pre-allocated requests
"Flags"=dword:11000 ; DEVFLAGS_TRUSTEDCALLERONLY
"IClass"=multi_sz:"{20FA98A8-B298-4b32-8D72-C716AEE2FA84}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]
"Dll"="SDMemory.dll"
"Order"=dword:1
"Prefix"="DSK"
"BlockTransferSize"=dword:40 ; send no more than 64 blocks of data per bus transfer
;"SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block access
;"IdleTimeout"=dword:7D0 ; 2000 milliseconds
;"IdlePowerState"=dword:2 ; 0 == D0, 1 == D1, etc.
;"DisablePowerManagement"="" ; if value present, then disable (remove value to enable)
"Profile"="SDMemory"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{A32942B7-920C-486b-B0E6-92A702A99B35}"
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]
"Dll"="SDMemory.dll"
"Prefix"="DSK"
"BlockTransferSize"=dword:40 ; send no more than 64 blocks of data per bus transfer
;"SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block access
;"IdleTimeout"=dword:7D0 ; milliseconds
;"IdlePowerState"=dword:2 ; 0 == D0, 1 == D1, etc.
;"DisablePowerManagement"="" ; if value present, then disable (remove value to enable)
"Profile"="MMC"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{A32942B7-920C-486b-B0E6-92A702A99B35}"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
"Name"="MMC Memory Card"
"Folder"="MMCCard"
"PartitionDriverName"="MSPART"
"DefaultFileSystem"="FATFS"
"BootPhase"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC\FATFS]
"MountAsBootable"=dword:1
"MountAsROM"=dword:1
"MountAsRoot"=dword:1
"AutoFormat"=dword:1
"AutoPart" =dword:1
"AutoMount"=dword:1
"BootPhase"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
"PartitionDriverName"="MSPART"
"Name"="SD Memory Card"
"Folder"="SDCard"
"DefaultFileSystem"="FATFS"
"BootPhase"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory\FATFS]
; "MountAsBootable"=dword:1
; "MountAsROM"=dword:1
; "MountAsRoot"=dword:1
"AutoFormat"=dword:1
"AutoPart" =dword:1
"AutoMount"=dword:1
"BootPhase"=dword:0
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]
"Dll"="SDMemory.dll"
"Prefix"="DSK"
"BlockTransferSize"=dword:40 ; send no more than 64 blocks of data per bus transfer
;"SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block access
;"IdleTimeout"=dword:7D0 ; 2000 milliseconds
;"IdlePowerState"=dword:2 ; 0 == D0, 1 == D1, etc.
;"DisablePowerManagement"="" ; if value present, then disable (remove value to enable)
"Profile"="SDMemory"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC\BINFS]
"MountSystem"=dword:1
"MountAsROM"=dword:1
"BootPhase"=dword:0
; SDHC Memory Storage class driver
[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class\High_Capacity]
"Dll"="SDMemory.dll"
"Prefix"="DSK"
"BlockTransferSize"=dword:100 ; send no more than 256 blocks of data per bus transfer
"Index"=dword:1
"BootPhase"=dword:0
;"BlockTransferSize"=dword:40 ; send no more than 64 blocks of data per bus transfer
"SDClockRateOverride"=dword:2625A0 ; 52000000 Hz
;"SingleBlockWrites"=dword:1 ; alternatively force the driver to use single block access
;"IdleTimeout"=dword:7D0 ; 2000 milliseconds
;"IdlePowerState"=dword:2 ; 0 == D0, 1 == D1, etc.
;"DisablePowerManagement"="" ; if value present, then disable (remove value to enable)
"Profile"="MMC"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
[HKEY_LOCAL_MACHINE\System\StorageManager\BinFS]
"BootPhase"=dword:0
"Order"=dword:0
"FriendlyName"="BIN Filesystem"
"Dll"="binfs.dll"
"Paging"=dword:1
[HKEY_LOCAL_MACHINE\init\BootVars]
"SystemHive"="\\Hive\\system.hv"
"ProfileDir"="Documents and Settings"
"Flags"=dword:3
"RegistryFlags"=dword:1
"NoDefaultUser"=dword:0
; END HIVE BOOT SECTION