Add experimental emummc formatter
This commit is contained in:
@@ -49,6 +49,11 @@
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
PARTITION VolToPart[2] = {
|
||||
{0, 1},
|
||||
{1, 1}
|
||||
};
|
||||
|
||||
#if FF_DEFINED != 86604 /* Revision ID */
|
||||
#error Wrong include file (ff.h).
|
||||
#endif
|
||||
@@ -6039,7 +6044,7 @@ FRESULT f_mkfs (
|
||||
sys = 0x07; /* HPFS/NTFS/exFAT */
|
||||
} else {
|
||||
if (fmt == FS_FAT32) {
|
||||
sys = 0x0C; /* FAT32X */
|
||||
sys = 0x0B; /* FAT32X */
|
||||
} else {
|
||||
if (sz_vol >= 0x10000) {
|
||||
sys = 0x06; /* FAT12/16 (large) */
|
||||
@@ -6117,12 +6122,13 @@ FRESULT f_fdisk (
|
||||
e_hd = (BYTE)(n - 1);
|
||||
sz_cyl = 63 * n;
|
||||
tot_cyl = sz_disk / sz_cyl;
|
||||
gfx_printf("tot_cyl: %d\nsz_disk: %d\nsz_cyl: %d\n", tot_cyl, sz_disk, sz_cyl);
|
||||
|
||||
/* Create partition table */
|
||||
mem_set(buf, 0, FF_MAX_SS);
|
||||
p = buf + MBR_Table; b_cyl = 0;
|
||||
for (i = 0; i < 4; i++, p += SZ_PTE) {
|
||||
p_cyl = (szt[i] <= 100U) ? (DWORD)tot_cyl * szt[i] / 100 : szt[i] / sz_cyl; /* Number of cylinders */
|
||||
p_cyl = (szt[i] <= 100U) ? (DWORD)tot_cyl * (szt[i] / 100) : szt[i] / sz_cyl; /* Number of cylinders */
|
||||
if (p_cyl == 0) continue;
|
||||
s_part = (DWORD)sz_cyl * b_cyl;
|
||||
sz_part = (DWORD)sz_cyl * p_cyl;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/ f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */
|
||||
|
||||
|
||||
#define FF_USE_MKFS 0
|
||||
#define FF_USE_MKFS 1
|
||||
/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
|
||||
|
||||
|
||||
@@ -169,6 +169,7 @@
|
||||
|
||||
#define FF_STR_VOLUME_ID 1
|
||||
#define FF_VOLUME_STRS "sd", "emmc"
|
||||
|
||||
/* FF_STR_VOLUME_ID switches support for volume ID in arbitrary strings.
|
||||
/ When FF_STR_VOLUME_ID is set to 1 or 2, arbitrary strings can be used as drive
|
||||
/ number in the path name. FF_VOLUME_STRS defines the volume ID strings for each
|
||||
@@ -181,7 +182,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#define FF_MULTI_PARTITION 0
|
||||
#define FF_MULTI_PARTITION 1
|
||||
/* This option switches support for multiple volumes on the physical drive.
|
||||
/ By default (0), each logical drive number is bound to the same physical drive
|
||||
/ number and only an FAT volume found on the physical drive will be mounted.
|
||||
|
||||
Reference in New Issue
Block a user