Anybody point me where to start?
Anybody point me where to start?
I'm a third year CS student and although I've done plenty of OOP and some assembly, I'd really like to understand how to build an OS, even a very simple one.
I have a decent grasp of the different types of kernels (monolithic, etc.) and have some interesting ideas about building one.
The problem is it's very hard to find good information or tutorials about getting started and the right tools to use.
Any input here is most welcome!
Thnx
I have a decent grasp of the different types of kernels (monolithic, etc.) and have some interesting ideas about building one.
The problem is it's very hard to find good information or tutorials about getting started and the right tools to use.
Any input here is most welcome!
Thnx
Clearly you didn't look because the internet is swamped with it. You sure that you googled with osdev in the query? Try again, hell there is even a WIKI on this site.The problem is it's very hard to find good information or tutorials about getting started and the right tools to use.
Author of COBOS
yea i've looked. i've even found things. a lot of which however assume one has a better understanding of it than i do. what i was hoping for, after looking through these forums a bit and seeing that people here really know what the heck they're talking about, is that their expertise and guidance might be more insightful than my previous google searches.
This is a good tutorial
http://www.osdever.net/bkerndev/index.php?the_id=90
However if you are working on a windows computer I would recommend using cygwin and setting up a cross compiler GCC Cross-Compiler.
Bochs would also be a good thing to get right first thing.
http://www.osdever.net/bkerndev/index.php?the_id=90
However if you are working on a windows computer I would recommend using cygwin and setting up a cross compiler GCC Cross-Compiler.
Bochs would also be a good thing to get right first thing.
Cool stuff so far!
Much of what I've seen talks about DJGPP, I use DevC++ for almost everything I do, can I just use the command line version of GCC that was installed with DevC++, or is DJGPP necessary for these things?
And, this might sound pretty stupid to some of you OS buffs, but do AMD and Intel use the same assembly language? I know there are different assembly languages, some that are cross-platform, but I don't know if it makes a difference when building a kernel/OS.
Much of what I've seen talks about DJGPP, I use DevC++ for almost everything I do, can I just use the command line version of GCC that was installed with DevC++, or is DJGPP necessary for these things?
And, this might sound pretty stupid to some of you OS buffs, but do AMD and Intel use the same assembly language? I know there are different assembly languages, some that are cross-platform, but I don't know if it makes a difference when building a kernel/OS.
Well the version of GCC that comes with DevC++ is actually a port of GCC called MinGW. It is recommended that you either use DJGPP or Cygwin because MinGW has some problems that make it hard to use during OS developing.eboyd wrote:Much of what I've seen talks about DJGPP, I use DevC++ for almost everything I do, can I just use the command line version of GCC that was installed with DevC++, or is DJGPP necessary for these things?
Both AMD and Intel processors use the same machine code. I think that you are thinking of the two different syntaxes for assembly code that are out there, Intel and AT&T. Both syntaxes compile to the same machine code. Whether you use Intel or AT&T is largely up to personal preference and the assembler you use. FASM and NASM are two assemblers that use intel syntax and GAS uses AT&T.eboyd wrote:And, this might sound pretty stupid to some of you OS buffs, but do AMD and Intel use the same assembly language? I know there are different assembly languages, some that are cross-platform, but I don't know if it makes a difference when building a kernel/OS.
If you're using windows, I suggest the best compiler to use would be a GCC Cross-Compiler, hosted under Cygwin.eboyd wrote:Much of what I've seen talks about DJGPP, I use DevC++ for almost everything I do, can I just use the command line version of GCC that was installed with DevC++, or is DJGPP necessary for these things?
Not stupid at all. They're pretty much the same, apart from some of the very latest stuff in 64-bit mode. Generally, when one company implements something new, then the other will use the same opcodes so that software doesn't have to be rewritten. Obviously there are some architectural differences with things like SSE support ant MTRRs, but then there are equally differences between different models produced by the same company.eboyd wrote:And, this might sound pretty stupid to some of you OS buffs, but do AMD and Intel use the same assembly language? I know there are different assembly languages, some that are cross-platform, but I don't know if it makes a difference when building a kernel/OS.
Regards,
John
The tutorials at my site are a step by step series in building
a 32 bit OS in descrete detail from scratch (No Grub.)
OS Development Series
Its still in development, so please tell me if you see any errors,
or even suggestions or comments. Thanks, and I hope it helps.
a 32 bit OS in descrete detail from scratch (No Grub.)
OS Development Series
Its still in development, so please tell me if you see any errors,
or even suggestions or comments. Thanks, and I hope it helps.
- KrnlHckr
- Member
- Posts: 36
- Joined: Tue Jul 17, 2007 9:16 am
- Location: Washington, DC Metro Area
- Contact:
And you don't want to introduce any more complexity into an already complex project. Welcome to the world of kernel programming! It's a load of fun - if you are prepared to work.frank wrote:Well the version of GCC that comes with DevC++ is actually a port of GCC called MinGW. It is recommended that you either use DJGPP or Cygwin because MinGW has some problems that make it hard to use during OS developing.eboyd wrote:Much of what I've seen talks about DJGPP, I use DevC++ for almost everything I do, can I just use the command line version of GCC that was installed with DevC++, or is DJGPP necessary for these things?
EDIT: Bran's tutorial (http://www.osdever.net/bkerndev/index.php) is a very nice introduction to kernel development. It has a few rough spots in it that caused me some significant headaches, but a methodical following by you should help tremendously while you learn to crawl. When you are comfortably crawling, you can start to walk by (perhaps) re-implementing Bran's code in your own ways. (By that, of course, I mean improve upon, not just change variable names around!)
"If your code won't run, verify that you are, indeed, using the STABLE branches of your toolchain!" -- KrnlHckr, 2007
That's not quite true. OS development is best done on a compiler that was compiled to make binaries for your OS, or compiled to make generic binaries. Nobody outside of OS developers and hackers need these, so there aren't any generally available. We usually make a crosscompiler for a generic target, so it doesn't try to hack Windows fixes into our OS like leading underscores and alloca calls, nor Unix-like defaults (although I can't mention any, I'm pretty sure there are). Windows-based compilers are the most common source of error in compile processes, with the main focus on DJGPP and MingW since both were hacked severely to work in the target environment "natively" and thus not in any other environment.frank wrote:Well the version of GCC that comes with DevC++ is actually a port of GCC called MinGW. It is recommended that you either use DJGPP or Cygwin because MinGW has some problems that make it hard to use during OS developing.eboyd wrote:Much of what I've seen talks about DJGPP, I use DevC++ for almost everything I do, can I just use the command line version of GCC that was installed with DevC++, or is DJGPP necessary for these things?
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Vista and DJGPP don't go very well together. You have to continually click 'ignore' at these memory violation errors.hckr83 wrote:I'm Assuming your using XP, if you are using Vista, there will be some very weird things you have to do for thigns to work right...
My OS is Perception.