<html><head></head><body>Hi,<br>
<br>
The patchwork is complaining because by mistake I sent patch for Morty branch as master one. I have some issues with sending patches to the group by git send-email but I'll send formatted patch soon. <br><br><div class="gmail_quote">Dnia 31 października 2017 16:08:58 CET, Nicolas Dechesne <nicolas.dechesne@linaro.org> napisał(a):<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On Tue, Oct 31, 2017 at 2:33 PM, Ed Bartosh <ed.bartosh@linux.intel.com> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><br /> On Mon, Oct 30, 2017 at 08:53:09PM +0100, Artur Mądrzak wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> The WIC's 'part' can now give a name for GPT partition in WKS file.<br /> It's similar to '--label', but is naming partitions instead file systems.<br /> It's required by some bootloaders to partitions have specified names.</blockquote><br /><br /> Thank you for the patch!<br /><br /> +1<br /></blockquote><br />Yes, +1 from me as well. The context of this patch is for the Qualcomm<br />SoC based board that have *interesting* bootloaders requirements, one<br />of them being to look for partition by their names.<br /><br />Patchwork complained about the patch, so Artur, please address these<br />comments and resend the patch.<br /><br />Ed: do you think this can be backported to previous release branches?<br />The lack of --part-name on previous releases make WIC unusable for us.<br />The backport is not trivial since many changes have happened, but<br />Artur has a equivalent patch for morty at least.<br /><br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> Signed-off-by: Artur Mądrzak <artur@madrzak.eu><br /> ---<br /> scripts/lib/wic/<a href="http://help.py">help.py</a> | 2 ++<br /> scripts/lib/wic/<a href="http://ksparser.py">ksparser.py</a> | 1 +<br /> scripts/lib/wic/<a href="http://partition.py">partition.py</a> | 1 +<br /> scripts/lib/wic/plugins/imager/<a href="http://direct.py">direct.py</a> | 11 +++++++++++<br /> 4 files changed, 15 insertions(+)<br /><br /> diff --git a/scripts/lib/wic/<a href="http://help.py">help.py</a> b/scripts/lib/wic/<a href="http://help.py">help.py</a><br /> index bd9c62e2e8..2ac45e052e 100644<br /> --- a/scripts/lib/wic/<a href="http://help.py">help.py</a><br /> +++ b/scripts/lib/wic/<a href="http://help.py">help.py</a><br /> @@ -970,6 +970,8 @@ DESCRIPTION<br /> This option cannot be used with --fixed-size<br /> option.<br /><br /> + --part-name: This option is specific to wic. It specifies name for<br /> GPT partitions.<br /> +<br /> --part-type: This option is specific to wic. It specifies<br /> partition<br /> type GUID for GPT partitions.<br /> List of partition type GUIDS can be found here:<br /> diff --git a/scripts/lib/wic/<a href="http://ksparser.py">ksparser.py</a> b/scripts/lib/wic/<a href="http://ksparser.py">ksparser.py</a><br /> index 99b66eebc5..7850e81d2f 100644<br /> --- a/scripts/lib/wic/<a href="http://ksparser.py">ksparser.py</a><br /> +++ b/scripts/lib/wic/<a href="http://ksparser.py">ksparser.py</a><br /> @@ -144,6 +144,7 @@ class KickStart():<br /> part.add_argument('--no-table', action='store_true')<br /> part.add_argument('--ondisk', '--ondrive', dest='disk',<br /> default='sda')<br /> part.add_argument("--overhead-factor", type=overheadtype)<br /> + part.add_argument('--part-name')<br /> part.add_argument('--part-type')<br /> part.add_argument('--rootfs-dir')<br /><br /> diff --git a/scripts/lib/wic/<a href="http://partition.py">partition.py</a> b/scripts/lib/wic/<a href="http://partition.py">partition.py</a><br /> index b623bb9e6d..66e61ba70c 100644<br /> --- a/scripts/lib/wic/<a href="http://partition.py">partition.py</a><br /> +++ b/scripts/lib/wic/<a href="http://partition.py">partition.py</a><br /> @@ -51,6 +51,7 @@ class Partition():<br /> self.no_table = args.no_table<br /> self.num = None<br /> self.overhead_factor = args.overhead_factor<br /> + self.part_name = args.part_name<br /> self.part_type = args.part_type<br /> self.rootfs_dir = args.rootfs_dir<br /> self.size = args.size<br /> diff --git a/scripts/lib/wic/plugins/imager/<a href="http://direct.py">direct.py</a><br /> b/scripts/lib/wic/plugins/imager/<a href="http://direct.py">direct.py</a><br /> index 60317eed22..bdb8385620 100644<br /> --- a/scripts/lib/wic/plugins/imager/<a href="http://direct.py">direct.py</a><br /> +++ b/scripts/lib/wic/plugins/imager/<a href="http://direct.py">direct.py</a><br /> @@ -366,6 +366,10 @@ class PartitionedImage():<br /> for num in range(len(self.partitions)):<br /> part = self.partitions[num]<br /><br /> + if self.ptable_format == 'msdos' and part.part_name:<br /> + raise WicError("setting custom partition name is not " \<br /> + "implemented for msdos partitions")<br /> +<br /> if self.ptable_format == 'msdos' and part.part_type:<br /> # The --part-type can also be implemented for MBR<br /> partitions,<br /> # in which case it would map to the 1-byte "partition type"<br /> @@ -519,6 +523,13 @@ class PartitionedImage():<br /> self._create_partition(self.path, part.type,<br /> parted_fs_type, part.start,<br /> part.size_sec)<br /><br /> + if part.part_name:<br /> + logger.debug("partition %d: set name to %s",<br /> + part.num, part.part_name)<br /> + exec_native_cmd("sgdisk --change-name=%d:%s %s" % \<br /> + (part.num, part.part_name,<br /> + self.path), self.native_sysroot)<br /> +<br /> if part.part_type:<br /> logger.debug("partition %d: set type UID to %s",<br /> part.num, part.part_type)<br /> --<br /> 2.13.6<br /><br /> --<br /><hr /><br /> Openembedded-core mailing list<br /> Openembedded-core@lists.openembedded.org<br /> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br /></blockquote><br /> --<br /> --<br /> Regards,<br /> Ed<br /> --<br /><hr /><br /> Openembedded-core mailing list<br /> Openembedded-core@lists.openembedded.org<br /> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br /></blockquote></pre></blockquote></div><br>
-- Wysłane za pomocą K-9 Mail.</body></html>