[linux-yocto] Custom wic imager plugin

Paul Knopf pauldotknopf at gmail.com
Wed Nov 29 12:10:19 PST 2017


What is the status of this patch?

On Wed, Nov 22, 2017 at 3:28 AM, Ed Bartosh <ed.bartosh at linux.intel.com>
wrote:

> Hi Paul,
>
> Thank you for the patch!
>
> +1
>
> On Wed, Nov 15, 2017 at 04:56:16PM -0500, Paul Knopf wrote:
> > 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.
> >
> > commit 10ec1ad7ee224431223845e85bb9b57863a34406
> > Author: Paul Knopf <pauldotknopf at gmail.com>
> > Date:   Mon Oct 30 01:32:15 2017 -0400
> >
> >     Added support for changing the imager plugin to be used.
> >
> > diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
> > index edcfab3..d7c5c11 100644
> > --- a/scripts/lib/wic/engine.py
> > +++ b/scripts/lib/wic/engine.py
> > @@ -191,7 +191,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir,
> > kernel_dir,
> >      if not os.path.exists(options.outdir):
> >          os.makedirs(options.outdir)
> >
> > -    pname = 'direct'
> > +    pname = options.imager
> >      plugin_class = PluginMgr.get_plugins('imager').get(pname)
> >      if not plugin_class:
> >          raise WicError('Unknown plugin: %s' % pname)
> > diff --git a/scripts/wic b/scripts/wic
> > index 097084a..719f5ec 100755
> > --- a/scripts/wic
> > +++ b/scripts/wic
> > @@ -347,6 +347,7 @@ def wic_init_parser_create(subparser):
> >      subparser.add_argument("-v", "--vars", dest='vars_dir',
> >                        help="directory with <image>.env files that store
> "
> >                             "bitbake variables")
> > +    subparser.add_argument("-i", "--imager", dest="imager",
> > default="direct", help="The wic imager plugin")
> >      subparser.add_argument("-D", "--debug", dest="debug",
> > action="store_true",
> >                        default=False, help="output debug information")
> >      return
> >
> > On Mon, Nov 6, 2017 at 10:05 AM, akuster808 <akuster808 at gmail.com>
> wrote:
> >
> > >
> > >
> > > On 11/05/2017 08:42 PM, Paul Knopf wrote:
> > >
> > > This was applied on to the pyro branch.
> > >
> > >
> > > Is this a request to back port to pyro?
> > >
> > > - armin
> > >
> > >
> > > From a0257c78cf918b84c7a5eb2730f8f783c175042d Mon Sep 17 00:00:00 2001
> > > From: Paul Knopf <pauldotknopf at gmail.com>
> > > Date: Mon, 30 Oct 2017 01:32:15 -0400
> > > Subject: [PATCH] Added support for customizing the imager plugin to
> use in
> > >  wic. It was hard coded to use the 'direct' plugin.
> > >
> > > ---
> > >  scripts/lib/wic/engine.py | 2 +-
> > >  scripts/wic               | 1 +
> > >  2 files changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
> > > index f59821fea6..9f95cb64e5 100644
> > > --- a/scripts/lib/wic/engine.py
> > > +++ b/scripts/lib/wic/engine.py
> > > @@ -184,7 +184,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir,
> > > kernel_dir,
> > >      if not os.path.exists(options.outdir):
> > >          os.makedirs(options.outdir)
> > >
> > > -    pname = 'direct'
> > > +    pname = options.imager
> > >      plugin_class = PluginMgr.get_plugins('imager').get(pname)
> > >      if not plugin_class:
> > >          raise WicError('Unknown plugin: %s' % pname)
> > > diff --git a/scripts/wic b/scripts/wic
> > > index a5f2dbfc6f..15e23211e5 100755
> > > --- a/scripts/wic
> > > +++ b/scripts/wic
> > > @@ -138,6 +138,7 @@ def wic_create_subcommand(args, usage_str):
> > >                             "bitbake variables")
> > >      parser.add_option("-D", "--debug", dest="debug",
> action="store_true",
> > >                        default=False, help="output debug information")
> > > +    parser.add_option("-i", "--imager", dest="imager",
> default="direct",
> > > help="The wic imager plugin")
> > >
> > >      (options, args) = parser.parse_args(args)
> > >
> > > --
> > > 2.14.2
> > >
> > >
> > > On Tue, Oct 31, 2017 at 8:32 AM, Ed Bartosh <
> ed.bartosh at linux.intel.com>
> > > wrote:
> > >
> > >> On Sun, Oct 29, 2017 at 10:03:46PM -0400, Paul Knopf wrote:
> > >> > I am able to create and use custom source plugins for wic, all good.
> > >> >
> > >> > However, I can't figure out how to use a custom imager plugin. The
> code
> > >> has
> > >> > support for it, but it is hard-coded to use "direct" as the plugin.
> > >> There
> > >> > is no way to configure it.
> > >> >
> > >> > https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/scripts
> > >> /lib/wic/engine.py?h=pyro#n187
> > >> >
> > >> >     pname = 'direct'
> > >> >     plugin_class = PluginMgr.get_plugins('imager').get(pname)
> > >> >     if not plugin_class:
> > >> >         raise WicError('Unknown plugin: %s' % pname)
> > >> >
> > >> > Is this an oversight? Would you guys accept a patch?
> > >>
> > >> Looks like it is. Sure, please send a patch. I'll be happy to review
> it.
> > >>
> > >> --
> > >> Regards,
> > >> Ed
> > >>
> > >
> > >
> > >
> > >
> > >
>
> --
> --
> Regards,
> Ed
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/linux-yocto/attachments/20171129/30d4b19c/attachment.html>


More information about the linux-yocto mailing list