Page 1 of 1

How could I proceed?

Posted: Wed Nov 07, 2012 2:14 pm
by Kirk
Hello OSDev!

First of all, I'd like to say thanks to OSDev! Such a great resource for new operating system developers.

Now please, before I continue with my question. I'm not asking for code, a complete solution etc. Even worse, I'd rather have somebody pointing me into the right direction.

So here's my question. I'm new to operating system development. I followed James M's Kernel Development tutorials here:

http://www.jamesmolloy.co.uk/tutorial_html/

I have completed the tutorial and successfully build a simple kernel. I made some modifications in the code added some stuff and modified some build scripts. Now I'm stuck. The tutorial does not explain on how to proceed.
I'm stuck at the following problems:
  • How can I implent a simple shell?
  • How can I write software that runs in my OS?
  • How difficult is it to port GCC?
I did some googling on these questions but so far I have been unable to find an answer. I might be thinking ahead but this is where I'm stuck and I would be glad if somebody pointed me in the right direction or clear up any misconceptions I might have.

Thanks in advance.

Kind regards,
Kirk

Re: How could I proceed?

Posted: Wed Nov 07, 2012 2:30 pm
by bluemoon
Kirk wrote:Now I'm stuck. The tutorial does not explain on how to proceed.
Repeat {
do the things you've done in the tutorial, without refer/copy from the tutorial.
} Until you know what's next.

I really meant it, you will know what to do next when you are ready, in any other cases it usually mean you are not ready.

Re: How could I proceed?

Posted: Wed Nov 07, 2012 2:52 pm
by neon
Hello,

There is a point where you will have to be able to rely entirely on your own skills, experience, and research abilities in order to proceed with what you want out of this. This is that point. Make sure you understand the concepts well within the tutorials, grab a copy of the CPU manuals, any other specifications you might need (and know of the OSDev.org Wiki...its a really nice resource), and start researching and designing what you need. Your questions can be answered by having a good understanding of operating system concepts and how your tool chain works...both of which are necessary before attempting the development of either.

Re: How could I proceed?

Posted: Thu Nov 08, 2012 4:29 pm
by bewing
Well, I disagree with these guys. OS development does involve a lot of chicken-and-egg problems. And there will be many occasions when you ask yourself what to work on next.

Before you can port GCC you need to port a C library.
Before you can port a C library, you need to support a couple dozen POSIX calls in your kernel.
Before you can support those, you need to design your usermode/kernelmode interface.
Somewhere in there, you also need to design your device driver interface.
And design your physical and virtual memory managers. And your virtual filesystem.
And pick your executable format. And choose a higher-half or lower-half kernel design.
And on and on.

But basically the answer is: "start thinking about ALL of these things, but just pick one of them and start working on it until you have to work on something else to get the first thing to work."

The alternate answer is: "start working on your scheduler -- it is the fundamental basis of everything else your OS will ever be."

Re: How could I proceed?

Posted: Fri Nov 09, 2012 7:02 am
by Combuster
bewing wrote:Before you can port a C library, you need to support a couple dozen POSIX calls in your kernel.
The C library wasn't designed to be on top of POSIX - and there are many alternatives to glibc which is the prime sufferer of that particular problem.

You do need a set of system calls for a macrokernel that provide access to similar functionality, or IPC and a set of implementing servers when you want to use a microkernel, although the latter needs some special thought to fix a particular cyclic dependency.