problem after booting kernel

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
vibhory2j

problem after booting kernel

Post 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 = .;
}
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:problem after booting kernel

Post by Candy »

What is it supposed to display?
vibhory2j

Re:problem after booting kernel

Post 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.
Candamir

Re:problem after booting kernel

Post 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...
JoeKayzA

Re:problem after booting kernel

Post 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
vibhory2j

Re:problem after booting kernel

Post 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.
Post Reply