]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: don't throw away our created swap partition
authorChristopher Larson <chris_larson@mentor.com>
Thu, 25 Feb 2016 17:21:49 +0000 (10:21 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 28 Feb 2016 11:32:38 +0000 (11:32 +0000)
We were creating the partition, mkswap'ing it, and then not dd'ing it into
place in the final image, as source_file wasn't being set for swap partitions.
This would result in a swap partition that couldn't be enabled on target until
mkswap was run.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/partition.py

index 55bcfbad40a5fbcda78064b50fdd3af965c7d46c..f40d1bc8b643265353be4c674410861aa7f35f0a 100644 (file)
@@ -106,6 +106,7 @@ class Partition(object):
             if self.fstype and self.fstype == "swap":
                 self.prepare_swap_partition(cr_workdir, oe_builddir,
                                             native_sysroot)
+                self.source_file = "%s/fs.%s" % (cr_workdir, self.fstype)
             elif self.fstype:
                 rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label,
                                              self.lineno, self.fstype)