basic WORKING os starter

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.
Post Reply
hazardoxide
Member
Member
Posts: 26
Joined: Thu Dec 13, 2007 12:31 pm

basic WORKING os starter

Post by hazardoxide »

Hello all. I was wondering if there is a very basic working os w/ linker, kernel and everything that i can use to study and build upon. i already have grub, rawwrite, bochs, and a c/c++ compiler. but i can learn a lot more if a had a working bootloader/linker/kernel, that all accually worked together.
If bill gates had a dollar for everytime windows crashed...oh wait... he does.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

How would giving you the code on a plate help you to learn?

Depending on what you *ahem* need, these tutorials may help (has sample code):

http://www.jamesmolloy.co.uk
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

If you really want something that works, get linux. (http://www.gentoo.org)

Maybe it would help if you looked for the answers yourself. A list of sample OSes can be found in the wiki (Resources), as well as information on how to get a working toolchain (GCC Cross-Compiler).
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Bran's Kernel Tutorial

Post by djnorthyy »

Also check out Brans Kernel Development Tutorials. This is a very nice intro tutorial. It certianly help me stand on my own two feet. As for bootloaders, use grub to start with, then work you way up to building you own.

If you lack development experince then try building a few tools that would help your development process. For example if you had a network up and running of development computers you could build a tool that updates all of the code and binary files on all of the computers once you had finished editing it.

Harry.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
packet50071
Member
Member
Posts: 43
Joined: Sat Dec 22, 2007 2:27 pm
Location: canada

Post by packet50071 »

Technology is here to make things easier not harder.
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Post by djnorthyy »

How have you completed the bootloader over at BrokenThorn? I cant figure out how.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
packet50071
Member
Member
Posts: 43
Joined: Sat Dec 22, 2007 2:27 pm
Location: canada

Post by packet50071 »

We are hijacking his theard but any way
I planning on doing bootloader after set IRQ and the keyboard driver. I am using grub for now ;)
Technology is here to make things easier not harder.
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Post by djnorthyy »

Have you got any resources for developing a bootloader?
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
packet50071
Member
Member
Posts: 43
Joined: Sat Dec 22, 2007 2:27 pm
Location: canada

Post by packet50071 »

nothing new :(
Technology is here to make things easier not harder.
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Post by djnorthyy »

Oh well, let me know if anything comes up.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

How would giving you the code on a plate help you to learn?
uhm... it helps ALOT. can you honestly say you just magically learned how to code ANY part of an OS without looking at other people's source?

even if you could, which people obviously have, it would take 30 times as long to get basic results.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Source examples are useful, but only ever in pointing out how a specific problem could be solved.

The larger (and more self-contained) the chunk of code, the bigger the risk someone looks at it, thinks he understood, and merely uses the code as a black box, and starting point to all kinds of really annoying problems later on which he can't possibly solve on his own because he didn't grasp the basics.

That's why the Wiki was created, where there are explanatory texts and (links to) code pointing out how various subsystems work.

Moreover, "learning from source" is awfully close to "source is the best documentation", a statement that gives me the screaming willies.
Every good solution is obvious once you've found it.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

@solar: I agree with steering clear of relying on source. I wasn't saying that it was something to use alot either, but it can be a great booster for people new to os devving. Getting ANYTHING to work in bochs even if it is someone elses basic kernel or not is not only a good morality booster, but then it encourages the devver to dig deeper to figure out why theirs works and not their own.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

@OP

IMHO, a user starting out in OS Dev can benefit greatly from decent tutorials with appropriately used code blocks. I would question the benefit of trying to learn from scratch by reading someone else's complete bootloader and kernel source, though. Also, OS Dev tutorials and OS source should certainly not be used as a basis for learning a programming language.

When you have followed the initial tutorials and have some kind of idea how a kernel works, I would then suggest starting from scratch, having designed your OS.

Once you are feeling more like a seasoned OS programmer, you will tend to find that reading datasheets / bits of other kernels / extrapolating from your existing knowlege then becomes a lot more useful.

Cheers,
Adam
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

yes, datasheets are deffinately a key thing in the learning processes of the actual hardware being programmed for. tutorials are good, but I usually only go to them when im in real need or am really stuck on something. CPU manuals are another great source of info.
Post Reply