[ipxe-devel] elilo patch for iPXE download protocol
Jarrod Johnson
jarrod.b.johnson at gmail.com
Tue Aug 16 21:03:07 UTC 2011
I have patched elilo to use IPXE exported capabilities to download
kernel/initrd/config. It probably only builds on linux/gcc/x86_64
combination due to the hackish way I coped with the calling convention
situation. I'm hoping some UEFI guru will enlighten me on the correct way.
In short, elilo code seems to have a 'uefi_call_wrapper' to swap the
registers around to make calls *to* uefi, but does not have a provision for
calls from UEFI to itself. This means it expected DI, RSI, RDX, RCX, R8,
R9 to be the arguments instead of RCX, RDX, R8, R9. I'm presuming there is
GCC magic to be had that I don't understand right now.
In 'legacy' world, you can build ipxe and the syslinux pxelinux.0 and have
the latter detect and make use of the former (they go a step further and
actually bundle both in a single binary). This gives pxelinux.0 the iPXE
protocol support without having to change much.
This is the analogous capability for elilo. It comes in two halves. iPXE
needed to have capabilities exposed in a UEFI protocol in much the same way
it exports it in 'legacy boot'. Those patches to ipxe are:
https://git.ipxe.org/people/jbjohnso/ipxe.git/commit/d748ebf72206dcde1379b063fd9b533f7572caa5
https://git.ipxe.org/people/jbjohnso/ipxe.git/commit/e7b41890bc67350a9f5bcf7291ec859fa2174e26
https://git.ipxe.org/people/jbjohnso/ipxe.git/commit/45a51f99fd51b231a388b1db00dfc4b18a5e9e4f
https://git.ipxe.org/people/jbjohnso/ipxe.git/commit/23aea6c209965546c39569a770823eabf1358a71
Apply those and 'make bin-x86_64-efi/snponly.efi and you have something much
like undionly.kkpxe, but for UEFI.
My (admittedly shoddy) patch for elilo 3.14 is attached.
The fruit of my labor:
88879.550706 192.168.121.208 -> 192.168.127.253 TFTP Read Request, File:
snponly.efi\000, Transfer type: octet\000
88879.551387 192.168.121.208 -> 192.168.127.253 TFTP Read Request, File:
snponly.efi\000, Transfer type: octet\000
88879.864373 192.168.121.13 -> 192.168.127.253 HTTP GET
/tftpboot/xcat/xnba/nodes/fr1 HTTP/1.1
88879.865929 192.168.121.13 -> 192.168.127.253 HTTP GET
/tftpboot/elilo-x64.efi HTTP/1.1
88879.872902 192.168.121.13 -> 192.168.127.253 HTTP GET
/tftpboot/C0A879D0.conf HTTP/1.1
88880.466286 192.168.121.13 -> 192.168.127.253 HTTP GET
/tftpboot/xcat/rhels6/x86_64/vmlinuz HTTP/1.1
88880.561916 192.168.121.13 -> 192.168.127.253 HTTP GET
/tftpboot/xcat/rhels6/x86_64/initrd.img HTTP/1.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20110816/2e54bbb1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elilo-ipxe.patch
Type: application/octet-stream
Size: 8733 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20110816/2e54bbb1/attachment.obj>
More information about the ipxe-devel
mailing list