Tom, your install.h doesn't help me. I have a bootsector that loads my second stage loader. How would I compile them together? The second-stage loader loads into pmode and jumps to 0x1000. I then have another file load my c kernel.
I compiled my source but when I run it in bochs I get this error:
Code:
00000237336i[BIOS ] FATAL: Not a bootable disk
00000237635p[BIOS ] >>PANIC<< BIOS panic at rombios.c, line 1550
This is how I am compiling my code:
Code:
nasm -f aout -o mboot.o mboot.o
nasm -f aout -o mloader.o mloader.o
ld -Ttext=0x1000 --oformat binary -o boot.bin mboot.o mloader.o
gcc -ffreestanding -c kernel.c -o kernel.o
nasm -f aout load.asm -o load.o
ld -Ttext=0x1000 --oformat binary -o kernel32.bin kernel.o load.o
makeboot test.img boot.bin kernel32.bin
I have a feeling that I'm not compiling my code right. Can anybody help me.