diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-08-30 08:20:17 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-02 11:47:50 +0100 |
commit | 93388921ab6fa78658461eefbf0b7beae5a52a9d (patch) | |
tree | cf5c32d3c8621b43cb2aa0e8cc73ed687e50028e /scripts/lib/wic/partition.py | |
parent | 9d9c7d4b0bb8fe7681496804b7afe8fc2d967419 (diff) | |
download | poky-93388921ab6fa78658461eefbf0b7beae5a52a9d.tar.gz |
wic: Add gpt-hybrid partition layout
Add support for formatting a disk with a hybrid MBR & GPT partition
scheme. In this scheme, the primary partitioning method is GPT, but a
valid MBR header is also written than can point to a subset of the GPT
partitions on the disk (any partitions marked with the `--mbr` flag will
be included in this MBR). The primary purpose of this method is to allow
for SoCs that can only find a bootloader in an MBR partition to use GPT
once the bootloader is running. As an example, older versions of the
Raspberry Pi firmware can only parse MBR partitions to find a kernel (or
other bootloader like u-boot), but once those have booted GPT partitions
can be used.
In addition to the partitions annotated with the `--mbr`, a "protective"
GPT partition of type 0xEE is added, as the existence of such a
partition is the indication to tooling that this a hybrid MBR and that
the GPT partition table should be parsed instead.
(From OE-Core rev: e50e4c2a5ada6947b3503ca4d8e9c30d359e8a5d)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/partition.py')
-rw-r--r-- | scripts/lib/wic/partition.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index f11c393df5..b1a2306dd1 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -60,6 +60,7 @@ class Partition(): | |||
60 | self.has_fstab = False | 60 | self.has_fstab = False |
61 | self.update_fstab_in_rootfs = False | 61 | self.update_fstab_in_rootfs = False |
62 | self.hidden = args.hidden | 62 | self.hidden = args.hidden |
63 | self.mbr = args.mbr | ||
63 | 64 | ||
64 | self.lineno = lineno | 65 | self.lineno = lineno |
65 | self.source_file = "" | 66 | self.source_file = "" |