Hi, i need some help with a project. i need to read, open directories and list files in the directories for an OS. the File System is fat32.
after search in the wiki it give me a path for an Public Domain FAT32 code in the forum, but i cant find the code.
i have created a binary file of my OS and boot it with a grub, but i dont know how to add extern functions to it.
Please someone help me .....
Fat32 filesystem
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: Fat32 filesystem
What are the capabilities of your OS so far? Are you in real mode or protected mode? Can you read from the disk yet?
Also, it should be pretty easy to write a simple FAT32 driver with just the description of the filesystem, especially if it's read-only. IIRC, there are documents describing FAT32 on the wiki to a sufficient degree.
Also, it should be pretty easy to write a simple FAT32 driver with just the description of the filesystem, especially if it's read-only. IIRC, there are documents describing FAT32 on the wiki to a sufficient degree.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Fat32 filesystem
If you are suggesting what I think you are, the Required Knowledge rule probably applies here... Did you ever build projects with multiple sources by hand?I dont know how to add extern functions
Re: Fat32 filesystem
My OS has a fully implemented fat32 driver, it does everything you requested. it does NOT write yet however because I'm lazy.
Refer to http://www.retsim.com/svn/mos/Kernel/Media%20OS/MK/ and look at # Fat32Driver.cpp # Fat32Driver.h
EDIT: Um, i wouldnt copy paste it tho... its written for x86-64 So it prob wont work properly if your on x86
Refer to http://www.retsim.com/svn/mos/Kernel/Media%20OS/MK/ and look at # Fat32Driver.cpp # Fat32Driver.h
EDIT: Um, i wouldnt copy paste it tho... its written for x86-64 So it prob wont work properly if your on x86
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
Re: Fat32 filesystem
Why aren't you referring to the FAT spec by Microsoft? It is by far the simplest spec I have ever seen. If you read it, you'll understand what is to be implemented and will give you the base for other file systems as well. Reading or porting other codes won't help you and later on you won't be able to change them. Besides, once you have a driver interface, adapting the code to it will be a headache if you don't know the architecture of FAT.
Hence, I would suggest going through the FAT spec: http://www.microsoft.com/whdc/system/pl ... atgen.mspx
Hence, I would suggest going through the FAT spec: http://www.microsoft.com/whdc/system/pl ... atgen.mspx