Bootloader help

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
a07859
Posts: 10
Joined: Mon May 24, 2010 10:28 am
Contact:

Bootloader help

Post by a07859 »

I tried to make Fat32 bit bootloader on a flash disk. but it can't load the kernel. Can anybody help me to correct the boot code?
Attachments
KERNEL.asm
(1.89 KiB) Downloaded 32 times
test.asm
(8.98 KiB) Downloaded 74 times
User avatar
mark3094
Member
Member
Posts: 164
Joined: Mon Feb 14, 2011 10:32 pm
Location: Australia
Contact:

Re: Bootloader help

Post by mark3094 »

I've just had a quick look, and it looks like you are loading the kernel to 0100:0000 in test.asm, but the ORG directive in kernel.asm is 0000h.

In my bootloader, I have the first stage load the second stage at 0050:0000. Then at the start of stage 2, I use the [ORG 0x500] directive. Stage 2 then enters protected mode, enables A20, etc and loads a basic kernel (I'm still working on the Kernel).

At this point it doesn't look like you have a 32-bit bootloader, as you haven't entered protected mode (I'm presuming that you are using x86 architecture)

I hope this helps
Post Reply