1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 17:52:07 +02:00

bootstd: Record the bootdevs used during scanning

Add a way to record the bootdevs used when scanning for bootflows. This is
useful for testing.

Enable this only with BOOTSTD_FULL and do the same for the progress
reporting.

Re-enable and update the affected tests now that we have this feature.

For bootdev_test_order_default() there is no-longer any support for using
the bootdev aliases to specify an ordering, so drop that part of the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-01-17 10:48:17 -07:00
committed by Tom Rini
parent 4b7cb058df
commit a950f2855a
3 changed files with 63 additions and 43 deletions

View File

@@ -14,6 +14,10 @@
struct bootstd_priv;
struct expo;
enum {
BOOTFLOW_MAX_USED_DEVS = 16,
};
/**
* enum bootflow_state_t - states that a particular bootflow can be in
*
@@ -173,7 +177,9 @@ enum bootflow_meth_flags_t {
* @err: Error obtained from checking the last iteration. This is used to skip
* forward (e.g. to skip the current partition because it is not valid)
* -ESHUTDOWN: try next bootdev
* @num_devs: Number of bootdevs in @dev_order
* @num_devs: Number of bootdevs in @dev_used
* @max_devs: Maximum number of entries in @dev_used
* @dev_used: List of bootdevs used during iteration
* @labels: List of labels to scan for bootdevs
* @cur_label: Current label being processed
* @num_methods: Number of bootmeth devices in @method_order
@@ -196,6 +202,8 @@ struct bootflow_iter {
int first_bootable;
int err;
int num_devs;
int max_devs;
struct udevice *dev_used[BOOTFLOW_MAX_USED_DEVS];
const char *const *labels;
int cur_label;
int num_methods;