From 4696c4b7c6231faafa9df1712fd4f1010f6341d3 Mon Sep 17 00:00:00 2001 From: Matt Madison Date: Mon, 20 Sep 2021 10:28:11 -0700 Subject: [PATCH] Allow EKS partitions to be omitted on t210 platforms as they are optional. Signed-off-by: Matt Madison --- tegra-bootloader-update.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tegra-bootloader-update.c b/tegra-bootloader-update.c index 31a2305..6cbfc3d 100644 --- a/tegra-bootloader-update.c +++ b/tegra-bootloader-update.c @@ -699,17 +699,21 @@ order_entries_t210 (struct update_entry_s *orig, struct update_entry_s **ordered return 0; } memset(used, 0, sizeof(used)); - for (i = 0; i < update_list->count; i++) { + for (i = 0, retcount = 0; i < update_list->count; i++) { ent = find_entry_by_name(orig, count, update_list->partnames[i]); if (ent == NULL) { - fprintf(stderr, "Error: payload or partition not found for %s\n", - update_list->partnames[i]); - return 0; + /* EKS partitions are optional */ + if (memcmp(update_list->partnames[i], "EKS", 3) == 0) + continue; + else { + fprintf(stderr, "Error: payload or partition not found for %s\n", + update_list->partnames[i]); + return 0; + } } - ordered[i] = ent; + ordered[retcount++] = ent; used[ent-orig] = true; } - retcount = update_list->count; for (i = 0; i < count; i++) { if (!used[i]) ordered[retcount++] = &orig[i];