install/partition: rearrange cgpt commands in natural order

This workaround is not needed anymore.

Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Reviewed-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C168844148723.7161.318848193297628515-1@git.sr.ht%3E
This commit is contained in:
Anton Bambura 2023-07-04 06:20:05 +03:00 committed by Oliver Smith
parent b1536416ed
commit a3a82f623a
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 11 additions and 14 deletions

View File

@ -145,20 +145,6 @@ def partition_cgpt(args, layout, size_boot, size_reserve):
commands = [
["parted", "-s", "/dev/install", "mktable", "gpt"],
["cgpt", "create", "/dev/install"],
[
"cgpt", "add",
# pmOS_boot is second partition, the first will be ChromeOS kernel
# partition
"-i", str(layout["boot"]), # Partition number
"-t", "efi", # Mark this partition as bootable for u-boot
"-b", boot_part_start,
"-s", s_boot,
"-l", "pmOS_boot",
"/dev/install"
],
# For some reason cgpt switches all flags to 0 after marking
# any partition as bootable, so create ChromeOS kernel partition
# only after pmOS_boot is created and marked as bootable
[
"cgpt", "add",
"-i", str(layout["kernel"]),
@ -171,6 +157,17 @@ def partition_cgpt(args, layout, size_boot, size_reserve):
"-P", "10", # Priority flag
"/dev/install"
],
[
"cgpt", "add",
# pmOS_boot is second partition, the first will be ChromeOS kernel
# partition
"-i", str(layout["boot"]), # Partition number
"-t", "efi", # Mark this partition as bootable for u-boot
"-b", boot_part_start,
"-s", s_boot,
"-l", "pmOS_boot",
"/dev/install"
],
]
dev_size = pmb.chroot.root(