Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Kernel 2.6.5 build and IA32 Elilo usage

Kaike Wan
2004-11-12
2013-05-02
  • 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 1.10.14.62, and tried to load a Linux kernel image (version 2.6.8.1) with elilo. With the prebuilt file elilo-3.5-pre1-ia32.efi downloaded from this site, after typing:
        fs3:\elilo-3.5-pre1-ia32
    where fs3:\ contained all the necessary files (elilo.conf, bzImage-2.6.8.1, initrd-2.6.8.1.img), 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 ftp://ftp.hp1.com/pub/linux-ia64/gnu-efi-3.0a.tar.gz, 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:
        fs3:\elilo
    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 2.13.90.0.2, and the objcopy version is 2.13.90.0.2.

    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.

     
  • 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 2.13.90.0.2.

    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....

     
  • Hi,

    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.

    Regards,
    Ram.