freebsd-skq/sys/boot/common
Baptiste Daroussin 6a695123b0 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.

Reviewed by:	tsoome
Relnotes:	yes
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D7628
2016-08-31 13:16:40 +00:00
..
bcache.c bcache should support reads shorter than sector size 2016-07-30 17:45:56 +00:00
boot.c loader is filling fixed length command_errbuf with sprintf() and is trusting 2016-08-20 16:23:19 +00:00
bootstrap.h loader is filling fixed length command_errbuf with sprintf() and is trusting 2016-08-20 16:23:19 +00:00
commands.c loader is filling fixed length command_errbuf with sprintf() and is trusting 2016-08-20 16:23:19 +00:00
console.c Prevent loader.conf load failure due to unknown console entries 2016-01-21 15:27:44 +00:00
crc32.c
crc32.h
dev_net.c Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
dev_net.h Refactor net_getparams() to make it easier to get params from sources other 2015-05-18 15:46:43 +00:00
devopen.c
disk.c Fix several instances where the boot loader ignored pager_output 2016-05-18 05:59:05 +00:00
disk.h Fix several instances where the boot loader ignored pager_output 2016-05-18 05:59:05 +00:00
gpt.c Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot 2016-03-16 23:12:19 +00:00
gpt.h Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot 2016-03-16 23:12:19 +00:00
help.common
install.c
interp_backslash.c sys/boot/common: use of spaces vs. TAB. 2016-05-12 01:19:11 +00:00
interp_forth.c sys/boot/common: use of spaces vs. TAB. 2016-05-12 01:19:11 +00:00
interp_parse.c Improve boot loader quote parsing 2016-07-30 17:53:37 +00:00
interp.c loader is filling fixed length command_errbuf with sprintf() and is trusting 2016-08-20 16:23:19 +00:00
isapnp.c sys/boot/common: use of spaces vs. TAB. 2016-05-12 01:19:11 +00:00
isapnp.h
load_elf32_obj.c
load_elf32.c
load_elf64_obj.c
load_elf64.c
load_elf_obj.c Use the ABI-prescribed name for SHT_X86_64_UNWIND in the loader and 2016-04-08 10:23:48 +00:00
load_elf.c Don't set the offset when loading the kernel on the arm loader.efi. The 2016-02-09 09:39:30 +00:00
loader.8 Document loader(8) dumpdev option 2015-11-18 09:42:36 +00:00
ls.c loader is filling fixed length command_errbuf with sprintf() and is trusting 2016-08-20 16:23:19 +00:00
Makefile Install loader(8) and zfsloader(8) only once 2015-06-19 05:42:24 +00:00
Makefile.depend META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
Makefile.inc Fix ubldr build failure on mipsn32 and mipsn32el targets. 2016-03-04 05:36:53 +00:00
md.c A new implementation of the loader block cache 2016-04-18 23:09:22 +00:00
merge_help.awk
misc.c Enable warnings in EFI boot code 2016-01-12 02:17:39 +00:00
module.c loader is filling fixed length command_errbuf with sprintf() and is trusting 2016-08-20 16:23:19 +00:00
newvers.sh Make vers.c creation atomic by using a temporary file, then moving 2015-10-24 21:59:58 +00:00
panic.c
part.c Fix several instances where the boot loader ignored pager_output 2016-05-18 05:59:05 +00:00
part.h Fix several instances where the boot loader ignored pager_output 2016-05-18 05:59:05 +00:00
paths.h Fix mistake when transitioning to the new defines with ZFS loader. I 2016-01-27 16:36:18 +00:00
pnp.c Fix several instances where the boot loader ignored pager_output 2016-05-18 05:59:05 +00:00
rbx.h RBX_ defines are in rbx.h, move it there. 2016-01-26 06:26:44 +00:00
reloc_elf32.c
reloc_elf64.c
reloc_elf.c
self_reloc.c Enable warnings in EFI boot code 2016-01-12 02:17:39 +00:00
ufsread.c Fix EFI UFS caching 2016-01-21 08:58:39 +00:00
util.c It sure would be nice to use printf with wide strings. Implement %S to 2016-05-17 14:10:45 +00:00
util.h
zfsloader.8 Misc mdoc fixes: 2014-11-23 21:00:00 +00:00