I used Windows/MSVS/ICC to develop my os. (it compiles for both x86 and x86-64)
But now I'm using Ubuntu for 2 month or so and I like *nix concept.
So I'm trying to get a minimal hello-world compiling in linux.
Started with bare-bones stuff and built x86-64 cross-compiler recently.
I'm using GRUB 0.97 and kludge method to load x86-64 binary.
When I create a floppy using
Code: Select all
dd if=/dev/zero of=pad.bin bs=1 count=750
cat grub/stage1 grub/stage2 pad.bin build/kernel64.bin > floppy.img
Code: Select all
kernel 200+18
boot
Code: Select all
[Multiboot-kludge, loadaddr=0x200000, text-and-data=0x2000
Error 13: Invalid or unsupported executable format
Thanks in advance.
P.S. I attached the sources. [UPDATED]
you'll need nasm, gcc, qemu, make
just run
Code: Select all
make run