Skip to contentSkip to conversation

wic: don't throw away our created swap partition

PATCH In review Christopher Larson 3 participants 3 messages Feb 25, 2016 – Jul 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wic: don't throw away our created swap partition

From: Christopher Larson <[email protected]>

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.

---
 scripts/lib/wic/kickstart/custom_commands/partition.py | 1 +
 1 file changed, 1 insertion(+)
scripts/lib/wic/kickstart/custom_commands/partition.py +1 -0
index eee25a4..a0e74aa 100644
@@ -173,6 +173,7 @@ class Wic_PartData(FC4_PartData):
             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)
Signature · 1 line
2.2.1
Acked-by on v1 1/1
#1 lore raw

Hi Cristopher,

Thank you for the patch!

Quoted 32 lines · Christopher Larson

From: Christopher Larson <[email protected]>

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.

---
 scripts/lib/wic/kickstart/custom_commands/partition.py | 1 +
 1 file changed, 1 insertion(+)
scripts/lib/wic/kickstart/custom_commands/partition.py +1 -0
index eee25a4..a0e74aa 100644
@@ -173,6 +173,7 @@ class Wic_PartData(FC4_PartData):
             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)
Signature · 7 lines
2.2.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 3 lines
--
Regards,
Ed
#2 lore raw

Hi Ed,
May you also apply this patch to jethro branch please ? Wks-created images requires also running mkswap on the target but it shouldn't be necessary.
Best regards,
François
Le lundi 29 février 2016 à 17:11 +0200, Ed Bartosh a écrit :

Quoted 55 lines

Hi Cristopher,

Thank you for the patch!

Acked-by: Ed Bartosh
org>

Quoted 37 lines · Christopher Larson

From: Christopher Larson
c.gmane.org>

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 [email protected]>
---
 scripts/lib/wic/kickstart/custom_commands/partition.py | 1 +

 1 file changed, 1 insertion(+)
scripts/lib/wic/kickstart/custom_commands/partition.py +0 -0
index eee25a4..a0e74aa 100644
@@ -173,6 +173,7 @@ class Wic_PartData(FC4_PartData):

             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)
--
2.2.1

Quoted 5 lines

--
_______________________________________________
Openembedded-core mailing list Openembedded-core-ZwoEplunGu3dfDuKDZ/[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
--
Regards,
Ed