bootstd: rauc: Only require partitions for one slot

Partitions can be become unusable due to power cuts or failed updates.
Use the bootmeth RAUC if partitions for at least one slot exist. The
bootmeth can then select the working slot.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Tested-by: Martin Schwan <m.schwan@phytec.de>
This commit is contained in:
Leonard Anderweit
2025-11-18 15:30:21 +01:00
committed by Tom Rini
parent 5d7c080ae5
commit 962711498d

View File

@@ -99,6 +99,7 @@ static int distro_rauc_scan_parts(struct bootflow *bflow)
struct distro_rauc_priv *priv;
char *boot_order;
const char **boot_order_list;
bool slot_found = false;
int ret;
int i;
@@ -120,16 +121,20 @@ static int distro_rauc_scan_parts(struct bootflow *bflow)
if (desc) {
ret = fs_set_blk_dev_with_part(desc, slot->boot_part);
if (ret)
return log_msg_ret("part", ret);
continue;
fs_close();
ret = part_get_info(desc, slot->root_part, NULL);
if (ret)
return log_msg_ret("part", ret);
continue;
slot_found = true;
}
}
str_free_list(boot_order_list);
return 0;
if (slot_found)
return 0;
return -1;
}
static int distro_rauc_read_bootflow(struct udevice *dev, struct bootflow *bflow)