error: no multiboot header found

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
danielgatis
Posts: 4
Joined: Sat Apr 12, 2014 11:07 am

error: no multiboot header found

Post 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
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: error: no multiboot header found

Post 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.
danielgatis
Posts: 4
Joined: Sat Apr 12, 2014 11:07 am

Re: error: no multiboot header found

Post by danielgatis »

ok, its works thanks!
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: error: no multiboot header found

Post by sortie »

Post Reply