iPXE discussion forum
Minimal iPXE build - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Minimal iPXE build (/showthread.php?tid=10528)

Minimal iPXE build - Morian - 2017-11-11 12:05

Hi !

I needed to build a iPXE EFI loader and everything works quite well so far.
There's an embedded script using the many possibilities of iPXE (thanks for that!).
But this loader is meant to be distributed across a large number of (similar) devices, so I started to look at reducing the generated binary size (starting from ~950KiB)

I found that building secure-boot enabled reduces the size to ~500KiB.
With further features tweaking (through config/local/*.h), I made this a little bit smaller, but it still included a lot of drivers I don't need.
I found no official way to specify a list of drivers, so I started to dig the Makefile a little bit and came with the solution of adding DRIVERS_ipxe=intel on the make invocation (as I only need a specific Intel driver).

Final size is 134KiB and still works as expected.

Do you feel like this technique is safe and future-proof or am I missing something to specify a list of drivers?

Thanks Smile

RE: Minimal iPXE build - NiKiZe - 2017-11-12 11:10

Some documentation for selecting drivers: http://ipxe.org/appnote/buildtargets

if you just want it small use the snponly.efi build which should work on all devices that already have network boot support and provides SNP/NII driver.

If you actually need multiple drivers then build via the intel--rtl8169--snp.efi syntax.

for only intel you will just build with intel.efi

RE: Minimal iPXE build - Morian - 2017-11-18 19:31

Wow, I did not know how I missed that page.
It's definitively helping a lot, thanks!