empty.py 946 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # Copyright OpenEmbedded Contributors
  3. #
  4. # SPDX-License-Identifier: MIT
  5. #
  6. # The empty wic plugin is used to create unformatted empty partitions for wic
  7. # images.
  8. # To use it you must pass "empty" as argument for the "--source" parameter in
  9. # the wks file. For example:
  10. # part foo --source empty --ondisk sda --size="1024" --align 1024
  11. import logging
  12. from wic.pluginbase import SourcePlugin
  13. logger = logging.getLogger('wic')
  14. class EmptyPartitionPlugin(SourcePlugin):
  15. """
  16. Populate unformatted empty partition.
  17. """
  18. name = 'empty'
  19. @classmethod
  20. def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
  21. oe_builddir, bootimg_dir, kernel_dir,
  22. rootfs_dir, native_sysroot):
  23. """
  24. Called to do the actual content population for a partition i.e. it
  25. 'prepares' the partition to be incorporated into the image.
  26. """
  27. return