summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChee Yang Lee <chee.yang.lee@intel.com>2020-03-22 14:57:20 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-24 16:39:40 +0000
commit590555e3b8ccbd94b628aa6778adea7f4538d966 (patch)
tree2b53d592cab9498d9ddfcf190a848651f0d5742b
parent5b077b8e0a9265b6f6da3ed674c751c4da66a551 (diff)
downloadpoky-590555e3b8ccbd94b628aa6778adea7f4538d966.tar.gz
wic/direct: reserve 2 sector for extended partition
extended partition should reserve at least 2 unallocated sectors between the start of the extended partition and the start of a logical partition. [YOCTO #13658] (From OE-Core rev: 884c8a0e50a49bdca5e048197a9dc0ff37cc8d1a) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index c50645ff76..2d06c242b6 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -403,7 +403,7 @@ class PartitionedImage():
403 # Reserve a sector for EBR for every logical partition 403 # Reserve a sector for EBR for every logical partition
404 # before alignment is performed. 404 # before alignment is performed.
405 if part.type == 'logical': 405 if part.type == 'logical':
406 self.offset += 1 406 self.offset += 2
407 407
408 align_sectors = 0 408 align_sectors = 0
409 if part.align: 409 if part.align:
@@ -446,7 +446,7 @@ class PartitionedImage():
446 self.extendedpart = part.num 446 self.extendedpart = part.num
447 else: 447 else:
448 self.extended_size_sec += align_sectors 448 self.extended_size_sec += align_sectors
449 self.extended_size_sec += part.size_sec + 1 449 self.extended_size_sec += part.size_sec + 2
450 else: 450 else:
451 self.primary_part_num += 1 451 self.primary_part_num += 1
452 part.num = self.primary_part_num 452 part.num = self.primary_part_num
@@ -512,7 +512,7 @@ class PartitionedImage():
512 # add a sector at the back, so that there is enough 512 # add a sector at the back, so that there is enough
513 # room for all logical partitions. 513 # room for all logical partitions.
514 self._create_partition(self.path, "extended", 514 self._create_partition(self.path, "extended",
515 None, part.start - 1, 515 None, part.start - 2,
516 self.extended_size_sec) 516 self.extended_size_sec)
517 517
518 if part.fstype == "swap": 518 if part.fstype == "swap":