The GPT standard requires that we reserve either 34 512 sectors, or 6 4k
sectors before starting partitions. However, we don't currently don't
enforce these minimums. This is 2 sectors + 16k of space.
Sponsored by: Netflix
Differential D42245
mkimg: Ensure GPT Entry Array is at least 16k imp on Oct 17 2023, 2:28 AM. Authored by Tags None Referenced Files
Subscribers
Details The GPT standard requires that we reserve either 34 512 sectors, or 6 4k Sponsored by: Netflix The old code produces 00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| 00000210 ea c7 2f 95 00 00 00 00 01 00 00 00 00 00 00 00 |../.............| 00000220 04 60 09 00 00 00 00 00 03 00 00 00 00 00 00 00 |.`..............| 00000230 02 60 09 00 00 00 00 00 12 7a a9 63 4a f6 ed 11 |.`.......z.cJ...| 00000240 a7 d3 e0 d5 5e 1e 73 bd 02 00 00 00 00 00 00 00 |....^.s.........| 00000250 04 00 00 00 80 00 00 00 58 9c b0 81 00 00 00 00 |........X.......| Which has 3 is the FirstLBA and 4 as the number of entries. The correct output I claim is: 00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| 00000210 d8 2e 74 5a 00 00 00 00 01 00 00 00 00 00 00 00 |..tZ............| 00000220 42 60 09 00 00 00 00 00 22 00 00 00 00 00 00 00 |B`......".......| 00000230 21 60 09 00 00 00 00 00 84 7b f1 cc 98 6c ee 11 |!`.......{...l..| 00000240 a8 54 a0 36 9f 09 4f 1e 02 00 00 00 00 00 00 00 |.T.6..O.........| 00000250 80 00 00 00 80 00 00 00 71 5c 49 7b 00 00 00 00 |........q\I{....| which has first LBA is 0x22 / 34 and num entires of 0x80 / 128. These are the desired values.
Diff Detail
Event TimelineComment Actions braino: min will return the smaller number. We want it to return the
Comment Actions It would be really good to get (some version of) this into the tree and on the build machine before the next RC build. Comment Actions Update headers included, use howmany and improve (I claim) the comments Comment Actions
You can edit it through the Phab web UI though.
|