summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/partition.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2020-06-02 08:42:05 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-04 13:21:00 +0100
commit467f84e12b96bc977d57575023517dd6f8ef7f29 (patch)
tree3584b3f57bfa07881ebd6605c56fcfa5ddb69145 /scripts/lib/wic/partition.py
parent942a02154c6b20a5cce583607b6f36bb7657ef0d (diff)
downloadopenembedded-core-contrib-467f84e12b96bc977d57575023517dd6f8ef7f29.tar.gz
wic: Add --offset argument for partitions
Add support for an --offset argument when defining a partition. Many SoCs require that boot partitions be located at specific offsets. Prior to this argument, most WKS files were using the --align attribute to specify the location of these fixed partitions but this is not ideal because in the event that the partition couldn't be placed in the specified location, wic would move it to the next sector with that alignment, often preventing the device from booting. Unlike the --align argument, wic will fail if a partition cannot be placed at the exact offset specified with --offset. Changes in V2: * Fixed a small typo that prevented test_fixed_size_error from passing 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.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 7d9dd616a6..85eb15c8b8 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -40,6 +40,7 @@ class Partition():
self.mountpoint = args.mountpoint
self.no_table = args.no_table
self.num = None
+ self.offset = args.offset
self.overhead_factor = args.overhead_factor
self.part_name = args.part_name
self.part_type = args.part_type