1)eboot中
#define PART_MYFS1 0x11
#define PART_MYFS2 0x12
// 创建第一个FAT分区 ,100M大小
hPartEx1 = BP_OpenPartition( NEXT_FREE_LOC,
SECTOR_TO_BLOCK_SIZE(FILE_TO_SECTOR_SIZE(100*1024*1024))*PAGES_PER_BLOCK, // align to block
PART_MYFS1,
TRUE,
PART_OPEN_ALWAYS);
// create extended partition in whatever is left
//
hPartEx2 = BP_OpenPartition( NEXT_FREE_LOC,
USE_REMAINING_SPACE,
PART_MYFS2,
TRUE,//这里需要根据自己的需要,使用TRUE或这FALSE
PART_OPEN_ALWAYS);
2)注册表配置
[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="system.hv"
; "Start DevMgr"=dword:1
"ProfileDir"="Documents and Settings"
"RegistryFlags"=dword:1
; "Flags"=dword:3
"DefaultUser"="default"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SMFLASH]
"Dll"="nandflash.dll"
"Prefix"="DSK"
"Profile"="SMFLASH"
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Order"=dword:0
"FriendlyName"="S3C2440 NAND Driver"
[HKEY_LOCAL_MACHINE\System\StorageManager\PartitionTable]
"11"="MYFS1"
"12"="MYFS2"
; [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SMFLASH]
; "Name"="nand flash driver" ;这一段不加也可以正常显示!!
; "Folder"="Hard Disk"
; "AutoMount"=dword:1
; "DefaultFileSystem"="EXFAT"
; "PartitionDriver"="mspart.dll"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SMFLASH\MYFS1]
; "FormatExfat"=dword:1
"Flags"=dword:14
"EnableWriteBack"=dword:1
"FriendlyName"="MYFS1"
"Folder"="DISK2"
"Dll"="exfat.dll"
"Util"="fatutil.dll"
"DisableAutoFormat"=dword:1
"DisableAutoScan"=dword:1
"EnableCache"=dword:1
"CacheSize"=dword:0
"CacheDll"="diskcache.dll"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SMFLASH\MYFS2]
; "FormatExfat"=dword:1
"Flags"=dword:14
"FriendlyName"="MYFS2"
"Folder"="PART2"
"Dll"="exfat.dll"
"Util"="fatutil.dll"
"DisableAutoFormat"=dword:1
"DisableAutoScan"=dword:1
"EnableWriteBack"=dword:1
"EnableCache"=dword:1
"CacheSize"=dword:0
"CacheDll"="diskcache.dll"