OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 7:59 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: starting up a test os :(
PostPosted: Wed Apr 03, 2002 12:00 am 
Hi, i have some code written in asm and c++
compiled and linked, ready to go, saved on a
bootable floppy disk and loaded with grub.
But when grub tries to load the file
it juest repeats itself.
Failing to load it trying over and over since the
timeout is zero.
I tried it with lilo too, just as a check and the
same again.
Any idea on what's not going right?
The code used is actually code of the net im
trying to test out switching to pmode (im still
learning like that) so its not mine but it looks
cosure and im assuming it should work.


Top
  
 
 Post subject: RE:starting up a test os :(
PostPosted: Thu Apr 04, 2002 12:00 am 
>On 2002-04-03 14:13:35, Brill wrote:
>Hi, i have some code written in asm and c++
>compiled and linked, ready to go, saved on a
>bootable floppy disk and loaded with grub.
>But when grub tries to load the file
>it juest repeats itself.
>Failing to load it trying over and over since the
>timeout is zero.
>I tried it with lilo too, just as a check and the
>same again.
>Any idea on what's not going right?
>The code used is actually code of the net im
>trying to test out switching to pmode (im still
>learning like that) so its not mine but it looks
>cosure and im assuming it should work.
Are you sure that the code works and is not
triple-faulting?

The Legend


Top
  
 
 Post subject: RE:starting up a test os :(
PostPosted: Thu Apr 04, 2002 12:00 am 
>On 2002-04-04 02:49:00, The Legend wrote:
>>On 2002-04-03 14:13:35, Brill wrote:
>>Hi, i have some code written in asm and c++
>>compiled and linked, ready to go, saved on a
>>bootable floppy disk and loaded with grub.
>>But when grub tries to load the file
>>it juest repeats itself.
>>Failing to load it trying over and over since the
>>timeout is zero.
>>I tried it with lilo too, just as a check and the
>>same again.
>>Any idea on what's not going right?
>>The code used is actually code of the net im
>>trying to test out switching to pmode (im still
>>learning like that) so its not mine but it looks
>>cosure and im assuming it should work.
>Are you sure that the code works and is not
>triple-faulting?
>
>The Legend


ok, i can't be sure the code actually works.
Plus i'll be honest, the code was originally written
in C but the c compiler complained about some function
called movedata.
I don't know C so i changed it a little around to
be C++. Here's what happens. The asm sets up pmode.
Then calls the C++ code. The c++ then copies some
stuff to VGA video memory for display.
Thats it.
If the code doesn't work correctly and is tripple
faulting the cpu then shouldn't the whole machine
restart?
Instead of the bootloader trying to load over and
over?
Im fairly sure that my code's ok. It was in another
os example and from sigops.
Plus, i tried that sigops code example hello world os
and it doesn't work. Guessing that code happens to be
pmode 32 bit and the pmode doesn't change.
Does anyone know if that's what the developer wanted to
happen or is there something i didn't do write?


Top
  
 
 Post subject: RE:starting up a test os :(
PostPosted: Thu Apr 04, 2002 12:00 am 
>ok, i can't be sure the code actually works.
>Plus i'll be honest, the code was originally written
>in C but the c compiler complained about some function
>called movedata.
>I don't know C so i changed it a little around to
>be C++. Here's what happens. The asm sets up pmode.
>Then calls the C++ code. The c++ then copies some
>stuff to VGA video memory for display.
>Thats it.
>If the code doesn't work correctly and is tripple
>faulting the cpu then shouldn't the whole machine
>restart?

Right.

>Instead of the bootloader trying to load over and
>over?

Sounds to me like your bootloader isn't actually
being loaded. None of the code is even being executed
because it can't get loaded in the first place.

Are you sure you wrote the loader to disk
properly? Did you describe the loader properly
to GRUB?

Also, is this bootloader grub compatible? It
doesn't assume it's being loaded at 7c00 like a
boot sector, and load more data itself, does it?

>Plus, i tried that sigops code example hello world os
>and it doesn't work. Guessing that code happens to be
>pmode 32 bit and the pmode doesn't change.
>Does anyone know if that's what the developer wanted to
>happen or is there something i didn't do write?

How did you compile the hello world example?
It needs gmake not make.

Did you try booting it using bootmaker with the
-floppy command.

Jeff


Top
  
 
 Post subject: RE:starting up a test os :(
PostPosted: Mon Apr 08, 2002 11:00 pm 
>On 2002-04-04 04:03:16, Brill wrote:
>The asm sets up pmode.

That's wrong for a start. GRUB switches to
protected mode before it jumps to your kernel.
All you need to do is set up your own GDT and
stack.

>Im fairly sure that my code's ok. It was in another
>os example and from sigops.
>Plus, i tried that sigops code example hello world os
>and it doesn't work. Guessing that code happens to be
>pmode 32 bit and the pmode doesn't change.

Sigops used their own boot loader which won't be
compatible with GRUB. Try the Sigops code with
their boot loader to make sure it does work, then
try to make it work with GRUB.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 157 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group