Fat32 filesystem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ruisu15
Posts: 1
Joined: Mon Dec 13, 2010 1:45 am

Fat32 filesystem

Post by ruisu15 »

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 :cry: .....
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Fat32 filesystem

Post by NickJohnson »

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.
User avatar
Combuster
Member
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

Post by Combuster »

I dont know how to add extern functions
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?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
iLewis
Posts: 22
Joined: Mon Nov 01, 2010 5:46 pm
Location: Ballarat, Victoria, Australia
Contact:

Re: Fat32 filesystem

Post by iLewis »

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
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: Fat32 filesystem

Post by salil_bhagurkar »

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
Post Reply