Kernel 2.6.5 build and IA32 Elilo usage

  • EliloMan

    EliloMan - 2004-05-06


       I'm working on using the EFI Linux Boot Loader application (elilo.efi) to load and execute an EFI linux kernel image.

       I am currently using Red Hat 9.0 with Kernel 2.4.20-8. I built an Kernel 2.6.5 image on this Linux platform, and during the 'make config' process, I select 'yes' to have the kernel support EFI. However, the resultant image did not work using the existing legacy Grub, so I suspect that I do really need 'elilo' to boot the new (2.6.5) kernel image.

       Well, here comes the next problem. I downloaded the IA-32 Elilo.efi, and put it in the vfat partition I created during Red Hat 9.0 installation. The partition can be recognized under Shell environment (e.g. fs0: or fs1:). Along with the Elilo.efi, I also put the 2.6.5 Kernel image (I named it as 'vmlinuz' or 'vmlinux') in the same partition.

       As I typed 'elilo vmlinux' or 'elilo' or other combinations all starting with the file name 'elilo' in fs0:/fs1:. They all just hung; meaning the computer will simply crash and hang there. I began to think that perhaps the IA-32 Elilo.efi I downloaded has a problem, it's either my system cannot support it or the elilo.efi is faulty.

       Here comes my questions for whoever can answer my puzzles:
    Q1: How do I build a workable IA32 Elilo.efi? I have downloaded the source code (both gnu-efi-3.0a and elilo-3.5-pre1.src), and I have installed Red Hat 8.0 (where the document says Red Hat 9.0 toolchain may run into some problems). What do I do now?
    Q2: How do I build a workable kernel that supports EFI under Red Hat 8.0? According to my knowledge, any kernel version that comes from 2.6.1 onwards will support EFI.

        Thank you very much in advance!!!

    • Kaike Wan

      Kaike Wan - 2004-11-12

      I ran into a similar problem. I booted a PC with an EFI floppy built from the BuildTip ia-32emb of Intel's Sample Implementation, and tried to load a Linux kernel image (version with elilo. With the prebuilt file elilo-3.5-pre1-ia32.efi downloaded from this site, after typing:
      where fs3:\ contained all the necessary files (elilo.conf, bzImage-, initrd-, the system crashed with INT 5 exception:
        INT 5 Bound -- HALT! ***(00000010:0F5D62FA).

      To figure out the problem, I downloaded the elilo source file elilo-3.5-pre1.src.tgz from this site, and the gnu-efi 3.0a from, and built an elilo.efi from these two packages for ia32 (ARCH=ia32) under Redhat Linux 8.0 3.2-7 (Kernel 2.4.18-14). After booting from the same floppy mentioned above, typed:
      The loader failed with an EFI_STATUS of 0x80000001 (EFI_LOAD_ERROR). Further tracing showed that this occurred in the self-relocator code in gnuefi/reloc_ia32.c, where unhandled reloc entries were encountered and EFI_LOAD_ERROR was returned. As expected, there were about 53 reloc entries of type R_386_RELATIVE and 63 reloc entries of type R_386_NONE, which were handled by the self-relocator code. However, there were also one entry of type R_386_GOTPC and 187 entries of type 0xFB (Unknown to the ELF format, and looks like uninitialized memory), which were not handled by the self-relocator. Ignoring these unknown reloc entries resulted in the failure of the elilo in function sysdeps_init() when loader_register(&bzimage_loader) was called. Tracing showed that the global variable bzimage_loader contained invalid values within the function loader_register() while it showed proper values in the calling function sysdeps_init(), indicating symbol relocation problems.The gcc version is 3.2, the ld version is, and the objcopy version is

      My questions are:
      (1) Has anyone succeeded in loading linux with ia-32 version of elilo under EFI shell built from Intel's Sample Implementation? The document elilo.txt under the source indicates so.
      (2) If yes, under which BuildTip is the EFI host environment (shell) built?
      (3) Has anyone known any problem in converting the object file from ELF to PE32+ with objcopy?

      Any help will be greatly appreciated.

    • Ramasubramanian B

      I am facing a similar problem, I think , the reason has something to do with assembler options. I have the exact same setup - redhat 8.0, gcc 3.2, binutils

      Try writing a hello wrold program with just a OutputString on the TEXT_OUTPUT_INTERFACE. It will work OK. Now add a __asm__ __volatile__ code which also uses one local variable. For me in this case, it compiles fine and objcopy works fine, but the EFI application comes back to the shell. I havent checked the error code, who do the I check that???

      Any help is welcome a great deal....

    • Ramasubramanian B


      I have a twaeked solution. In _relocated change return EFI_LOAD_FAILs to EFI_SUCCESS and printed a warning message there. This time the application manages to load properly.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks