summaryrefslogtreecommitdiff
path: root/boot/bootmeth_pxe.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 20:48:05 +0300
committerTom Rini <trini@konsulko.com>2023-01-24 02:11:41 +0300
commitd9f48579dced9c897e718a8b0b84d56ac564a486 (patch)
tree710c4821aed33cde985e0a0b6f4ca2e52e72ed4c /boot/bootmeth_pxe.c
parent5143a41e10da67fe9542a42e947b6a375f0a08d6 (diff)
downloadu-boot-d9f48579dced9c897e718a8b0b84d56ac564a486.tar.xz
bootstd: Treat DHCP and PXE as bootdev labels
These are associated with the ethernet boot device but do not match its uclass name, so handle them as special cases. Provide a way to pass flags through with the bootdev so that we know how to process it. The flags are checked by the bootmeths, to ensure that only the selected bootmeth is used. While these both use the network device, they work quite differently. It is common to run only one of these, or to run PXE before DHCP. Provide bootflow flags to control which methods are used. Check these in the two bootmeths so that only the chosen one is used. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/bootmeth_pxe.c')
-rw-r--r--boot/bootmeth_pxe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c
index 13e2ff486d..ecf8557af8 100644
--- a/boot/bootmeth_pxe.c
+++ b/boot/bootmeth_pxe.c
@@ -48,6 +48,9 @@ static int distro_pxe_check(struct udevice *dev, struct bootflow_iter *iter)
if (ret)
return log_msg_ret("net", ret);
+ if (iter->method_flags & BOOTFLOW_METHF_DHCP_ONLY)
+ return log_msg_ret("dhcp", -ENOTSUPP);
+
return 0;
}