summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-09-20 19:17:34 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-20 19:21:31 +0200
commitd5ab008b35dc691c22b8b643a96b8d178a0328e3 (patch)
tree0ae6c52ad7d64e4bade753479e5c767b19a0a73e
parentd752bc843baa02870be2b11baca09e7e7917aec7 (diff)
downloadgenimage-d5ab008b35dc691c22b8b643a96b8d178a0328e3.tar.gz
genimage-d5ab008b35dc691c22b8b643a96b8d178a0328e3.tar.xz
image-hd: the secondary GPT header should point to the secondary GPT table
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--image-hd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/image-hd.c b/image-hd.c
index 9764529..fcb05d3 100644
--- a/image-hd.c
+++ b/image-hd.c
@@ -308,6 +308,7 @@ static int hdimage_insert_gpt(struct image *image, struct list_head *partitions)
header.header_crc = 0;
header.current_lba = htole64(image->size/512 - 1);
header.backup_lba = htole64(1);
+ header.starting_lba = htole64(image->size/512 - GPT_SECTORS);
header.header_crc = htole32(crc32(&header, sizeof(header)));
ret = insert_data(image, (char *)&table, outfile, sizeof(table),
image->size - GPT_SECTORS*512);