Where to start ?

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.
csezol

Where to start ?

Post by csezol »

I know C, and Assembly ( Real Mode ) at a medium level, and Protected Mode at a very beginner one.. I have some ideas for an os, I'd like to implement them, but i dunno where to start.. ??? No, i don't want to start with a bootloader..

What should i write first ? Include files, or <<usual>> .C files ? I dunno. I've written some simple programs, where headers only contained #defines, and there were `round 2-3.. i dunno how does this work at bigger projects. Please help.. ( not this way: Go, work on a bigger project and experience! )
I'm ready to learn, and want to learn.. I have time ;)
falconfx

Re:Where to start ?

Post by falconfx »

Hello!

I'd suggest you to read the Bran's kernel tutorial: http://www.osdever.net/bkerndev/index.php?the_id=90

It's the simplest OSDev tutorial I've ever read. I myself used it to write my first kernel... ;)

You should also get the Intel x86 bible, read and understand it.
You can surf the OSFAQ or other osdev-related sites to read some code-snippets.

And last but not least, don't forget to ask here for every problem! :)

Cheers,

falconfx
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Where to start ?

Post by Pype.Clicker »

I strongly suggest you get a look at the BareBones page on the FAQ too. And _please_, avoid using DJGPP. I know brendan uses it in its tutorial, but you're *really* better to use cygwin instead ...
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Re:Where to start ?

Post by kataklinger »

Put your ideas on paper first (a like using UML), and as you are planning read documets, tutorials, specifications...
But to do this you'll need some experience, so try writting some protected mode code (entering pm, using paging...), just to know how stuff works in reality.

1. ideas = 24% of job
2. reading = 24% of job
3. planning = 24% of job
4. implementation = 24% of job
total: 96% (it can never be 100%) :)
Enlight

Re:Where to start ?

Post by Enlight »

I'm currently following the same tutorial, and i find it really great. Meanwhile I found two bugs at this time, one happens only (AFAIK) while target is i-686-pc-gnu-linux (it defaults to -fno-leading-underscore).

The second one, I guess is target independant, and managing to fix it forced was my best coding experience at this time so I don't know if I must tell you what it is, but the puts function doesn't works if you follow strictly the tutorial.
jason7007

Re:Where to start ?

Post by jason7007 »

Hi,

Is the build batch file in Bran's Kernel Development will be correct for Cygwin?

If not , can someone convert it for Cygwin, please.

Any help would be appreciated.
Cjmovie

Re:Where to start ?

Post by Cjmovie »

If you have cygwin properly setup it should work the same just fine...
raywill

Re:Where to start ?

Post by raywill »

Pype.Clicker wrote: avoid using DJGPP.
I am a beginner.Can you tell us why should avoid using DJGPP?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Where to start ?

Post by Pype.Clicker »

raywill wrote:
Pype.Clicker wrote: avoid using DJGPP.
I am a beginner.Can you tell us why should avoid using DJGPP?
* it is fairly obsolete (requiring MS-DOS)
* it will be terribly slow to run in MS-Windows environment
* there have been number of reports like "i cannot get those files linked together" or "i cannot get ELF files produced" or whatever that were solved by using cygwin instead
* at numerous places, it still requires the DOS interface (for shell interaction, file names, etc), meaning that you'll still suffer limitations on command line length enforced 20 years ago.

cygwin will offer you basically the same tools (gcc, binutils, flex, yacc, nasm) plus a common unix environment (grep, cut, less, perl, etc.) that is suited for windows 9x and windows NT (and yes, windows XP, since that one is exactly like NT for that purpose).
csezol

Re:Where to start ?

Post by csezol »

I run slackware
JAAman

Re:Where to start ?

Post by JAAman »

best thing you can do is get

[url=http://developer.intel.com/design/pentium4/manuals/index_new.htm#sdm_vol1]
## ---- ----- ------ Intel Manuals[/url]

and

[url=http://www.cs.cmu.edu/~ralf/files.html]
## ---- ----- RBIL[/url]


also the following websites have been very helpful:

[url=http://www.nondot.org/sabre/os/articles]
OSRC[/url]
[url=http://www.ata-atapi.com/]
ATA-ATAPI[/url]
[url=http://www.osdever.net/]
Boni-Fide OSdever[/url]
[url=http://www.osdev.org]
OSDev.org message board[/url]

(though it isn't as active as MT, and carbonbased -- one of the best over there -- has been posting here resently)

if you don't want to start with a bootloader, then get GRUB, and start from the example kernel, that way you have something to boot -- that always helps, then just keep adding to it

good luck!
jason7007

Re:Where to start ?

Post by jason7007 »

Hi,

I compiled Bran's Kernel Dev tutorial in Cygwin, but to no avail.
ld could not recognize the start.o format.

What's wrong with the build file or with link script?

Any help will be appreciated.
Cjmovie

Re:Where to start ?

Post by Cjmovie »

Try changing:

Code: Select all

nasm -f aout -o start.o start.asm
to:

Code: Select all

nasm -f elf -o start.o start.asm
csezol

Re:Where to start ?

Post by csezol »

Can i also assemble into pe ? ( with nasm )
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Where to start ?

Post by Pype.Clicker »

nasm -hf should tell ... mine does.
Post Reply