阅读:2629回复:1
关于EBOOT中,进行BINFS分区与FAT32分区的问题.
之前一直没有用EBOOT去引导系统,最近想尝试下功能强大的EBOOT,粗略的看了一下EBOOT的一些代码,有些问题不是很清楚,特来请教下各位大大....
其中进行BINFS分区时,只知道调用这个函数可以进行分区.BP_OpenPartition( NEXT_FREE_LOC, (dwBINFSPartSectors-1), PART_BINFS, TRUE, PART_OPEN_ALWAYS); BP_OpenPartition的第一个参数NEXT_FREE_LOC,具体指的是哪一个块呢? 还有第二个参数,也不知道是如何确定的? 分区的动作是要在OEMLaunch();里面DOWNLOAD IMAGE的时候进行,还是在调用OEMLaunch();之前就可以完成BINFS和FAT32的分区呢? 谢谢大家! |
|
沙发#
发布于:2008-05-20 02:31
* Opens/creates a partition depending on the creation flags. If it is opening
* and the partition has already been opened, then it returns a handle to the * opened partition. Otherwise, it loads the state information of that partition * into memory and returns a handle. * * ENTRY * dwStartSector - Logical sector to start the partition. NEXT_FREE_LOC if none * specified. Ignored if opening existing partition. * dwNumSectors - Number of logical sectors of the partition. USE_REMAINING_SPACE * to indicate to take up the rest of the space on the flash for that partition (should * only be used when creating extended partitions). This parameter is ignored * if opening existing partition. * dwPartType - Type of partition to create/open. * fActive - TRUE indicates to create/open the active partition. FALSE for * inactive. * dwCreationFlags - PART_CREATE_NEW to create only. Fail if it already * exists. PART_OPEN_EXISTING to open only. Fail if it doesn't exist. * PART_OPEN_ALWAYS creates if it does not exist and opens if it * does exist. * * EXIT * Handle to the partition on success. INVALID_HANDLE_VALUE on error. ===================================================== 第一个表示开始的位置, NEXT_FREE_LOC=-1,表示下一个空闲位置. 第二个表示大小, #define USE_REMAINING_SPACE -1, 所以当等于-1表示将剩下的所有空间分一个区 bp_init初始化成功后就可以分区了. |
|