aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-08-23 13:53:38 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-08-23 13:53:38 +0000
commitadd3a4c20d0b74825c24205d215cf420c88ae778 (patch)
tree6d6fc432d261375677ce3e33f8bf3299f83f7bbf /sys/boot
parentbf6911cd089289f27bbc17fe8ac058113036be89 (diff)
downloadsrc-add3a4c20d0b74825c24205d215cf420c88ae778.tar.gz
src-add3a4c20d0b74825c24205d215cf420c88ae778.zip
EFI loader: only open/close on the net device with tftpfs
It prevents issuing a dhcp request before each file open As a consequence netbooting over tftpfs is significantly faster Sponsored by: Gandi.net
Notes
Notes: svn path=/head/; revision=304680
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/efi/libefi/Makefile2
-rw-r--r--sys/boot/efi/loader/Makefile2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile
index a9441a404ce2..058a86cbb50c 100644
--- a/sys/boot/efi/libefi/Makefile
+++ b/sys/boot/efi/libefi/Makefile
@@ -14,7 +14,7 @@ SRCS+= time_event.c
.endif
.if defined(LOADER_TFTP_SUPPORT)
-CFLAGS+= -DLOADER_TFTP_SUPPORT
+CFLAGS+= -DLOADER_TFTP_SUPPORT -DNETIF_OPEN_CLOSE_ONCE
.endif
# We implement a slightly non-standard %S in that it always takes a
diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile
index e811b5053bca..5e193596badb 100644
--- a/sys/boot/efi/loader/Makefile
+++ b/sys/boot/efi/loader/Makefile
@@ -22,7 +22,7 @@ SRCS= autoload.c \
vers.c
.if defined(LOADER_TFTP_SUPPORT)
-CFLAGS+= -DLOADER_TFTP_SUPPORT
+CFLAGS+= -DLOADER_TFTP_SUPPORT -DNETIF_OPEN_CLOSE_ONCE
.endif
.if ${MK_ZFS} != "no"