compiling the sample grub Multiboot kernel... please 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
mike57

compiling the sample grub Multiboot kernel... please help

Post by mike57 »

ok, I have been googling for weeks, reading the grub docs and disecting other multiboot kernels and I can seem to be able to figure out how to link the startup code and the kernel main file... can someone please give me a small code snippet to work with... my goal is to be able to compile an ELF multiboot kernel for GRUB so I can start deving on my kernel but im about ready to give up because it seems that there is nothing on the matter... please help me, i would be very grateful
ezanahka

RE:compiling the sample grub Multiboot kernel... please help

Post by ezanahka »

Could you be a little more specific? What *exactly* is the problem? You could post a little more detailed information...

- Esa
Khumba

RE:compiling the sample grub Multiboot kernel... please help

Post by Khumba »

Hello, I hope you're still there. Sorry if I'm digging up a dead topic, but it took me a long time to figure out how to build this too, and I think this needs to be easier to find. After you get the bootable disk with GRUB and a filesystem with a menu.lst on it, here is how to compile it:

gcc -I. -c boot.S
gcc -I. -fno-builtin -c kernel.c
ld boot.o kernel.o -o kernel -nostdlib -N -Ttext 0x100000
cp kernel /mnt/floppy/boot
Post Reply