diff options
author | bapt <bapt@FreeBSD.org> | 2016-10-19 13:26:07 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-10-19 13:26:07 +0000 |
commit | 83fbe0035b4271799832a877abf0806f2602c9ab (patch) | |
tree | ade1d093d4a0180e46b2e308fdf6692b7d2aa464 /sys/boot/efi/loader/conf.c | |
parent | 9837f2846a73d054cd7637ec275baa49506a0216 (diff) | |
download | FreeBSD-src-83fbe0035b4271799832a877abf0806f2602c9ab.zip FreeBSD-src-83fbe0035b4271799832a877abf0806f2602c9ab.tar.gz |
MFC: 304677, 304680, 305125, 305770, 305769
r304677:
Add tftpfs support for the EFI loader
Allow netbooting on efi without having to setup any NFS server by rebuilding the
loader with LOADER_TFTP_SUPPORT like for the i386 pxeloader
r305125:
Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi
Add a new 'netproto' variable which can be set for now to
NET_TFTP or NET_NFS (default to NET_NONE)
From the dhcp options if one sets the root-path option to:
"ip:path", the loader will consider it is booting over NFS
(meaning same behaviour as the default current behaviour)
if the dhcp option "tftp server address" is set (option 150)
the loader will consider it is booting over tftpfs, it will then
consider the root-path options with 2 possible case
1. "path" then the IP of the tftp server will be the one passed by
the option 150, and the files will be retrieved under "path" on the tftp
server
2. "ip:path" then the IP of the tftp server will be the one passed in
the option "overwritting the IP from the option 150.
We could not "abuse" the rootpath option in the form or tftp://ip:path because
this is already used for other purpose by iPXE preventing any chainload from
iPXE to the FreeBSD loader.
Given at each open(), the loader loops over all available filesystems and keep
the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa.
the tftpfs and nfs implementation in libstand now return EINVAL early if
'netproto' for that purpose.
Relnotes: yes
Sponsored by: Gandi.net
Diffstat (limited to 'sys/boot/efi/loader/conf.c')
-rw-r--r-- | sys/boot/efi/loader/conf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/boot/efi/loader/conf.c b/sys/boot/efi/loader/conf.c index ecbf8b0..3596a63 100644 --- a/sys/boot/efi/loader/conf.c +++ b/sys/boot/efi/loader/conf.c @@ -51,6 +51,7 @@ struct fs_ops *file_system[] = { &dosfs_fsops, &ufs_fsops, &cd9660_fsops, + &tftp_fsops, &nfs_fsops, &gzipfs_fsops, &bzipfs_fsops, |