Page 1 of 1

Help, I'm stuck...

Posted: Fri Jul 11, 2003 5:11 pm
by emilsoft
Hey everyone, I'm new to this forum and I searched it as much as I could, so just go easy on me.

I'm also new to OS Development. I've started developing a 32Bit OS with a protected mode kernel with the help of the tutorials from the Bona Fide OS development Tutorials.

Here are my problem:

1. I can't decide which executable file format to use. If I wanted to use ELF, will I be able to compile sources under DOS/Windows with DJGPP 2?

2. Which filesystem is the best and easiest to implement and how can I do it?

3. I also would like to add a GUI to my OS, but I need a Memory Manager which I have no idea how to write. I did read Tim Robinson's tutorials, but due to my lack of knowledge in assembly, I cannot start writing it from scratch.

So, with those questions asked, I would appreciate any help from you guys.

Thanks. :)

Re:Help, I'm stuck...

Posted: Fri Jul 11, 2003 5:40 pm
by Tim
emilsoft wrote:1. I can't decide which executable file format to use. If I wanted to use ELF, will I be able to compile sources under DOS/Windows with DJGPP 2?
Yes, in theory, but it takes a bit of setting up. However, if you do development under Windows, you can link to ELF indirectly (by linking to PE then using objcopy to convert to ELF).

COFF is a nice, simple format which is widely supported by tools and easy to load.
2. Which filesystem is the best and easiest to implement and how can I do it?
Best file system: there are lots of different answers to that...
Easiest file system to implement: well, reading from FAT is pretty easy.
3. I also would like to add a GUI to my OS, but I need a Memory Manager which I have no idea how to write. I did read Tim Robinson's tutorials, but due to my lack of knowledge in assembly, I cannot start writing it from scratch.
Right, first of all: forget about a GUI for at least the next year. There's a lot of work to be done before you can get to that stage.

About the memory management: well, unless you have a more specific question, I can't really say more other than "read the tutorials". Any advice I can give will be in there.

Re:Help, I'm stuck...

Posted: Fri Jul 11, 2003 5:51 pm
by emilsoft
Thanks a lot for your reply.
But how do I implement FAT Filesystem into my OS?

And my Question about the Memory Manager is, as I said befor, that I cannot start off anywhere since I do not know a lot about [hardware] programming in Assembly. I need an OS-Independent protected mode memory manager which is well-comented, so that I can read through every line of it's code to figure out the instructions and how it all works.

Thanks again.

Re:Help, I'm stuck...

Posted: Fri Jul 11, 2003 6:00 pm
by Tim
I'm sure the answers to both your questions can be found via the .:QuickLinkz:. thread.

Also:
-- any protected mode memory manager will be OS-dependent, since it will form an integral part of the kernel (or, in the case of a microkernel, it will be a very important server). The memory manager and the OS are inseperable.

-- you don't need to know much assembly to write a kernel. What you do need to know about is general computer architecture. You shouldn't need to be an assembly whiz to understand my tutorials, for instance.

-- to implement file system support, you'll need some kind of disk support first. Floppy I/O is easy, and IDE is only slightly harder. Then you'll need to get hold of a FAT format specification and, basically, follow it.

Re:Help, I'm stuck...

Posted: Fri Jul 11, 2003 6:27 pm
by emilsoft
OK, I found "reference implementation for malloc()" in the QuickLinkz Thread, but the source code is written for win32. Will I be able to use the code if I remove the "windows.h" header!

Thanks again and Sorry that I'm asking so many questions!

Re:Help, I'm stuck...

Posted: Sat Jul 12, 2003 3:46 am
by Tim
You'll need a lot more than just a malloc. Again, please see the memory management tutorials. If you don't understand a particular part, please ask.