Please help me(somehow beginner)
Please help me(somehow beginner)
Thank all you for your best forums with more info.
I'm a beginner and I wanna write an OS ,so I wanna know about it's sequences means where to put mbr(not sector0,I mean how to end the files) where to put pmode codes,where to load FS,where and where and where.It makes a gap in my mind.please help me.
[email protected]
I'm a beginner and I wanna write an OS ,so I wanna know about it's sequences means where to put mbr(not sector0,I mean how to end the files) where to put pmode codes,where to load FS,where and where and where.It makes a gap in my mind.please help me.
[email protected]
Re:Please help me(somehow beginner)
http://www.osdev.org/osfaq2/ is the WikiFAQ we keep handy for such purposes. Also try the thread "quick links".
Every good solution is obvious once you've found it.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Please help me(somehow beginner)
"where" as "where in the system RAM" ?
If this is the question, just check out Perica's tutorial about realmode memory organization and do whatever you want in the 'free area'...
If this is the question, just check out Perica's tutorial about realmode memory organization and do whatever you want in the 'free area'...
Re:Please help me(somehow beginner)
I checked all the things you said and will say but ...
Re:Please help me(somehow beginner)
Really?Administrator2004 wrote: I checked all the things you said...
Hm, you can see into the future?...and will say...
OK, let's try to work out the question. What are you asking?but...
Are you asking about what order to make things in, or are you asking about how Boot Sectors are loaded? Do you wonder how to determine the layout of your RAM?
Come on, help us. The better the question, the better the answers.
Every good solution is obvious once you've found it.
Re:Please help me(somehow beginner)
Excuse me if i annoy you.
Think that i have all the files(mbr,pmode,fs,kernel),how to make them work together.
Think that i have all the files(mbr,pmode,fs,kernel),how to make them work together.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Please help me(somehow beginner)
'intriguing" is a better word for the current situation.Excuse me if i annoy you.
Let's try to sketch a battle plan:
MBR has to know where the 2nd stage loader reside on disk and where it should be placed in memory. "where on disk" will be decided by the tool that installs 2nd stage, which will have to patch the MBR appropriately (e.g. keep the last free bytes for a first sector/sector count)
The second stage loader will contain code to switch to pmode and FS driver (optionnal) It will use the FS driver to locate the kernel file and load it in memory (whatever location your kernel wishes. It could be at 0x10000 if 512KB is enough for your kernel or starting at 1MB (using unreal mode) if you need more room). Then it invokes the part that switches to pmode and finally jumps to the kernel.
Hope it Helps ...
Re:Please help me(somehow beginner)
Pype had the right word - 'intriguing'. Your initial posts didn't tell us enough to give good answers.Administrator2004 wrote: Excuse me if i annoy you.
You mention "pmode", "fs", and "kernel". I take it that "pmode" is the code enabling Protected Mode. What is "fs"? Yes, I know it stands for "file system", but... is that just a piece of code allowing to localize the kernel image on-disk? Or is it a driver module that's loaded by your kernel?
And (please, people from the "write your own bootloader" camp, don't flame me), have you considered using an existing bootloader like GRUB, which relieves you of mbr, pmode, and fs?
Every good solution is obvious once you've found it.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Please help me(somehow beginner)
*gg*
GRUB helps getting stright into the real thing.
Althou, bear with me, writing some small boot loader, which fetches a few blocks from disk, sets an initial GDT enables protected mode and jumps to the previously loaded executeable - it is some kind of extremely satisfying experience about the barest nitty gritty of OS dev to see the own hacked-together bootloader fetching some program from disk and starting it.
Mark: it is not required to do this kind of lowlevel stuff, but it's a useful experience lateron: you know what happens and can set maybe appropriate actions if something doesn't work. At least you know what to expect.
mark2: I don't advocate for writing an own bootloader. I just think it is a cool experience.
stay safe.
GRUB helps getting stright into the real thing.
Althou, bear with me, writing some small boot loader, which fetches a few blocks from disk, sets an initial GDT enables protected mode and jumps to the previously loaded executeable - it is some kind of extremely satisfying experience about the barest nitty gritty of OS dev to see the own hacked-together bootloader fetching some program from disk and starting it.
Mark: it is not required to do this kind of lowlevel stuff, but it's a useful experience lateron: you know what happens and can set maybe appropriate actions if something doesn't work. At least you know what to expect.
mark2: I don't advocate for writing an own bootloader. I just think it is a cool experience.
stay safe.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Please help me(somehow beginner)
I will ask more questions because I love to know
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Please help me(somehow beginner)
Feel invited to do so, but do some research on your own too.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Please help me(somehow beginner)
I wholeheartedly second this. Although I have long since left my own bootloader on the wayside and succumbed to the benefits of GRUB (read: my bootloader stopped working when my kernel grew bigger and I decided my time was better spent working on actual OS development), there have been few experiences while developing my OS that rival that of being able to say "I turned the computer on and I was actually able to make it DO something with nobody else's code helping me out"beyond infinity wrote:Althou, bear with me, writing some small boot loader, which fetches a few blocks from disk, sets an initial GDT enables protected mode and jumps to the previously loaded executeable - it is some kind of extremely satisfying experience about the barest nitty gritty of OS dev to see the own hacked-together bootloader fetching some program from disk and starting it.
I would recommend it for anybody that is just getting into OS development and doesn't mind struggling through it. It really gives you an appreciation and greater knowledge of what exactly is involved in getting from a freshly booted computer to a running operating system. If nothing else, as BI said, it can certainly come in handy with any low-level problems in the future.