[ipxe-devel] Target bin-arm64-efi/snponly.efi compiles NIC drivers

Christian Nilsson nikize at gmail.com
Sat Jun 24 08:10:25 UTC 2017

On Sat, Jun 24, 2017 at 7:10 AM, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> Christian just created
> http://ipxe.org/appnote/buildtargets/.
> According to this page target snponly.efi does only uses the NIC driver
> supplied by the efi environment.
> So I would expect that no hardware drivers for network cards have to be
> compiled.
> But when I issue
> make bin-arm64-efi/snponly.efi
> I find in the output lines like:
>   [DEPS] drivers/net/ath/ath9k/ath9k_ar5008_phy.c
> and
>   [BUILD] bin-arm64-efi/rtl8185_rtl8225.o.
> AR5000 and rtl8185 are WLAN chips.

iPXE always compiles all .c files, this is needed to dynamically
identify what needs to be linked and how.

> Furthermore the size of snponly.efi and snp.efi is nearly the same:
> -rw-r--r-- 1 root root 164576 Jun 24 06:19 snponly.efi
> -rw-r--r-- 1 root root 164416 Jun 23 20:19 snp.efi
> Shouldn't snponly.efi be tangibly smaller than snp.efi?

snponly and snp only differs in how it identifies bootable nic, it is
still only the same snp driver that is included in both, to include
other drivers you need to build accordingly.

> For details of what goes into snponly.efi see the output below.
> All NIC drivers are in blib.a which is statically linked into
> snponly.efi.tmp which is then converted to snponly.efi.

To see what actually goes in to any particular binary use
cat [platform]/[driver].tmp.map

> I guess it would help to cut down build time to create separate static
> libraries for hardware drivers and other drivers.

Which is not possible, see above.
but for faster builds take advantage of parallel builds with the
standard -j I usually go for 8 or 16 even on few cored machines due to
the number of many small files the spin up/down seems to be the
majority of time spent.


> Targets snponly and undionly would not have to build the hardware driver
> library.
> Best regards
> Heinrich Schuchardt

More information about the ipxe-devel mailing list