From a65fd2b9d58a9b7dc4c17a557eee555356334c2c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 26 May 2025 12:56:59 +0100 Subject: [PATCH] wic: Update after plugin name changes Update the plugin names to account for the "-" to "_" plugin name change. (From OE-Core rev: afa1b5c9f6ed17c021e37a54d0d6abee50a60bf9) Signed-off-by: Richard Purdie --- .../recipes-test/images/wic-image-minimal.wks | 2 +- meta-selftest/wic/overlayfs_etc.wks.in | 2 +- meta-selftest/wic/test_biosplusefi_plugin.wks | 2 +- meta-selftest/wic/test_efi_plugin.wks | 2 +- .../test_efi_plugin_plain_systemd-boot.wks | 2 +- meta-selftest/wic/test_rawcopy_plugin.wks.in | 2 +- meta-selftest/wic/test_uefikernel.wks | 2 +- meta/lib/oe/bootfiles.py | 2 +- meta/lib/oeqa/selftest/cases/wic.py | 10 +++---- scripts/lib/wic/canned-wks/common.wks.inc | 2 +- scripts/lib/wic/canned-wks/directdisk-gpt.wks | 2 +- .../canned-wks/directdisk-multi-rootfs.wks | 2 +- .../wic/canned-wks/efi-uki-bootdisk.wks.in | 2 +- scripts/lib/wic/canned-wks/mkefidisk.wks | 2 +- scripts/lib/wic/canned-wks/mkhybridiso.wks | 2 +- .../lib/wic/canned-wks/sdimage-bootpart.wks | 2 +- .../lib/wic/canned-wks/systemd-bootdisk.wks | 2 +- scripts/lib/wic/help.py | 10 +++---- .../wic/plugins/source/bootimg_biosplusefi.py | 30 +++++++++---------- scripts/lib/wic/plugins/source/bootimg_efi.py | 12 ++++---- .../wic/plugins/source/bootimg_partition.py | 4 +-- .../lib/wic/plugins/source/bootimg_pcbios.py | 4 +-- .../wic/plugins/source/isoimage_isohybrid.py | 10 +++---- 23 files changed, 56 insertions(+), 56 deletions(-) diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.wks b/meta-selftest/recipes-test/images/wic-image-minimal.wks index ae69cb6e3c..4186b16517 100644 --- a/meta-selftest/recipes-test/images/wic-image-minimal.wks +++ b/meta-selftest/recipes-test/images/wic-image-minimal.wks @@ -2,7 +2,7 @@ # long-description: This image contains boot partition and 3 rootfs partitions # created from core-image-minimal and wic-image-minimal image recipes. -part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 +part /boot --source bootimg_pcbios --ondisk sda --label boot --active --align 1024 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid part /media --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label uuid-test --align 1024 --use-uuid --fsuuid 2c71ef06-a81d-4735-9d3a-379b69c6bdba part /mnt --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024 diff --git a/meta-selftest/wic/overlayfs_etc.wks.in b/meta-selftest/wic/overlayfs_etc.wks.in index 066cd35b15..8375d73a9c 100644 --- a/meta-selftest/wic/overlayfs_etc.wks.in +++ b/meta-selftest/wic/overlayfs_etc.wks.in @@ -1,4 +1,4 @@ -part /boot --active --source bootimg-biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024 +part /boot --active --source bootimg_biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024 part / --source rootfs --ondisk sda --fstype=${OVERLAYFS_ROOTFS_TYPE} --use-uuid --align 1024 part --ondisk sda --fstype=ext4 --size=5 --align 1024 bootloader --ptable gpt --timeout=1 --append="rootfstype=${OVERLAYFS_ROOTFS_TYPE} console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}" diff --git a/meta-selftest/wic/test_biosplusefi_plugin.wks b/meta-selftest/wic/test_biosplusefi_plugin.wks index 5a56c84518..4be6643a6f 100644 --- a/meta-selftest/wic/test_biosplusefi_plugin.wks +++ b/meta-selftest/wic/test_biosplusefi_plugin.wks @@ -1,6 +1,6 @@ # short-description: This file is used in oe-selftest wic module to test biosplusefi plugin -part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi" --active --align 1024 --use-uuid +part /boot --source bootimg_biosplusefi --sourceparams="loader=grub-efi" --active --align 1024 --use-uuid part / --source rootfs --fstype=ext4 --align 1024 --use-uuid bootloader --timeout=0 --append="console=ttyS0,115200n8" diff --git a/meta-selftest/wic/test_efi_plugin.wks b/meta-selftest/wic/test_efi_plugin.wks index e876a4be0e..f75e0f0e0b 100644 --- a/meta-selftest/wic/test_efi_plugin.wks +++ b/meta-selftest/wic/test_efi_plugin.wks @@ -1,5 +1,5 @@ # short-description: This file is used in oe-selftest wic module to test efi plugin -part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --active --align 1024 --use-uuid +part /boot --source bootimg_efi --sourceparams="loader=systemd-boot" --active --align 1024 --use-uuid part / --source rootfs --fstype=ext4 --align 1024 --use-uuid --label root bootloader --timeout=0 --append="console=ttyS0,115200n8" diff --git a/meta-selftest/wic/test_efi_plugin_plain_systemd-boot.wks b/meta-selftest/wic/test_efi_plugin_plain_systemd-boot.wks index 83f136ac15..3a58c8137c 100644 --- a/meta-selftest/wic/test_efi_plugin_plain_systemd-boot.wks +++ b/meta-selftest/wic/test_efi_plugin_plain_systemd-boot.wks @@ -1,5 +1,5 @@ # short-description: This file is used in oe-selftest wic module to test efi plugin -part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --active --align 1024 --use-uuid +part /boot --source bootimg_efi --sourceparams="loader=systemd-boot,initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --active --align 1024 --use-uuid part / --source rootfs --fstype=ext4 --align 1024 --use-uuid bootloader --timeout=0 diff --git a/meta-selftest/wic/test_rawcopy_plugin.wks.in b/meta-selftest/wic/test_rawcopy_plugin.wks.in index a865dd1d32..ba324d9980 100644 --- a/meta-selftest/wic/test_rawcopy_plugin.wks.in +++ b/meta-selftest/wic/test_rawcopy_plugin.wks.in @@ -1,6 +1,6 @@ # short-description: This file is used in oe-selftest wic module to test rawcopy plugin -part /boot --active --source bootimg-pcbios +part /boot --active --source bootimg_pcbios part / --source rawcopy --sourceparams="file=${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.ext4" --use-uuid bootloader --timeout=0 --append="console=ttyS0,115200n8" diff --git a/meta-selftest/wic/test_uefikernel.wks b/meta-selftest/wic/test_uefikernel.wks index bede2288f6..9bc4813dfa 100644 --- a/meta-selftest/wic/test_uefikernel.wks +++ b/meta-selftest/wic/test_uefikernel.wks @@ -1,5 +1,5 @@ # short-description: This file is used in oe-selftest wic module to test uefi-kernel loader -part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel" +part /boot --source bootimg_efi --sourceparams="loader=uefi-kernel" part / --source rootfs --fstype=ext4 --align 1024 --use-uuid diff --git a/meta/lib/oe/bootfiles.py b/meta/lib/oe/bootfiles.py index 155fe742db..7ee148c4e2 100644 --- a/meta/lib/oe/bootfiles.py +++ b/meta/lib/oe/bootfiles.py @@ -10,7 +10,7 @@ # Returns a list of tuples with (original filepath relative to # deploy_dir, desired filepath renaming) # -# Heavily inspired of bootimg-partition.py +# Heavily inspired of bootimg_partition.py # def get_boot_files(deploy_dir, boot_files): import re diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 1a67b6df51..f45608172f 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -153,7 +153,7 @@ class Wic(WicTestCase): # create a temporary file for the WKS content with NamedTemporaryFile("w", suffix=".wks") as wks: wks.write( - 'part --source bootimg-efi ' + 'part --source bootimg_efi ' '--sourceparams="loader=grub-efi,install-kernel-into-boot-dir=false" ' '--label boot --active\n' ) @@ -186,7 +186,7 @@ class Wic(WicTestCase): # create a temporary file for the WKS content with NamedTemporaryFile("w", suffix=".wks") as wks: wks.write( - 'part --source bootimg-efi ' + 'part --source bootimg_efi ' '--sourceparams="loader=grub-efi,install-kernel-into-boot-dir=true" ' '--label boot --active\n' ) @@ -1358,7 +1358,7 @@ class Wic2(WicTestCase): def test_biosplusefi_plugin(self): """Test biosplusefi plugin""" # Wic generation below may fail depending on the order of the unittests - # This is because bootimg-pcbios (that bootimg-biosplusefi uses) generate its MBR inside STAGING_DATADIR directory + # This is because bootimg_pcbios (that bootimg_biosplusefi uses) generate its MBR inside STAGING_DATADIR directory # which may or may not exists depending on what was built already # If an image hasn't been built yet, directory ${STAGING_DATADIR}/syslinux won't exists and _get_bootimg_dir() # will raise with "Couldn't find correct bootimg_dir" @@ -1370,7 +1370,7 @@ class Wic2(WicTestCase): img = 'core-image-minimal' with NamedTemporaryFile("w", suffix=".wks") as wks: - wks.writelines(['part /boot --active --source bootimg-biosplusefi --sourceparams="loader=grub-efi"\n', + wks.writelines(['part /boot --active --source bootimg_biosplusefi --sourceparams="loader=grub-efi"\n', 'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\ 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n']) wks.flush() @@ -1390,7 +1390,7 @@ class Wic2(WicTestCase): img = 'core-image-minimal' with NamedTemporaryFile("w", suffix=".wks") as wks: - wks.writelines(['part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel"\n' + wks.writelines(['part /boot --source bootimg_efi --sourceparams="loader=uefi-kernel"\n' 'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\ 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n']) wks.flush() diff --git a/scripts/lib/wic/canned-wks/common.wks.inc b/scripts/lib/wic/canned-wks/common.wks.inc index 89880b417b..4a440ddafe 100644 --- a/scripts/lib/wic/canned-wks/common.wks.inc +++ b/scripts/lib/wic/canned-wks/common.wks.inc @@ -1,3 +1,3 @@ # This file is included into 3 canned wks files from this directory -part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 +part /boot --source bootimg_pcbios --ondisk sda --label boot --active --align 1024 part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024 diff --git a/scripts/lib/wic/canned-wks/directdisk-gpt.wks b/scripts/lib/wic/canned-wks/directdisk-gpt.wks index 8d7d8de6ea..cb640056f1 100644 --- a/scripts/lib/wic/canned-wks/directdisk-gpt.wks +++ b/scripts/lib/wic/canned-wks/directdisk-gpt.wks @@ -3,7 +3,7 @@ # can directly dd to boot media. -part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 +part /boot --source bootimg_pcbios --ondisk sda --label boot --active --align 1024 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid bootloader --ptable gpt --timeout=0 --append="rootwait rootfstype=ext4 video=vesafb vga=0x318 console=tty0 console=ttyS0,115200n8" diff --git a/scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks b/scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks index f61d941d6d..4fd1999ffb 100644 --- a/scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks +++ b/scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks @@ -15,7 +15,7 @@ # # - or any combinations of -r and --rootfs command line options -part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 +part /boot --source bootimg_pcbios --ondisk sda --label boot --active --align 1024 part / --source rootfs --rootfs-dir=rootfs1 --ondisk sda --fstype=ext4 --label platform --align 1024 part /rescue --source rootfs --rootfs-dir=rootfs2 --ondisk sda --fstype=ext4 --label secondary --align 1024 diff --git a/scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in b/scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in index 67cc41a241..cac0fa32cd 100644 --- a/scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in +++ b/scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in @@ -1,3 +1,3 @@ bootloader --ptable gpt --timeout=5 -part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid --part-name="ESP" --part-type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B --overhead-factor=1 +part /boot --source bootimg_efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid --part-name="ESP" --part-type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B --overhead-factor=1 part / --source rootfs --fstype=ext4 --label root --align 1024 --exclude-path boot/ diff --git a/scripts/lib/wic/canned-wks/mkefidisk.wks b/scripts/lib/wic/canned-wks/mkefidisk.wks index 5fa6682a9e..16dfe76dfe 100644 --- a/scripts/lib/wic/canned-wks/mkefidisk.wks +++ b/scripts/lib/wic/canned-wks/mkefidisk.wks @@ -2,7 +2,7 @@ # long-description: Creates a partitioned EFI disk image that the user # can directly dd to boot media. -part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024 +part /boot --source bootimg_efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid diff --git a/scripts/lib/wic/canned-wks/mkhybridiso.wks b/scripts/lib/wic/canned-wks/mkhybridiso.wks index 48c5ac4791..c3a030e5b4 100644 --- a/scripts/lib/wic/canned-wks/mkhybridiso.wks +++ b/scripts/lib/wic/canned-wks/mkhybridiso.wks @@ -2,6 +2,6 @@ # long-description: Creates an EFI and legacy bootable hybrid ISO image # which can be used on optical media as well as USB media. -part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi,image_name=HYBRID_ISO_IMG" --ondisk cd --label HYBRIDISO +part /boot --source isoimage_isohybrid --sourceparams="loader=grub-efi,image_name=HYBRID_ISO_IMG" --ondisk cd --label HYBRIDISO bootloader --timeout=15 --append="" diff --git a/scripts/lib/wic/canned-wks/sdimage-bootpart.wks b/scripts/lib/wic/canned-wks/sdimage-bootpart.wks index 63bc4dab6a..f9f8044f7d 100644 --- a/scripts/lib/wic/canned-wks/sdimage-bootpart.wks +++ b/scripts/lib/wic/canned-wks/sdimage-bootpart.wks @@ -2,5 +2,5 @@ # long-description: Creates a partitioned SD card image. Boot files # are located in the first vfat partition. -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --size 16 +part /boot --source bootimg_partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --size 16 part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4 diff --git a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks index 95d7b97a60..3fb2c0e35f 100644 --- a/scripts/lib/wic/canned-wks/systemd-bootdisk.wks +++ b/scripts/lib/wic/canned-wks/systemd-bootdisk.wks @@ -2,7 +2,7 @@ # long-description: Creates a partitioned EFI disk image that the user # can directly dd to boot media. The selected bootloader is systemd-boot. -part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024 --use-uuid +part /boot --source bootimg_efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024 --use-uuid part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py index 9180d75a92..2e3061f343 100644 --- a/scripts/lib/wic/help.py +++ b/scripts/lib/wic/help.py @@ -544,18 +544,18 @@ DESCRIPTION the --source param given to that partition. For example, if the partition is set up like this: - part /boot --source bootimg-pcbios ... + part /boot --source bootimg_pcbios ... then the methods defined as class members of the plugin having the - matching bootimg-pcbios .name class member would be used. + matching bootimg_pcbios .name class member would be used. To be more concrete, here's the plugin definition that would match - a '--source bootimg-pcbios' usage, along with an example method + a '--source bootimg_pcbios' usage, along with an example method that would be called by the wic implementation when it needed to invoke an implementation-specific partition-preparation function: class BootimgPcbiosPlugin(SourcePlugin): - name = 'bootimg-pcbios' + name = 'bootimg_pcbios' @classmethod def do_prepare_partition(self, part, ...) @@ -794,7 +794,7 @@ DESCRIPTION Here is a content of test.wks: - part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 + part /boot --source bootimg_pcbios --ondisk sda --label boot --active --align 1024 part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0" diff --git a/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py b/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py index 5bd7390680..4279ddded8 100644 --- a/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py +++ b/scripts/lib/wic/plugins/source/bootimg_biosplusefi.py @@ -13,7 +13,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # DESCRIPTION -# This implements the 'bootimg-biosplusefi' source plugin class for 'wic' +# This implements the 'bootimg_biosplusefi' source plugin class for 'wic' # # AUTHORS # William Bourque @@ -34,7 +34,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): Note it is possible to create an image that can boot from both legacy BIOS and EFI by defining two partitions : one with arg - --source bootimg-efi and another one with --source bootimg-pcbios. + --source bootimg_efi and another one with --source bootimg_pcbios. However, this method has the obvious downside that it requires TWO partitions to be created on the storage device. Both partitions will also be marked as "bootable" which does not work on @@ -45,7 +45,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): the first partition will be duplicated into the second, even though it will not be used at all. - Also, unlike "isoimage-isohybrid" that also does BIOS and EFI, this plugin + Also, unlike "isoimage_isohybrid" that also does BIOS and EFI, this plugin allows you to have more than only a single rootfs partitions and does not turn the rootfs into an initramfs RAM image. @@ -53,32 +53,32 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): does not have the limitations listed above. The plugin is made so it does tries not to reimplement what's already - been done in other plugins; as such it imports "bootimg-pcbios" - and "bootimg-efi". - Plugin "bootimg-pcbios" is used to generate legacy BIOS boot. - Plugin "bootimg-efi" is used to generate the UEFI boot. Note that it + been done in other plugins; as such it imports "bootimg_pcbios" + and "bootimg_efi". + Plugin "bootimg_pcbios" is used to generate legacy BIOS boot. + Plugin "bootimg_efi" is used to generate the UEFI boot. Note that it requires a --sourceparams argument to know which loader to use; refer - to "bootimg-efi" code/documentation for the list of loader. + to "bootimg_efi" code/documentation for the list of loader. Imports are handled with "SourceFileLoader" from importlib as it is otherwise very difficult to import module that has hyphen "-" in their filename. The SourcePlugin() methods used in the plugins (do_install_disk, do_configure_partition, do_prepare_partition) are then called on both, - beginning by "bootimg-efi". + beginning by "bootimg_efi". Plugin options, such as "--sourceparams" can still be passed to a plugin, as long they does not cause issue in the other plugin. Example wic configuration: - part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi"\\ + part /boot --source bootimg_biosplusefi --sourceparams="loader=grub-efi"\\ --ondisk sda --label os_boot --active --align 1024 --use-uuid """ - name = 'bootimg-biosplusefi' + name = 'bootimg_biosplusefi' - __PCBIOS_MODULE_NAME = "bootimg-pcbios" - __EFI_MODULE_NAME = "bootimg-efi" + __PCBIOS_MODULE_NAME = "bootimg_pcbios" + __EFI_MODULE_NAME = "bootimg_efi" __imgEFIObj = None __imgBiosObj = None @@ -100,7 +100,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): """ - # Import bootimg-pcbios (class name "BootimgPcbiosPlugin") + # Import bootimg_pcbios (class name "BootimgPcbiosPlugin") modulePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), cls.__PCBIOS_MODULE_NAME + ".py") loader = SourceFileLoader(cls.__PCBIOS_MODULE_NAME, modulePath) @@ -108,7 +108,7 @@ class BootimgBiosPlusEFIPlugin(SourcePlugin): loader.exec_module(mod) cls.__imgBiosObj = mod.BootimgPcbiosPlugin() - # Import bootimg-efi (class name "BootimgEFIPlugin") + # Import bootimg_efi (class name "BootimgEFIPlugin") modulePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), cls.__EFI_MODULE_NAME + ".py") loader = SourceFileLoader(cls.__EFI_MODULE_NAME, modulePath) diff --git a/scripts/lib/wic/plugins/source/bootimg_efi.py b/scripts/lib/wic/plugins/source/bootimg_efi.py index 38da5080fb..cf16705a28 100644 --- a/scripts/lib/wic/plugins/source/bootimg_efi.py +++ b/scripts/lib/wic/plugins/source/bootimg_efi.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-2.0-only # # DESCRIPTION -# This implements the 'bootimg-efi' source plugin class for 'wic' +# This implements the 'bootimg_efi' source plugin class for 'wic' # # AUTHORS # Tom Zanussi @@ -32,7 +32,7 @@ class BootimgEFIPlugin(SourcePlugin): This plugin supports GRUB 2 and systemd-boot bootloaders. """ - name = 'bootimg-efi' + name = 'bootimg_efi' @classmethod def _copy_additional_files(cls, hdddir, initrd, dtb): @@ -230,9 +230,9 @@ class BootimgEFIPlugin(SourcePlugin): elif source_params['loader'] == 'uefi-kernel': pass else: - raise WicError("unrecognized bootimg-efi loader: %s" % source_params['loader']) + raise WicError("unrecognized bootimg_efi loader: %s" % source_params['loader']) except KeyError: - raise WicError("bootimg-efi requires a loader, none specified") + raise WicError("bootimg_efi requires a loader, none specified") if get_bitbake_var("IMAGE_EFI_BOOT_FILES") is None: logger.debug('No boot files defined in IMAGE_EFI_BOOT_FILES') @@ -365,7 +365,7 @@ class BootimgEFIPlugin(SourcePlugin): out = exec_cmd(cp_cmd, True) logger.debug("uefi-kernel files:\n%s" % out) else: - raise WicError("unrecognized bootimg-efi loader: %s" % + raise WicError("unrecognized bootimg_efi loader: %s" % source_params['loader']) # must have installed at least one EFI bootloader @@ -375,7 +375,7 @@ class BootimgEFIPlugin(SourcePlugin): raise WicError("No EFI loaders installed to ESP partition. Check that grub-efi, systemd-boot or similar is installed.") except KeyError: - raise WicError("bootimg-efi requires a loader, none specified") + raise WicError("bootimg_efi requires a loader, none specified") startup = os.path.join(kernel_dir, "startup.nsh") if os.path.exists(startup): diff --git a/scripts/lib/wic/plugins/source/bootimg_partition.py b/scripts/lib/wic/plugins/source/bootimg_partition.py index 589853a439..cc121a78f0 100644 --- a/scripts/lib/wic/plugins/source/bootimg_partition.py +++ b/scripts/lib/wic/plugins/source/bootimg_partition.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-2.0-only # # DESCRIPTION -# This implements the 'bootimg-partition' source plugin class for +# This implements the 'bootimg_partition' source plugin class for # 'wic'. The plugin creates an image of boot partition, copying over # files listed in IMAGE_BOOT_FILES bitbake variable. # @@ -31,7 +31,7 @@ class BootimgPartitionPlugin(SourcePlugin): listed in IMAGE_BOOT_FILES bitbake variable. """ - name = 'bootimg-partition' + name = 'bootimg_partition' image_boot_files_var_name = 'IMAGE_BOOT_FILES' @classmethod diff --git a/scripts/lib/wic/plugins/source/bootimg_pcbios.py b/scripts/lib/wic/plugins/source/bootimg_pcbios.py index a207a83530..21f41e00bb 100644 --- a/scripts/lib/wic/plugins/source/bootimg_pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg_pcbios.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-2.0-only # # DESCRIPTION -# This implements the 'bootimg-pcbios' source plugin class for 'wic' +# This implements the 'bootimg_pcbios' source plugin class for 'wic' # # AUTHORS # Tom Zanussi @@ -27,7 +27,7 @@ class BootimgPcbiosPlugin(SourcePlugin): Create MBR boot partition and install syslinux on it. """ - name = 'bootimg-pcbios' + name = 'bootimg_pcbios' @classmethod def _get_bootimg_dir(cls, bootimg_dir, dirname): diff --git a/scripts/lib/wic/plugins/source/isoimage_isohybrid.py b/scripts/lib/wic/plugins/source/isoimage_isohybrid.py index 607356ad13..5d42eb5d3e 100644 --- a/scripts/lib/wic/plugins/source/isoimage_isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage_isohybrid.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-2.0-only # # DESCRIPTION -# This implements the 'isoimage-isohybrid' source plugin class for 'wic' +# This implements the 'isoimage_isohybrid' source plugin class for 'wic' # # AUTHORS # Mihaly Varga @@ -35,7 +35,7 @@ class IsoImagePlugin(SourcePlugin): bootloader files. Example kickstart file: - part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi, \\ + part /boot --source isoimage_isohybrid --sourceparams="loader=grub-efi, \\ image_name= IsoImage" --ondisk cd --label LIVECD bootloader --timeout=10 --append=" " @@ -45,7 +45,7 @@ class IsoImagePlugin(SourcePlugin): extension added by direct imeger plugin) and a file named IsoImage-cd.iso """ - name = 'isoimage-isohybrid' + name = 'isoimage_isohybrid' @classmethod def do_configure_syslinux(cls, creator, cr_workdir): @@ -340,10 +340,10 @@ class IsoImagePlugin(SourcePlugin): cls.do_configure_grubefi(part, creator, target_dir) else: - raise WicError("unrecognized bootimg-efi loader: %s" % + raise WicError("unrecognized bootimg_efi loader: %s" % source_params['loader']) except KeyError: - raise WicError("bootimg-efi requires a loader, none specified") + raise WicError("bootimg_efi requires a loader, none specified") # Create efi.img that contains bootloader files for EFI booting # if ISODIR didn't exist or didn't contains it