The following registry key example specifies that BinFS is the default file system:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"DefaultFileSystem"="BINFS"——默认的文件系统怎么会是BINFS呢?据我所知,BINFS不是必须的,我以前就没有用它
"PartitionDriver"="mspart.dll"
"MountFlags"=dword:11
"Folder"="NAND Flash"
"Name"="FLASH Disk Block Device"
The following registry key example prevents FATFS from attempting to shadow the \Windows directory:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MsFlash\FATFS]
"MountFlags"=dword:0
A MountFlags value of dword:11 specifies that you mount the file system as an external ROM file system that shadows the \Windows directory. Eliminating the MountFlags value causes the \BINFS directory to be visible to the user. In both cases, you can access the BinFS contents using the \BINFS directory.——这红色字体的是什么意思?
是不是指windows文件夹挂载的是FAT还是binfs?
——————————————呜呜,很扫兴哦。要使bootloader支持binfs分区要用到微软不开源的库的。太郁闷了。
在PB帮助文档里面有
If a boot loader includes support for the binary ROM image file system (BinFS), the boot loader can partition, format, and write data to a specified media device. Through the Bootpart library, the boot loader writes to flash media. The boot loader uses the Bootpart library to create partitioning. This partitioning is necessary for both BinFS and another file system, such as FAT, to be flashed on the same media device. To accomplish partitioning, the boot loader uses the Bootpart library to create a BinFS partition along with an extended partition. The OS uses these partitions to create one or more data partitions inside of the extended partition. The extended partition is required because the OS cannot modify the master boot record (MBR) once the boot loader's Bootpart library partitions flash memory.
The Bootpart library can create a boot partition to store boot arguments. The flash memory blocks that contain the MBR sector, the BinFS memory region, and the boot arguments partition are marked as read-only. In addition, the BinFS and boot partitions are marked as read-only so that the partitions cannot be formatted or deleted.
Bootpart enables code for a Flash Media Driver (FMD) to be abstracted from the boot loader. The boot loader creates the partition and reads or writes to the partition by specifying a byte offset into the partition, as well as a length value. Bootpart can also perform a low level format on the flash media.
To support BinFS, your boot loader must link to the Bootpart library located in the %_WINCEROOT%\Public\Common\Oak\Drivers\EthDbg\Bootpart directory.
For more information on the Bootpart library see, Bootpart Library Functions. You can view a sample boot loader that supports BinFS in the %_WINCEROOT%\Platform\SMDK2410\Eboot directory.
移植未必没有希望,貌似已经开源了。
找到C:\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\ETHDBG\BOOTPART
看看BOOTPART下面的sources
=============================================================
!if 0
Copyright (c) Microsoft Corporation. All rights reserved.
!endif
!if 0
Use of this source code is subject to the terms of the Microsoft end-user
license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
If you did not accept the terms of the EULA, you are not authorized to use
this source code. For a copy of the EULA, please see the LICENSE.RTF on your
install media.
!endif
!IF 0
Module Name:
sources.
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built.
引用 10 楼 gooogleman 的回复:
移植未必没有希望,貌似已经开源了。
找到C:\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\ETHDBG\BOOTPART
看看BOOTPART下面的sources
=============================================================
!if 0
Copyright (c) Microsoft Corporation. All rights reserved.
!endif
!if 0
Use of this source code is subject to the terms of the Microsoft end-user
license agreement (EULA) under which you licens…
/********************************************************************************************
再来接力------------
==================================
刚才我看了一下eboot中9) Format Boot Media for BinFS这个菜单的实现过程,
发现在这个过程中调用了BP_LowLevelFormat这个函数实现,这个函数决定了NK存放的起始block,并且把MBR写
入到这个block中。现在我把代码贴出来给大家分析一下。
*********************************************************************************************/
/* BP_LowLevelFormat
*
* Called when preparing flash for a multiple-BIN download.
* Erases, verifies, and writes logical sector numbers in the range to be written.
*
* ENTRY
* dwStartBlock - starting physical block for format
* dwNumBlocks - number of physical blocks to format
* dwFlags - Flags used in formatting.
*
* EXIT
* TRUE returned on success and FALSE on failure.
*/