OS Development Help Needed

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.
Locked
User avatar
asp2221833
Posts: 1
Joined: Wed Dec 24, 2008 3:32 am

OS Development Help Needed

Post by asp2221833 »

Please tell me how to build a file system using 'c' and how to build our own c functions like printf, scanf, graphic functions etc. Is there any resource available on internet. Please help me...
I am developing an OS from scratch independent of linux or any other OS functions. It is a pure OS.
PLEASE HELP ! ! !
Aishwarya Shiva Pareek
jgraef
Member
Member
Posts: 47
Joined: Wed Jan 16, 2008 7:37 am
Location: Wonsheim, Germany

Re: OS Development Help Needed

Post by jgraef »

Filesystems are _not_ programmed. Either in C nor in any other language.
Filesystems are designed. Get out a paper and draw your FS!

If you have designed a FS that looks to work you can start implementing a driver.
But before actually writing the driver you need an interface. This interface propably calls some hooks in the FS driver to read/write/etc files and the interface offers functions to read/write from/to disk.
What the Filesystem then have to do is:
* Wait for a hook is called
* Do the appropriate action by using your FS design and the functions to read/write from/to disk

I also recommend to use caching.
As I said before you need an interface. This interface maybe consists of an VFS too. And for communication there is needed some sort of IPC. And of course you need a stable kernel!
So you need a lot of stuff before thinking about implementing a FS. And from all I can guess from your post I think you don't have to much of this.

You will also need an implementation of this Filesystem in your OS you use for development. So you can implement it there first. This maybe is a good training. The good thing there is, that the interfaces are already there (eg. fuse)

BTW: Get a look on existing filesystems like FAT, so you can get an overview how "normal" filesystems work.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: OS Development Help Needed

Post by Troy Martin »

I am developing an OS from scratch independent of linux or any other OS functions. It is a pure OS.
So is everyone else on this board, that's what OS development is all about. Read Bare bones and Printing to Screen and you should be able to write a puts() function within a day. And read it all, especially the .rodata section.

Wrong forum for this, should be in OS Development, not Announcements. And your topic title will do to other what it did to me: come here to /facepalm and rant.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
Locked