Multiloader 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
Rudster816
Member
Member
Posts: 141
Joined: Thu Jun 17, 2010 2:36 am

Multiloader Help

Post by Rudster816 »

I followed the bare bones tutorial (after following the cross-compiler tutorial) but after I create my floppy image, I still get GRUB Error 13. I didnt make any changes to any of the code provided in the bare bones tutorial (do I need to change something in kernel.c?). For me, kernel.bin ends up being 2324 Bytes, so the GRUB command "kernel 200+6" would be correct, but even so, it doesnt work.

I also tried following this tutorial, but it didnt help.

http://wiki.osdev.org/Grub_Error_13

The only output I get from the compilation is when compiling kernel.c I get a unused variable warning (boot_loader_name).

I also used "-i586-elf-gcc" rather than just "gcc" when compiling kernel.c as I read from another thread (just using gcc didnt work), thats the only time I deviated from the bare bone tutorial.

Ive tried doing around a dozen various things, and so far nothing has worked. Any chance someone could upload a working image, and the corresponding kernel.bin, kernel.c, linker.ld, and loader, that way I can eliminate my system\setup as being the problem? Thanks
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Multiloader Help

Post by Combuster »

You should not mix your host toolchain with your cross-compiler. They don't like working together

Use either i586-elf-gcc, i586-elf-as and i586-elf-ld or gcc, as and ld, but not a mixture of both. (nasm doesn't suffer from this problem)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Rudster816
Member
Member
Posts: 141
Joined: Thu Jun 17, 2010 2:36 am

Re: Multiloader Help

Post by Rudster816 »

Combuster wrote:You should not mix your host toolchain with your cross-compiler. They don't like working together

Use either i586-elf-gcc, i586-elf-as and i586-elf-ld or gcc, as and ld, but not a mixture of both. (nasm doesn't suffer from this problem)
Awww... Thanks!!

I knew that :^o
Post Reply