From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Diego Sueiro <diego.sueiro@arm.com>,
openembedded-core@lists.openembedded.org
Cc: nd@arm.com
Subject: Re: [OE-core] [PATCH] wic: Introduce empty plugin to create unformatted empty partitions
Date: Thu, 03 Dec 2020 22:58:00 +0000 [thread overview]
Message-ID: <b287bb4773b60bb624813704fff24201fa6b1c6f.camel@linuxfoundation.org> (raw)
In-Reply-To: <cbb0c77415bba971194ff9c18577646d12a66250.1607009672.git.diego.sueiro@arm.com>
On Thu, 2020-12-03 at 15:35 +0000, Diego Sueiro wrote:
> The empty wic plugin is used to create unformatted empty partitions for wic
> images.
>
> To use it you must pass "empty" as argument for the "--source" parameter in
> the wks file. For example:
> part foo --source empty --ondisk sda --size="1024" --align 1024
>
> Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> ---
> scripts/lib/wic/plugins/source/empty.py | 32 +++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 scripts/lib/wic/plugins/source/empty.py
>
> diff --git a/scripts/lib/wic/plugins/source/empty.py b/scripts/lib/wic/plugins/source/empty.py
> new file mode 100644
> index 0000000000..041617d648
> --- /dev/null
> +++ b/scripts/lib/wic/plugins/source/empty.py
> @@ -0,0 +1,32 @@
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +# The empty wic plugin is used to create unformatted empty partitions for wic
> +# images.
> +# To use it you must pass "empty" as argument for the "--source" parameter in
> +# the wks file. For example:
> +# part foo --source empty --ondisk sda --size="1024" --align 1024
> +
> +import logging
> +
> +from wic.pluginbase import SourcePlugin
> +
> +logger = logging.getLogger('wic')
> +
> +class EmptyPartitionPlugin(SourcePlugin):
> + """
> + Populate unformatted empty partition.
> + """
> +
> + name = 'empty'
> +
> + @classmethod
> + def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
> + oe_builddir, bootimg_dir, kernel_dir,
> + rootfs_dir, native_sysroot):
> + """
> + Called to do the actual content population for a partition i.e. it
> + 'prepares' the partition to be incorporated into the image.
> + """
> + return
Thanks, the wic test coverage is pretty comprehensive, could you add a
test for this please ("oe-selftest -r wic" is the test command).
Cheers,
Richard
next prev parent reply other threads:[~2020-12-03 22:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 15:35 [PATCH] wic: Introduce empty plugin to create unformatted empty partitions Diego Sueiro
2020-12-03 22:58 ` Richard Purdie [this message]
2020-12-08 11:40 ` [OE-core] " Diego Sueiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b287bb4773b60bb624813704fff24201fa6b1c6f.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=diego.sueiro@arm.com \
--cc=nd@arm.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox