diff options
author | Simon Glass <sjg@chromium.org> | 2022-07-31 00:52:27 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-12 15:17:11 +0300 |
commit | c627cfc14c08a803f5aa9e39d841dcf990d8d034 (patch) | |
tree | 17a5e5c90db361f5df94fa42c77531450fa0a58b /include/bootmeth.h | |
parent | ee8ab07e3039d945889dccd8e8ab7adfb9f8c30c (diff) | |
download | u-boot-c627cfc14c08a803f5aa9e39d841dcf990d8d034.tar.xz |
bootstd: Allow scanning for global bootmeths separately
Typically we want to find and use global bootmeths first, since they have
the best idea of how the system should boot. We then use normal bootmeths
as a fallback.
Add the logic for this, putting global bootmeths at the end of the
ordering. We can then easily scan the global bootmeths first, then drop
them from the list for subsequent bootdev-centric scans.
This changes the ordering of global bootmeths, so update the
bootflow_system() accordingly.
Drop the comment from bootmeth_setup_iter_order() since this is an
exported function and it should be in the header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootmeth.h')
-rw-r--r-- | include/bootmeth.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/bootmeth.h b/include/bootmeth.h index c93367b099..50ded055f3 100644 --- a/include/bootmeth.h +++ b/include/bootmeth.h @@ -209,10 +209,12 @@ int bootmeth_boot(struct udevice *dev, struct bootflow *bflow); * ordering there, then all bootmethods are added * * @iter: Iterator to update with the order + * @include_global: true to add the global bootmeths, in which case they appear + * first * Return: 0 if OK, -ENOENT if no bootdevs, -ENOMEM if out of memory, other -ve * on other error */ -int bootmeth_setup_iter_order(struct bootflow_iter *iter); +int bootmeth_setup_iter_order(struct bootflow_iter *iter, bool include_global); /** * bootmeth_set_order() - Set the bootmeth order |