Wednesday, August 12, 2009

Linux 2.6 Kernel Compilation

Linux Kernel Compilation
  1. arch/x86/boot/boot.h:112 'Error: bad register name '%dil'
  • This error occurs when trying to compile a version of kernel lower than what is running.
  • This error can be fixed by replacing "=r" with "=q" in the affected line. "dil" (lower 8 bits part of [RE]DI) register is inexistent under x86-32, only available under x86-64.
  • Check out this link: diff for boot.h
  1. Undefined reference to __umoddi3
  2. Undefined reference to __moddi3
  • Error due to gcc version 4.3