Page 1 of 1

Creating a bootloader

PostPosted: Tue Feb 23, 2010 2:27 pm
by brainbarshan
I am trying to build a bootloader from the tutorial of operating system development series. i have a separate kernel file which i made earlier and used grub to boot it. I downloaded the Demo4 package from here and tried to use. The kernel file provided with the Demo4 package is being loaded. But when I replace my kernel file ( i renamed it) , it is not being loaded. any ideas???

Re: Creating a bootloader

PostPosted: Tue Feb 23, 2010 4:11 pm
by xixpsychoxix
is your kernel not being loaded at all or is it not executing properly (or not at all)?

Re: Creating a bootloader

PostPosted: Tue Feb 23, 2010 6:54 pm
by brainbarshan
the kernel is being copied but is not executing
actually the system restarts when this instruction is reached:
Code: Select all
jmp   CODE_DESC:IMAGE_PMODE_BASE; jump to our kernel! Note: This assumes Kernel's entry point is at 1 MB
(from stage2 boot)

Re: Creating a bootloader

PostPosted: Tue Feb 23, 2010 9:34 pm
by StephanvanSchaik
brainbarshan wrote:the kernel is being copied but is not executing
actually the system restarts when this instruction is reached:
Code: Select all
jmp   CODE_DESC:IMAGE_PMODE_BASE; jump to our kernel! Note: This assumes Kernel's entry point is at 1 MB
(from stage2 boot)

It most likely ran into a triple fault and that can only mean one thing: the place you're jumping to is filled with nonsense data. Use Bochs as your debugger and check your Assembly code.


Regards,
Stephan J.R. van Schaik.