What do I need to build an operating system

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.
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Re: What do I need to build an operating system

Post by kenneth_phough »

I have a White Box Enterprise Linux on an Emulator on my windows but I am not used to AT&T architecture assembly. Plus my emulator doesn't function right. Is there a free emulator I can use to run Linux and write my OS with a Intel architecture assembly?
I don't really have a computer I can sacrfice to for just os dev because I do my school work on my winXP. I do have a PC desktop which I can install Linux but it's CD and FD drives are broken and I don't think it is worth getting a new one.
"Unless mankind redesigns itself by changing our DNA through altering our genetic makeup, computer-generated robots will take over our world" - Stephen Hawking
NatsuOS: 32-bit, multitasking, HFS+ Filesystem
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: What do I need to build an operating system

Post by carbonBased »

I believe qemu can run linux in a virtual machine. I use qemu to run my OS, as well.

--Jef
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: What do I need to build an operating system

Post by JAAman »

just use WinXP: get a win32 compiler instead of DJGPP (there are several ports of GCC) which is designed for DOS not windows and is therefore slower and more error prone

GCC/DJGPP can use intel systax - though i don't remember how (myself i use VC++/masm+nasm)
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Re: What do I need to build an operating system

Post by kenneth_phough »

I'll try both qemu and a win32 compiler.
I do have VC .Net. Do you think that would work as my compiler?
I can't remember what the other gcc compiler was called which starts with an M (something like MIG or MIN 32...?). Would that work instead? Thanks.

-Ken
"Unless mankind redesigns itself by changing our DNA through altering our genetic makeup, computer-generated robots will take over our world" - Stephen Hawking
NatsuOS: 32-bit, multitasking, HFS+ Filesystem
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: What do I need to build an operating system

Post by JAAman »

there are 2: cygwin and ming32(or something like that)

cygwin is far more popular but i'v never used either

you should be able to use vc.net (just don't link to the win32 libs -- and compile to native not .net)
in fact MS compiler is well known as one of the most standards complient compilers around
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Re: What do I need to build an operating system

Post by kenneth_phough »

I couldn't figure out how I can get MInGW to work on my computer. Would I be able to compile my Kernel on a Mac?
Or would that be harder? Thanks.

- Kenneth
"Unless mankind redesigns itself by changing our DNA through altering our genetic makeup, computer-generated robots will take over our world" - Stephen Hawking
NatsuOS: 32-bit, multitasking, HFS+ Filesystem
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: What do I need to build an operating system

Post by JAAman »

try cygwin instead of mingw(as i understand mingw has some problems and a lot more people use it so you can get better help)


or you could use MS VC++ compiler
it is free(if you can find the download -- last i checked they moved it and i'm not sure where


you could compile on MAC but it would require you to compile a cross-compiler first
User avatar
stevenup7002
Member
Member
Posts: 60
Joined: Tue Sep 20, 2005 11:00 pm
Location: Ireland
Contact:

Re: What do I need to build an operating system

Post by stevenup7002 »

I wont bother reading through the posts but heres my answer:

A bootsector
-GRUB can be used
-You can make your own

A kernel
-Memory manager (Vital if you want an os to work
-Bootstrap (if you want to run in protected mode)
-V86 handler (really only if your running in PMODE)
-Device drivers
-Task managing

A GUI/ Console
-A gui (prounounced gooey) is for if you want to have e.g. A start menu, Graphics, stuff.
-A console is for if you want a DOS style OS e.g. type somthing to make it work

Compilers
-Bochs, a free emulator and open source
-VMWARE, a very good emulator, not free
-Microsoft Virtual PC, its OK, but it doesnt emulate a processor so your using the one you have.
-Emu8086, very good if you want to emulate just binary files or exe/com/boot
-QEMU, I dont know anything about this one!!!

Compilers/Assemblers



-Nasm, a good assembler
-GCC, a good C compiler
-emu8086, Basic assembler

I hope this helps you,
Good Luck

-steven
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Re: What do I need to build an operating system

Post by kenneth_phough »

will I be able to use the gcc command on cygwin? I wasn't sure how I can use cygwin to compile stuff. Thanks

-Kenneth
"Unless mankind redesigns itself by changing our DNA through altering our genetic makeup, computer-generated robots will take over our world" - Stephen Hawking
NatsuOS: 32-bit, multitasking, HFS+ Filesystem
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: What do I need to build an operating system

Post by Legend »

Yes, you can use gcc then. Might require tinkering with your path var however.
*post*
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Re: What do I need to build an operating system

Post by kenneth_phough »

I was able to use gcc to compile some simple stuff (i.e. Hello World) but I was never able to compile Bran's Kernel Development Tutorial on www.osdever.net. Could it be because I am using it on a windows XP home edition? I've tried minGW but couldn't get that to work either. I do have cygwin but I don't know how I can compile sample kernels with it. How would I be able to compile things on cygwin and are there any other compilers that might work?
-Thank you very much. It's been great help.

Kenneth
"Unless mankind redesigns itself by changing our DNA through altering our genetic makeup, computer-generated robots will take over our world" - Stephen Hawking
NatsuOS: 32-bit, multitasking, HFS+ Filesystem
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: What do I need to build an operating system

Post by JAAman »

there are lots of compilers (anything that can compile platform-independant 32bit PMode code will work)

you could use the MS compiler(free if you can find it) or the Intel compiler (very expensive but extreamly efficient) or some other compiler

(btw: not likely to be a problem with XPhome)

compiling with cygwin should be the same as with most other GCC based compilers
(don't have much experience myself yet)
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: What do I need to build an operating system

Post by Da_Maestro »

There is a lot of posts on this forum that say, "What do I need to do to start writing an OS"!

Doesn't anybody read any previous forum entries!
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
Post Reply