install/partition: set efi flag with cgpt
Some devices (veyron) have read-only primary GPT record on eMMC and parted can't handle it. It results in U-Boot not being able to boot from eMMC. Fix it by setting efi flag with cgpt instead of parted. Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org> Reviewed-by: Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C168844148723.7161.318848193297628515-0@git.sr.ht%3E
This commit is contained in:
parent
1e3eea7087
commit
b1536416ed
|
@ -150,19 +150,12 @@ def partition_cgpt(args, layout, size_boot, size_reserve):
|
|||
# pmOS_boot is second partition, the first will be ChromeOS kernel
|
||||
# partition
|
||||
"-i", str(layout["boot"]), # Partition number
|
||||
"-t", "data",
|
||||
"-t", "efi", # Mark this partition as bootable for u-boot
|
||||
"-b", boot_part_start,
|
||||
"-s", s_boot,
|
||||
"-l", "pmOS_boot",
|
||||
"/dev/install"
|
||||
],
|
||||
# Mark this partition as bootable for u-boot
|
||||
[
|
||||
"parted",
|
||||
"-s", "/dev/install",
|
||||
"set", str(layout["boot"]),
|
||||
"boot", "on"
|
||||
],
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue