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 /include/bootflow.h | |
parent | 5143a41e10da67fe9542a42e947b6a375f0a08d6 (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 'include/bootflow.h')
-rw-r--r-- | include/bootflow.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/bootflow.h b/include/bootflow.h index 319dda8e0b..9c6610bb92 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -105,6 +105,21 @@ enum bootflow_flags_t { }; /** + * enum bootflow_meth_flags_t - flags controlling which bootmeths are used + * + * Used during iteration, e.g. by bootdev_find_by_label(), to determine which + * bootmeths are used for the current bootdev. The flags reset when the bootdev + * changes + * + * @BOOTFLOW_METHF_DHCP_ONLY: Only use dhcp (scripts and EFI) + * @BOOTFLOW_METHF_PXE_ONLY: Only use pxe (PXE boot) + */ +enum bootflow_meth_flags_t { + BOOTFLOW_METHF_DHCP_ONLY = 1 << 0, + BOOTFLOW_METHF_PXE_ONLY = 1 << 1, +}; + +/** * struct bootflow_iter - state for iterating through bootflows * * This starts at with the first bootdev/partition/bootmeth and can be used to |