Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to format or mount Exfat on any version of sdk #155

Open
davidawesome02 opened this issue Jun 18, 2023 · 4 comments
Open

Unable to format or mount Exfat on any version of sdk #155

davidawesome02 opened this issue Jun 18, 2023 · 4 comments

Comments

@davidawesome02
Copy link

Update for anyone looking at my previous two issues, which are still issues, You can use 6a4d89b to run them still (if you wana clone read https://stackoverflow.com/questions/3489173/how-to-clone-git-repository-with-specific-revision-changeset)

Ok, so because 6a4d89b is the latest really working one, I need help, I am not sure if I can ask here as it is not a real issue as right now only a outdated version works, so technically it coulda been fixed....

I cannot use exfat because of error 19:
LEAVE_MKFS(FR_INVALID_PARAMETER); /* no-FAT? */
on

if (FF_FS_EXFAT && (fsopt & FM_EXFAT)) { /* exFAT possible? */

gets called with config:

#define FF_FS_CONTINUOUS 1
#define FF_FS_READONLY 0
#define FF_FS_MINIMIZE 0
#define FF_USE_FIND 1
#define FF_USE_MKFS 1
#define FF_USE_FASTSEEK 1
#define FF_USE_EXPAND 0
#define FF_USE_CHMOD 0
#define FF_USE_LABEL 0
#define FF_USE_FORWARD 0
#define FF_USE_STRFUNC 0
#define FF_PRINT_LLI   1
#define FF_PRINT_FLOAT 1
#define FF_STRF_ENCODE 3
#define FF_CODE_PAGE 437
#define FF_USE_LFN 2
#define FF_MAX_LFN 255
#define FF_LFN_UNICODE 1
#define FF_LFN_BUF 255
#define FF_SFN_BUF 12
#define FF_FS_RPATH 0
#define FF_VOLUMES 5
#define FF_STR_VOLUME_ID 2
#define FF_VOLUME_STRS   "ram", "flash", "sd", "sd2", "usb"
#define FF_MULTI_PARTITION 0
#define FF_MIN_SS 512
#define FF_MAX_SS 512
#define FF_LBA64 1
#define FF_MIN_GPT 0x10000000
#define FF_USE_TRIM 0
#define FF_FS_TINY 0
#define FF_FS_EXFAT 1
#define FF_FS_NORTC   1
#define FF_NORTC_MON  1
#define FF_NORTC_MDAY 1
#define FF_NORTC_YEAR 2022
#define FF_FS_NOFSINFO 0
#define FF_FS_LOCK 0
#define FF_FS_REENTRANT 0
#define FF_FS_TIMEOUT   1000

---- above has comments explaining each option but I removed them with a regex :)

and only modified main.c to use the commented out FM_EXFAT

I cant format to exfat or mount to exfat as it just returns errors, thanks for anyone who can help, and just so you know im more active on the pine discord.

This is a problem with a partitioning and mounting and I cant see why right now, please help!

Thanks, and please fix your repo

@davidawesome02
Copy link
Author

UPDATE: I FIXED IT, this was a complex one, and this sucks; ok, so you have to modify the exfat in the main file in the components also, use the old version for support (or fix the broken parts (I think it might be loading the unicode option makes it too big and is now set by default after v2.0 but not testing rn)) then use in main the correct fs type, and add it to be 512*256 for it to work (above 128 and I didnt know what to put so deal with it)

THANK bro, and please fix this or add comments about what dose what, and add the if statement in the main config for EXFAT support not just everything relating to it.....

I will add a merge request if I figure out github eventualy :)

@davidawesome02
Copy link
Author

nvm I was too quick, it formated and can write and read but gparted still has seek errors now :))))))

@davidawesome02
Copy link
Author

ok, did more testing and diffed the files betwine versions, NOTHING SEAMED TO CHANGE, did yall even test this, because this partition table is invalid!

thanks, gonna now read the spec on how exfat works and gpt partition tables see ya later

@davidawesome02
Copy link
Author

davidawesome02 commented Jun 23, 2023

cool, so its not gpt good to know!

https://en.wikipedia.org/wiki/GUID_Partition_Table



Offset | Length | Contents
-- | -- | --
0 (0x00) | 8 bytes | Signature ("EFI PART", 45h 46h 49h 20h 50h 41h 52h 54h or 0x5452415020494645ULL[a] on little-endian machines)
8 (0x08) | 4 bytes | Revision 1.0 (00h 00h 01h 00h) for UEFI 2.8

Offset	Length	Contents
0 (0x00)	8 bytes	Signature ("EFI PART", 45h 46h 49h 20h 50h 41h 52h 54h or 0x5452415020494645ULL[[a]](https://en.wikipedia.org/wiki/GUID_Partition_Table#cite_note-13) on [little-endian](https://en.wikipedia.org/wiki/Little-endian) machines)
8 (0x08)	4 bytes	Revision 1.0 (00h 00h 01h 00h) for UEFI 2.8

vs my first few:

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001c0  02 00 ee fe ff 00 01 00  00 00 ff ff ff ff 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI PART....\...|
00000210  74 01 fa 70 00 00 00 00  01 00 00 00 00 00 00 00  |t..p............|

nvm im a idiot, that offset is correct for uefi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant