diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-17 10:48:05 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-23 18:11:41 -0500 |
commit | d9f48579dced9c897e718a8b0b84d56ac564a486 (patch) | |
tree | 710c4821aed33cde985e0a0b6f4ca2e52e72ed4c /boot/bootmeth_efi.c | |
parent | 5143a41e10da67fe9542a42e947b6a375f0a08d6 (diff) | |
download | u-boot-d9f48579dced9c897e718a8b0b84d56ac564a486.tar.gz |
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_efi.c')
-rw-r--r-- | boot/bootmeth_efi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 53a0489b93..67c972e3fe 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -140,6 +140,10 @@ static int distro_efi_check(struct udevice *dev, struct bootflow_iter *iter) if (bootflow_iter_check_blk(iter) && bootflow_iter_check_net(iter)) return log_msg_ret("blk", -ENOTSUPP); + /* This works on block devices and network devices */ + if (iter->method_flags & BOOTFLOW_METHF_PXE_ONLY) + return log_msg_ret("pxe", -ENOTSUPP); + return 0; } |