Page 1 of 1

error: no multiboot header found

Posted: Sun Apr 13, 2014 5:10 am
by danielgatis
hi,
i'm following the James Molly tutorial (http://www.jamesmolloy.co.uk/tutorial_html/index.html) at the step that implements IRQ when i compile the code i get this error:
error: no multiboot header found
But when i comment this lines (see below) at irq.c everything works and run normally:

Code: Select all

void k_init_irq() {
  k_irq_remap();

  k_idt_set_entry(32, (uint32_t)k_irq0 , 0x08, 0x8E);
  // k_idt_set_entry(33, (uint32_t)k_irq1 , 0x08, 0x8E);
  // k_idt_set_entry(34, (uint32_t)k_irq2 , 0x08, 0x8E);
  // k_idt_set_entry(35, (uint32_t)k_irq3 , 0x08, 0x8E);
  // k_idt_set_entry(36, (uint32_t)k_irq4 , 0x08, 0x8E);
  // k_idt_set_entry(37, (uint32_t)k_irq5 , 0x08, 0x8E);
  // k_idt_set_entry(38, (uint32_t)k_irq6 , 0x08, 0x8E);
  // k_idt_set_entry(39, (uint32_t)k_irq7 , 0x08, 0x8E);
  // k_idt_set_entry(40, (uint32_t)k_irq8 , 0x08, 0x8E);
  // k_idt_set_entry(41, (uint32_t)k_irq9 , 0x08, 0x8E);
  // k_idt_set_entry(42, (uint32_t)k_irq10, 0x08, 0x8E);
  // k_idt_set_entry(43, (uint32_t)k_irq11, 0x08, 0x8E);
  // k_idt_set_entry(44, (uint32_t)k_irq12, 0x08, 0x8E);
  // k_idt_set_entry(45, (uint32_t)k_irq13, 0x08, 0x8E);
  // k_idt_set_entry(46, (uint32_t)k_irq14, 0x08, 0x8E);
  // k_idt_set_entry(47, (uint32_t)k_irq15, 0x08, 0x8E);
}
So why when i compile with this commented lines my SO works?

the source code is at:
https://github.com/danielgatis/gatix

Re: error: no multiboot header found

Posted: Sun Apr 13, 2014 5:26 am
by Nable
Multiboot header should be located within first xx kB (I don't remember exact limit but you can find it in multiboot specification) of your binary or GRUB won't find it.
One can read http://wiki.osdev.org/Bare_bones#Bootstrap_Assembly + http://wiki.osdev.org/Bare_bones#Linking_the_Kernel to find how to place multiboot structure in the beginning of your kernel file.

Re: error: no multiboot header found

Posted: Sun Apr 13, 2014 5:32 am
by danielgatis
ok, its works thanks!

Re: error: no multiboot header found

Posted: Sun Apr 13, 2014 6:16 am
by sortie