aboutsummaryrefslogtreecommitdiff
path: root/utils/auc
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-02-14 14:24:21 +0000
committerDaniel Golle <daniel@makrotopia.org>2022-02-14 14:25:54 +0000
commit6b041752a00d125a4e651aa56f6abae0e06a59b6 (patch)
tree9c7db64441fbf11bb0a451a1bbd0dfed4d7e282f /utils/auc
parente17a931c49558b1d7337e5749aed12cddffe6ef0 (diff)
auc: fall back to 'sdcard' image
Fallback to use 'sdcard' image in case there is neither 'sysupgrade' nor 'combined' image available. This allows using 'auc' on targets where 'sdcard' image is also used for sysupgrade (such as some mvebu-based devices with eMMC). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'utils/auc')
-rw-r--r--utils/auc/src/auc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/auc/src/auc.c b/utils/auc/src/auc.c
index 6a78d2db8..cd2acc522 100644
--- a/utils/auc/src/auc.c
+++ b/utils/auc/src/auc.c
@@ -1363,6 +1363,10 @@ static int select_image(struct blob_attr *images, const char *target_fstype, cha
ret = get_image_by_type(images, combined_type, fstype, image_name, image_sha256);
if (!ret)
return 0;
+
+ ret = get_image_by_type(images, "sdcard", fstype, image_name, image_sha256);
+ if (!ret)
+ return 0;
}
/* fallback to squashfs unless fstype requested explicitly */
@@ -1372,6 +1376,10 @@ static int select_image(struct blob_attr *images, const char *target_fstype, cha
return 0;
ret = get_image_by_type(images, combined_type, "squashfs", image_name, image_sha256);
+ if (!ret)
+ return 0;
+
+ ret = get_image_by_type(images, "sdcard", fstype, image_name, image_sha256);
}
return ret;