From 9e63d5820c3ab680c8ea1a5c7be5c6acf41a4bd2 Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Fri, 21 Jan 2022 15:10:36 +0100 Subject: [PATCH] Support generating GPT partition tables (MR 2160) The PPP will, in combination with tow-boot, boot with GPT on the internal storage. We need to support that on postmarketOS and as a first step, let's make it possible to generate GPT images and boot from that --- pmb/config/__init__.py | 1 + pmb/install/partition.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py index 4f583ea7..4e246261 100644 --- a/pmb/config/__init__.py +++ b/pmb/config/__init__.py @@ -707,6 +707,7 @@ deviceinfo_attributes = [ "sd_embed_firmware_step_size", "partition_blacklist", "boot_part_start", + "partition_type", "root_filesystem", "flash_kernel_on_update", diff --git a/pmb/install/partition.py b/pmb/install/partition.py index 82499859..cd2808b7 100644 --- a/pmb/install/partition.py +++ b/pmb/install/partition.py @@ -71,8 +71,10 @@ def partition(args, size_boot, size_reserve): # will stop there (see #463). boot_part_start = args.deviceinfo["boot_part_start"] or "2048" + partition_type = args.deviceinfo["partition_type"] or "msdos" + commands = [ - ["mktable", "msdos"], + ["mktable", partition_type], ["mkpart", "primary", filesystem, boot_part_start + 's', mb_boot], ]