Page 1 of 3

Tools for OS Dev

Posted: Sun Jun 18, 2006 6:52 am
by kenneth_phough
I'm new to operating system development so I'm not sure exactly what tools I would need. From what I've read gcc and some kind of assembler is necessary. I have SuSE 10.1 with KDE 3.5. The only tool I have right know is gcc. I'm not sure which assembler to get (i.e. nasm or fasm etc.). Also are there any other tools I should get that I don't know of.
Thanks,
Kenneth

Posted: Sun Jun 18, 2006 9:17 am
by Daedalus
You're using linux, so the tools should all be there already.

Might want to get nasm, it's used by a few OS's I know.

Apart from that, you should be all set. GCC is the GNU Compiler Collection, and has its own linker, assembler, compilers, etc.

Posted: Sun Jun 18, 2006 9:27 am
by JAAman
From what I've read gcc and some kind of assembler is necessary
this is somewhat of a misconception -- any compiler can be used, and many languages (though C is generally considered easier, and most people use it, so its easier to get better help if your using it)

gcc already has a compiler (gas) but most people seem prefer an external assembler like nasm (i use nasm mostly, and MSVC++ (though i havent really used it much), and some people use intels linux compiler)

another important tool is either several spare computers to test on, or a virtual machine -- preferably both:
bochs -- generally considered best, because of its diagnostic tools
VMware player -- more difficult to configure, and isnt as helpful when you have trouble
ive heard rummors that there is a free version of virtualPC also, but i havent confirmed that

btw: every tool i mentioned in this post is completely free (legally), and downloadable online


other than that, your most important tool is references, some good ones are:

## ---- ----- ------ Intel Manuals
this should be your closest companion -- these are indespencable -- especially at the begining, you can download all 5 books in PDF format (handy for searching) and order hard copies (good for reading)

i personally recomend reading volume 3a at least 2 times before begining -- especially chapters 3-6, though make sure you understand everything in chapter 2 first -- esp if you dont have much experience in x86 ASM programming


## ---- ----- RBIL
this is a very useful reference for many things -- even if you are useing a pre-made bootloader, as it isnt just about the bios (though even that can be useful)


OS faq
this is one of the best places for good information -- lots of general information about many important topics


Geezer
the information repository for one of the greatest names in OSdev history -- if your around long, you will most certainly either borrow, study, or quote his work (especially well known for his work on mouse and video drivers)



ATA-ATAPI
you wont likely need much here for a while (most people begin work on FDD -- since its easier to boot on spare computers), but this site is an excellant source of information about HDDs and optical drives, and the ATA/ATAPI specification in general



BonaFide OS Dev
lots of very good tutorials, look here for help


OSRC
lots of information on hardware -- look here for technical specification, and hardware information


and of course this site -- if you get stuck, or have problems, just ask

Posted: Sun Jun 18, 2006 4:53 pm
by kenneth_phough
Thank you very much. This helped a lot! :D
-Kenneth

Posted: Mon Jun 19, 2006 9:49 am
by pepito
I use GCC, NASM and Bochs, but I suggest to you to buy a good book about OS Theor too. I allways work with one next to me!

Some time we try to programm an OS without really understand what we are doing. We read one or two tutorials about memory management, some about process, another aobut devices drivers, and other one about file systems. And then we belive that we are ready to write our code!

Programming an OS is a very hard job, but some author have written very good books about how we can be build one, some of these books with code and examples.

Good look, you will need it ;)

MMURTL

Posted: Mon Jun 19, 2006 8:08 pm
by kenneth_phough
I have a book called "MMURTL V1.0 - aka Developing your own 32 bit OS" by Richard A Burgess and also one on the Linux kernel and another on the UNIX kernel. Would these books help or should I get another just on OS theory?
-Thanks
Kenneth

Re: MMURTL

Posted: Mon Jun 19, 2006 8:27 pm
by rexlunae
kenneth_phough wrote:I have a book called "MMURTL V1.0 - aka Developing your own 32 bit OS" by Richard A Burgess and also one on the Linux kernel and another on the UNIX kernel. Would these books help or should I get another just on OS theory?
-Thanks
Kenneth
I have "Developing Your Own 32-Bit OS" and, although I got a few useful tidbits of information from it early on, MMURTL is a terrible OS in many ways, built with non-standard and unportable tools, and mostly written in assembly. I won't go into full details of the problems that MMURTL has, but I recommend getting design ideas elsewhere.

Posted: Tue Jun 20, 2006 5:28 am
by kenneth_phough
What are some OS theory books you recommend?
-Thanks
Kenneth

Starting OS devlopment

Posted: Tue Jun 20, 2006 9:25 am
by DeletedAccount
:D Hi ken,
Linux is a good platform for os devlopment.Actually
u only need an assembler for making an OS.....But
TO make ur job easier following tools are required.
1)Nasm(popular),Fasm(good!)
2)gcc ver version >3.0
3)qemu(best) -great little emulator for linux
but make sure that you have SDL already installed
Easy to use also.
--bochs (good) --but diffiult to use, u need to edit
the configuration files --bit messy
4)learn the use of dd command (beleive me
u will initially make only a floppy based OS!)
Now you have a good development platform

Posted: Tue Jun 20, 2006 11:42 am
by carbonBased
kenneth_phough wrote:What are some OS theory books you recommend?
-Thanks
Kenneth
The Tanenbaum books are good for theory. I find some university text's are pretty good, as well... but then... some are pretty basic, as well. You'd definitly want to browse the TOC and a few chapters to see how indepth they get and whether they actually describe several algorithms for a certain task, or simply one algorithm, that the author has somehow deemed the best.

There's a book out there something to the effect of "the design of unix system v." This is good for getting some background on the unix design philosophy (not that I think it's the best design, but it's good to know it, and realize what you like, and what you don't like from it).

I also found "protected mode systems architecture" to be a good book. While not a design book, it intimately details the x86 pmode platform and allows you to realize what kind of design details will, and will not, work on this platform.

Cheers,
Jeff

Re: Starting OS devlopment

Posted: Tue Jun 20, 2006 11:50 am
by carbonBased
SandeepMathew wrote::D Hi ken,
Linux is a good platform for os devlopment.Actually
u only need an assembler for making an OS
You technically don't even need that -- gas is a perfectly capable assembler if you understand AT&T syntax assembly.
SandeepMathew wrote: 4)learn the use of dd command (beleive me
u will initially make only a floppy based OS!)
For that matter, learn all the unix commands, and there are several that are especially useful that many people don't even realize they have at their disposal (eg, addr2line, objcopy, objdump).

Posted: Tue Jun 20, 2006 11:55 am
by chase
carbonBased wrote:
kenneth_phough wrote:What are some OS theory books you recommend?
-Thanks
Kenneth
I also found "protected mode systems architecture" to be a good book. While not a design book, it intimately details the x86 pmode platform and allows you to realize what kind of design details will, and will not, work on this platform.
I'll second the vote for Protected Mode System Architecture. It's by far my favorite book for understanding x86 memory and protected mode. The pages in mine are actually falling out :)

For OS theory I typically tend to like the UNIX internals type of books. Most of them will have some theory but also show some implementation which is nice.

Posted: Tue Jun 20, 2006 3:02 pm
by rexlunae
kenneth_phough wrote:What are some OS theory books you recommend?
-Thanks
Kenneth
I have a book called "The Design and Implementation of the 4.4 BSD Operating System", written by the people who actually developed 4.4BSD. I think there's also an equivalent book now about FreeBSD. Its pretty good at explaining how the various parts of their OS work, and unlike MMURTL, it's BSD is an OS that people really use. The book is more about concepts then code, but it's a good idea to get the concepts before getting too far into the task.

Posted: Tue Jun 20, 2006 5:35 pm
by pepito
The "Operating Systems: Design and Implementation" and "Modern Operating Systems" by Andrew S. Tanenbaum are good books. But my favorite is "Operating Systems" by Milan Milankovic, it is easy to read and has been translated to several languages.

Posted: Tue Jun 20, 2006 6:59 pm
by SpooK
I have both "Operating System Concepts" and "Operating Systems: Design and Implementation". I would have to say the former beats AST's book hands down.

As for the "Operating System Concepts" VS. "Modern Operating Systems", that is another story altogether... I've heard them compared as equals. "Operating System Concepts" is probably a little bigger hit on the pocket book $$$.