Creating a bootloader

If you are new to development, plan on spending some time here before visiting the other forums.

Moderator:Moderators

Post Reply
brainbarshan
Posts:9
Joined:Fri Feb 19, 2010 12:58 pm
Creating a bootloader

Post by brainbarshan » Tue Feb 23, 2010 2:27 pm

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???

xixpsychoxix
Posts:59
Joined:Tue Oct 13, 2009 8:49 pm

Re: Creating a bootloader

Post by xixpsychoxix » Tue Feb 23, 2010 4:11 pm

is your kernel not being loaded at all or is it not executing properly (or not at all)?

brainbarshan
Posts:9
Joined:Fri Feb 19, 2010 12:58 pm

Re: Creating a bootloader

Post by brainbarshan » Tue Feb 23, 2010 6:54 pm

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)

StephanvanSchaik
Posts:2
Joined:Mon Feb 22, 2010 7:40 pm

Re: Creating a bootloader

Post by StephanvanSchaik » Tue Feb 23, 2010 9:34 pm

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.

Post Reply