Page 1 of 1

problem after booting kernel

Posted: Sun Mar 19, 2006 2:20 pm
by vibhory2j
I have compiled a small kernel. Earlier it was correctly executing on bochs and through floppy. But now after adding some features the kernel is compiling fine. ... but it is not executing the way it is intended to be .
after the grub menu it gives the following message and than hangs....
Booting 'MAGNUM OPUS'

root (fd0)
Filesystem type is ext2fs, using whole disk
kernel /kernel.bin
[Multiboot-kludge, loadaddr=0x100000, text-and-data=0x3000, entry=0x10000
This message is printed in both bochs and when booted through floppy.

Here is my linker script:
OUTPUT_FORMAT("binary")
OUTPUT("kernel.bin")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys) {
code = .;
*(.text)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
   *(.rodata*)   
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}

Re:problem after booting kernel

Posted: Sun Mar 19, 2006 2:42 pm
by Candy
What is it supposed to display?

Re:problem after booting kernel

Posted: Sun Mar 19, 2006 8:31 pm
by vibhory2j
I had inserted small video, keyboard and other related drivers. and the kernel was able to print and keyboard interrupt was working fine.
it is suppose to print the information given in the main function.

Re:problem after booting kernel

Posted: Sun Mar 19, 2006 9:23 pm
by Candamir
Maybe it would be useful to clear your screen before doing anything; I would recommend you to clear the screen in the video driver intialisation function, as the very last thing.

BTW, post some of your code...

Re:problem after booting kernel

Posted: Mon Mar 20, 2006 2:25 am
by JoeKayzA
vibhory2j wrote: I had inserted small video, keyboard and other related drivers. and the kernel was able to print and keyboard interrupt was working fine.
it is suppose to print the information given in the main function.
Grub's message says that the load was successful, so there doesn't seem to be a problem with the multiboot header. Chances are that your kernel hangs in endless loop before it could display anything. Also mind that bochs doesn't reboot on a triple fault, so you might want to check the console output for this.

cheers Joe

Re:problem after booting kernel

Posted: Tue Mar 21, 2006 1:17 pm
by vibhory2j
Hi,
Still no success.....
I think there is no fault occuring in the kernel as i am getting the same kind of output on the console when booted system through floppy.
and yes i am just going to see if the kernel is going in any endless loop or not.
please also tell me which code of the kernel i should present here for scrutiny.