iPXE discussion forum

Full Version: Minimal iPXE build
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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
Wow, I did not know how I missed that page.
It's definitively helping a lot, thanks!
Reference URL's