1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-03 08:21:30 +02:00

bootstd: Only scan bootable partitions

At present all partitions are scanned, whether marked bootable or not.
Use only bootable partitions, defaulting to partition 1 if none is
found.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-01-17 10:47:42 -07:00
committed by Tom Rini
parent dcffa4428d
commit f0e358f07d
4 changed files with 50 additions and 3 deletions

View File

@@ -123,6 +123,7 @@ enum bootflow_flags_t {
* @method: Current bootmeth
* @max_part: Maximum hardware partition number in @dev, 0 if there is no
* partition table
* @first_bootable: First bootable partition, or 0 if none
* @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
@@ -144,6 +145,7 @@ struct bootflow_iter {
int part;
struct udevice *method;
int max_part;
int first_bootable;
int err;
int num_devs;
int cur_dev;