Hi,
I was trying to implement keyboard support into my OS, but I ran into similar problem, so I started from bare bones. I have installed GCC cross-compiler with Cygwin. I have added solution from wiki, but it doesn’t work. When I compile and run it, GrUB displays “Error 13: Invalid or unsupported executable format”. What am I doing wrong?
NASM version: 2.08.02-1
GCC and G++ version: 3.4.4-999
Sorry for another Error 13 question. I didn’t found solution in other topics
PS: Can I use Eclipse with Cygwin?
GrUB Error 13 and Cygwin
GrUB Error 13 and Cygwin
- Attachments
-
- MyOS.zip
- (58.36 KiB) Downloaded 57 times
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: GrUB Error 13 and Cygwin
I've tried compiling your kernel on my setup (GCC 4.4.1 i586-elf), and the multiboot header is valid. Qemu is able to boot it with the -kernel option. So I don't know what your are doing wrong.
However, it seems that you are using the default cygwin compiler to build your kernel, instead of the cross compiler. This is probably linking the kernel as PE instead of elf, hence grub cannot understand it.
However, it seems that you are using the default cygwin compiler to build your kernel, instead of the cross compiler. This is probably linking the kernel as PE instead of elf, hence grub cannot understand it.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: GrUB Error 13 and Cygwin
Yes, my command was wrong. I should cal i586-elf-ld instead of ld.
I tried to boot on real hardware, but grub wrote on screen “loading stage2 ….” I was using USB stick and boot header from iso file (generated by genisoimage).
Most likely I had wrong boot header and it couldn’t load stage2 and kernel?
I tried to boot on real hardware, but grub wrote on screen “loading stage2 ….” I was using USB stick and boot header from iso file (generated by genisoimage).
Most likely I had wrong boot header and it couldn’t load stage2 and kernel?