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>
struct distro_rauc_priv *priv;
char *boot_order;
const char **boot_order_list;
+ bool slot_found = false;
int ret;
int i;
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)