aboutsummaryrefslogtreecommitdiff
path: root/boot/bootmeth_script.c
diff options
context:
space:
mode:
authorSimon Glass2023-01-17 10:48:05 -0700
committerTom Rini2023-01-23 18:11:41 -0500
commitd9f48579dced9c897e718a8b0b84d56ac564a486 (patch)
tree710c4821aed33cde985e0a0b6f4ca2e52e72ed4c /boot/bootmeth_script.c
parent5143a41e10da67fe9542a42e947b6a375f0a08d6 (diff)
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_script.c')
-rw-r--r--boot/bootmeth_script.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/boot/bootmeth_script.c b/boot/bootmeth_script.c
index a14c750ff61..225eb18ee6c 100644
--- a/boot/bootmeth_script.c
+++ b/boot/bootmeth_script.c
@@ -27,6 +27,8 @@
static int script_check(struct udevice *dev, struct bootflow_iter *iter)
{
/* This works on block devices, network devices and SPI Flash */
+ if (iter->method_flags & BOOTFLOW_METHF_PXE_ONLY)
+ return log_msg_ret("pxe", -ENOTSUPP);
return 0;
}