<div dir="ltr">Here is a patch for the master branch. It would be great it this could be applied with pyro onward. It is a minor patch.<div><br></div><div><div>commit 10ec1ad7ee224431223845e85bb9b57863a34406</div><div>Author: Paul Knopf <<a href="mailto:pauldotknopf@gmail.com">pauldotknopf@gmail.com</a>></div><div>Date: Â Mon Oct 30 01:32:15 2017 -0400</div><div><br></div><div>Â Â Added support for changing the imager plugin to be used.</div><div><br></div><div>diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py</div><div>index edcfab3..d7c5c11 100644</div><div>--- a/scripts/lib/wic/engine.py</div><div>+++ b/scripts/lib/wic/engine.py</div><div>@@ -191,7 +191,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,</div><div>Â Â Â if not os.path.exists(options.outdir):</div><div>Â Â Â Â Â os.makedirs(options.outdir)</div><div>Â </div><div>- Â Â pname = 'direct'</div><div>+ Â Â pname = options.imager</div><div>Â Â Â plugin_class = PluginMgr.get_plugins('imager').get(pname)</div><div>Â Â Â if not plugin_class:</div><div>Â Â Â Â Â raise WicError('Unknown plugin: %s' % pname)</div><div>diff --git a/scripts/wic b/scripts/wic</div><div>index 097084a..719f5ec 100755</div><div>--- a/scripts/wic</div><div>+++ b/scripts/wic</div><div>@@ -347,6 +347,7 @@ def wic_init_parser_create(subparser):</div><div>Â Â Â subparser.add_argument("-v", "--vars", dest='vars_dir',</div><div>Â Â Â Â Â Â Â Â Â Â Â Â help="directory with <image>.env files that store "</div><div>Â Â Â Â Â Â Â Â Â Â Â Â Â Â "bitbake variables")</div><div>+ Â Â subparser.add_argument("-i", "--imager", dest="imager", default="direct", help="The wic imager plugin")Â </div><div>Â Â Â subparser.add_argument("-D", "--debug", dest="debug", action="store_true",</div><div>Â Â Â Â Â Â Â Â Â Â Â Â default=False, help="output debug information")</div><div>Â Â Â return</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 6, 2017 at 10:05 AM, akuster808 <span dir="ltr"><<a href="mailto:akuster808@gmail.com" target="_blank">akuster808@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span class="">
<p><br>
</p>
<br>
<div class="m_6156939480777889050moz-cite-prefix">On 11/05/2017 08:42 PM, Paul Knopf
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">This was applied on to the pyro branch.</div>
</blockquote>
<br></span>
Is this a request to back port to pyro?<br>
<br>
- armin<div><div class="h5"><br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>
<div>From a0257c78cf918b84c7a5eb2730f8f7<wbr>83c175042d Mon Sep 17
00:00:00 2001</div>
<div>From: Paul Knopf <<a href="mailto:pauldotknopf@gmail.com" target="_blank">pauldotknopf@gmail.com</a>></div>
<div>Date: Mon, 30 Oct 2017 01:32:15 -0400</div>
<div>Subject: [PATCH] Added support for customizing the imager
plugin to use in</div>
<div>Â wic. It was hard coded to use the 'direct' plugin.</div>
<div><br>
</div>
<div>---</div>
<div>Â scripts/lib/wic/engine.py | 2 +-</div>
<div> scripts/wic        | 1 +</div>
<div>Â 2 files changed, 2 insertions(+), 1 deletion(-)</div>
<div><br>
</div>
<div>diff --git a/scripts/lib/wic/engine.py
b/scripts/lib/wic/engine.py</div>
<div>index f59821fea6..9f95cb64e5 100644</div>
<div>--- a/scripts/lib/wic/engine.py</div>
<div>+++ b/scripts/lib/wic/engine.py</div>
<div>@@ -184,7 +184,7 @@ def wic_create(wks_file, rootfs_dir,
bootimg_dir, kernel_dir,</div>
<div>Â Â Â if not os.path.exists(options.outdir)<wbr>:</div>
<div>Â Â Â Â Â os.makedirs(options.outdir)</div>
<div>Â </div>
<div>-Â Â pname = 'direct'</div>
<div>+Â Â pname = options.imager</div>
<div>Â Â Â plugin_class =
PluginMgr.get_plugins('imager'<wbr>).get(pname)</div>
<div>Â Â Â if not plugin_class:</div>
<div>Â Â Â Â Â raise WicError('Unknown plugin: %s' % pname)</div>
<div>diff --git a/scripts/wic b/scripts/wic</div>
<div>index a5f2dbfc6f..15e23211e5 100755</div>
<div>--- a/scripts/wic</div>
<div>+++ b/scripts/wic</div>
<div>@@ -138,6 +138,7 @@ def wic_create_subcommand(args,
usage_str):</div>
<div>Â Â Â Â Â Â Â Â Â Â Â Â Â Â "bitbake variables")</div>
<div>Â Â Â parser.add_option("-D", "--debug", dest="debug",
action="store_true",</div>
<div>Â Â Â Â Â Â Â Â Â Â Â Â default=False, help="output debug
information")</div>
<div>+Â Â parser.add_option("-i", "--imager", dest="imager",
default="direct", help="The wic imager plugin")</div>
<div>Â </div>
<div>Â Â Â (options, args) = parser.parse_args(args)</div>
<div>Â </div>
<div>--Â </div>
<div>2.14.2</div>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Oct 31, 2017 at 8:32 AM, Ed
Bartosh <span dir="ltr"><<a href="mailto:ed.bartosh@linux.intel.com" target="_blank">ed.bartosh@linux.intel.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="m_6156939480777889050HOEnZb">
<div class="m_6156939480777889050h5">On Sun, Oct 29, 2017 at 10:03:46PM -0400,
Paul Knopf wrote:<br>
> I am able to create and use custom source plugins
for wic, all good.<br>
><br>
> However, I can't figure out how to use a custom
imager plugin. The code has<br>
> support for it, but it is hard-coded to use
"direct" as the plugin. There<br>
> is no way to configure it.<br>
><br>
> <a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/scripts/lib/wic/engine.py?h=pyro#n187" rel="noreferrer" target="_blank">https://git.yoctoproject.org/c<wbr>git/cgit.cgi/poky/tree/scripts<wbr>/lib/wic/engine.py?h=pyro#n187</a><br>
><br>
>Â Â Â pname = 'direct'<br>
>Â Â Â plugin_class = PluginMgr.get_plugins('imager'<wbr>).get(pname)<br>
>Â Â Â if not plugin_class:<br>
>Â Â Â Â Â raise WicError('Unknown plugin: %s' %
pname)<br>
><br>
> Is this an oversight? Would you guys accept a
patch?<br>
<br>
</div>
</div>
Looks like it is. Sure, please send a patch. I'll be happy
to review it.<br>
<br>
--<br>
Regards,<br>
Ed<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="m_6156939480777889050mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>