hi "XenOS"
i just want to know one thing
i want to know where does the problem come from ?
is it the code ,linker script or compiler?
that all i want to know
[SOLVED]C Kernel can't be loaded using GRUB (Error 13)
Re: C Kernel can't be loaded using GRUB (Error 13)
To allocate your kernel properly in RAM and start executing it, GRUB needs your kernel to be in specific format, like ELF or PE and etc. Which one you choose it up to you.
If you want to stick with PE format (which is produced by linker) then you do NOT have to create Cross Compiler. Why? Because MinGW is the GCC port to Windows. So Windows is MinGW's target platform. That is why MinGW's linker will ALWAYS produce PE format as an output. (That's why OUTPUT_FORMAT(elf32-i386) will NEVER work on MinGW) So the only thing you have to do is to configure GRUB, so that it will be informed that your kernel is in PE format. You have been told in the previous posts how to set up flags for GRUB to do this.
If you would like to stick with ELF format then you will have to build your own Cross Compiler. The idea of Cross Compiler is that when you build it (i. e. compile it from the source codes) - you specify the TARGET platform. Remember that MinGW's target platform is Windows? Yeah, that's why MinGW produces PE format. But when you will build your Cross Compiler - you will tell that you want your Cross Compiler to produce ELF format.
Basically that's all. You have 2 options.
If you want to stick with PE format (which is produced by linker) then you do NOT have to create Cross Compiler. Why? Because MinGW is the GCC port to Windows. So Windows is MinGW's target platform. That is why MinGW's linker will ALWAYS produce PE format as an output. (That's why OUTPUT_FORMAT(elf32-i386) will NEVER work on MinGW) So the only thing you have to do is to configure GRUB, so that it will be informed that your kernel is in PE format. You have been told in the previous posts how to set up flags for GRUB to do this.
If you would like to stick with ELF format then you will have to build your own Cross Compiler. The idea of Cross Compiler is that when you build it (i. e. compile it from the source codes) - you specify the TARGET platform. Remember that MinGW's target platform is Windows? Yeah, that's why MinGW produces PE format. But when you will build your Cross Compiler - you will tell that you want your Cross Compiler to produce ELF format.
Basically that's all. You have 2 options.
Re: C Kernel can't be loaded using GRUB (Error 13)
Thank you Guys it Works !!!!!!
------------------------------------
for other devolopers who had the same problem:-
the corrected files are in the attachment for other OS devolopers
the Kernel is in PE format. ----------------------------------
Thank You XenOS
Thank You Haroogan
Thank You egos
Thank You combuster
------------------------------------
for other devolopers who had the same problem:-
the corrected files are in the attachment for other OS devolopers
the Kernel is in PE format. ----------------------------------
Thank You XenOS
Thank You Haroogan
Thank You egos
Thank You combuster