diff options
author | Simon Glass <sjg@chromium.org> | 2023-04-28 13:18:09 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-05-13 09:52:32 -0400 |
commit | 76afc8457eb2f55771d9c9e2ba6106bac43a166b (patch) | |
tree | 7ac46f4aabba98d4037400acd4af8dcb3ff41d33 | |
parent | e94fbdd2729fdcd570035d43f67adda8e0dfc115 (diff) | |
download | u-boot-76afc8457eb2f55771d9c9e2ba6106bac43a166b.tar.gz |
bootstd: Work around missing partition 1
If there is no partition numbered 1, we decide that there are no
partitions at all. That may not be correct, since at least one Debian
installed has just a single partition numbered 2.
Continue searching up to partition 3, just in case.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | boot/bootdev-uclass.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 57d29446476..9660ff75676 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -154,8 +154,15 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk, ret = -ESHUTDOWN; else bflow->state = BOOTFLOWST_MEDIA; - if (ret) + if (ret) { + /* allow partition 1 to be missing */ + if (iter->part == 1) { + iter->max_part = 3; + ret = -ENOENT; + } + return log_msg_ret("part", ret); + } /* * Currently we don't get the number of partitions, so just |