Skip to content

Commit

Permalink
Allow EKS partitions to be omitted on t210 platforms
Browse files Browse the repository at this point in the history
as they are optional.

Signed-off-by: Matt Madison <[email protected]>
  • Loading branch information
madisongh committed Sep 20, 2021
1 parent bf9e7be commit 4696c4b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tegra-bootloader-update.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 4696c4b

Please sign in to comment.