Building a special-purpose OS kernel to support inhouse work.
Development platform is a AMD 1900+ machine running Redhat 9 with 0.93 Grub. Using Gnu gcc compiler, programming in C and in gas assembler.
Got GDT and IDT up and running OK, but as we added ISRs, etc., the Grub boot-loader became increasingly more reluctant to boot the new kernel. Continually get Grub "Error 13: Invalid or unsupported executable format." The new kernel is multiboot-compliant; so that's not the problem, (Magic number etc. OK.) Have gone through the code in detail and can find nothing wrong, and the code compiles without a single warning. Have isolated troubling code; fixed it; and got Grub to accept it. Then added one more line of simple code, and we get Error 13 again. The problem is just getting worse as we continue. It just won't take the IRQ routines.
Have upgraded Grub 0.93 to Grub 2, but that did no good at all. Same problem. Would truly appreciated help on this. We are at our wits-end on this thing.
Some details:
grub.conf is as follows (Amrita.0.2 is kernel under development):
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title Amrita.0.2
root (hd0,0)
kernel /Amrita.0.2
GRUB Error 13 problem
GRUB Error 13 problem
Last edited by satyajit on Fri Sep 29, 2006 9:43 pm, edited 1 time in total.
satyajit
- intel_breaker
- Member
- Posts: 46
- Joined: Tue Jan 04, 2005 12:00 am
- Location: Poland
- Contact:
GRUB Errot 13 problem
Thanks, Greg.
You were right. The problem was indeed in the makefile, but not the ld command. Turns out that Grub, for some reason, did not like the way we were assemblling boot.S. So to keep it simple, we just changed it to a boot.s and multiboot.asm. That works fine.
Appreciate you pointing us in the direction of the makefile. We were focusing, incorrectly, on the code. Thanks again.
Regards,
satyajit
You were right. The problem was indeed in the makefile, but not the ld command. Turns out that Grub, for some reason, did not like the way we were assemblling boot.S. So to keep it simple, we just changed it to a boot.s and multiboot.asm. That works fine.
Appreciate you pointing us in the direction of the makefile. We were focusing, incorrectly, on the code. Thanks again.
Regards,
satyajit
satyajit