blob: 9c492ca2067fc578f910c6b268a84f0691ef4348 [file] [log] [blame]
Andrew Geisslerd1e89492021-02-12 15:35:20 -06001#
Patrick Williams92b42cb2022-09-03 06:53:57 -05002# Copyright OpenEmbedded Contributors
3#
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004# SPDX-License-Identifier: MIT
5#
6
7# The empty wic plugin is used to create unformatted empty partitions for wic
8# images.
9# To use it you must pass "empty" as argument for the "--source" parameter in
10# the wks file. For example:
11# part foo --source empty --ondisk sda --size="1024" --align 1024
12
13import logging
14
15from wic.pluginbase import SourcePlugin
16
17logger = logging.getLogger('wic')
18
19class EmptyPartitionPlugin(SourcePlugin):
20 """
21 Populate unformatted empty partition.
22 """
23
24 name = 'empty'
25
26 @classmethod
27 def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
28 oe_builddir, bootimg_dir, kernel_dir,
29 rootfs_dir, native_sysroot):
30 """
31 Called to do the actual content population for a partition i.e. it
32 'prepares' the partition to be incorporated into the image.
33 """
34 return