summaryrefslogtreecommitdiffstats
path: root/scripts
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-22 10:49:23 +0000
commit884c8a0e50a49bdca5e048197a9dc0ff37cc8d1a (patch)
treed5dd53f8b688dcbf2046de1b4cf82276de0932d1 /scripts
parenta8db5643bd14a5a2e8e60012dd1551f6d867acc2 (diff)
downloadopenembedded-core-contrib-884c8a0e50a49bdca5e048197a9dc0ff37cc8d1a.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] Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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():
# Reserve a sector for EBR for every logical partition
# before alignment is performed.
if part.type == 'logical':
- self.offset += 1
+ self.offset += 2
align_sectors = 0
if part.align:
@@ -446,7 +446,7 @@ class PartitionedImage():
self.extendedpart = part.num
else:
self.extended_size_sec += align_sectors
- self.extended_size_sec += part.size_sec + 1
+ self.extended_size_sec += part.size_sec + 2
else:
self.primary_part_num += 1
part.num = self.primary_part_num
@@ -512,7 +512,7 @@ class PartitionedImage():
# add a sector at the back, so that there is enough
# room for all logical partitions.
self._create_partition(self.path, "extended",
- None, part.start - 1,
+ None, part.start - 2,
self.extended_size_sec)
if part.fstype == "swap":