[v3,5/7] imagetypes: switch meta-isar to the new scheme

Message ID 20220415065617.1910954-6-adriaan.schmidt@siemens.com
State Superseded, archived
Headers show
Series imagetypes | expand

Commit Message

Schmidt, Adriaan April 14, 2022, 10:56 p.m. UTC
- new image type names, basically replacing wic-img with wic, etc.
- adapt custom image type rpi-sdimg to the new scheme

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 meta-isar/classes/rpi-sdimg.bbclass                   |  2 +-
 meta-isar/classes/ubi-ubifs-img.bbclass               | 11 ++++++++---
 meta-isar/conf/machine/bananapi.conf                  |  2 +-
 meta-isar/conf/machine/container-amd64.conf           |  2 +-
 meta-isar/conf/machine/de0-nano-soc.conf              |  2 +-
 meta-isar/conf/machine/hikey.conf                     |  2 +-
 meta-isar/conf/machine/imx6-sabrelite.conf            |  3 ++-
 meta-isar/conf/machine/nanopi-neo.conf                |  2 +-
 meta-isar/conf/machine/phyboard-mira.conf             |  3 ++-
 meta-isar/conf/machine/qemuamd64.conf                 |  2 +-
 meta-isar/conf/machine/qemuarm.conf                   |  2 +-
 meta-isar/conf/machine/qemuarm64.conf                 |  2 +-
 meta-isar/conf/machine/qemui386.conf                  |  2 +-
 meta-isar/conf/machine/qemumipsel.conf                |  2 +-
 meta-isar/conf/machine/qemuriscv64.conf               |  2 +-
 meta-isar/conf/machine/rpi-common.conf                |  2 +-
 meta-isar/conf/machine/rpi.conf                       |  2 +-
 meta-isar/conf/machine/sifive-fu540.conf              |  2 +-
 meta-isar/conf/machine/stm32mp15x.conf                |  2 +-
 meta-isar/conf/machine/virtualbox.conf                |  2 +-
 meta-isar/conf/machine/vmware.conf                    |  2 +-
 .../conf/multiconfig/qemuamd64-buster-cpiogz.conf     |  2 +-
 meta-isar/conf/multiconfig/qemuamd64-buster-tgz.conf  |  2 +-
 meta-isar/conf/multiconfig/qemuamd64-buster.conf      |  2 +-
 meta-isar/recipes-core/images/isar-image-ubi.bb       |  4 ++--
 testsuite/cibase.py                                   |  4 ++--
 26 files changed, 37 insertions(+), 30 deletions(-)

Patch

diff --git a/meta-isar/classes/rpi-sdimg.bbclass b/meta-isar/classes/rpi-sdimg.bbclass
index 010c573c..508c4bc4 100644
--- a/meta-isar/classes/rpi-sdimg.bbclass
+++ b/meta-isar/classes/rpi-sdimg.bbclass
@@ -3,7 +3,7 @@ 
 #
 # Based on SD class from meta-raspberrypi
 
-inherit wic-img
+IMAGE_TYPEDEP_rpi_sdimg = "wic"
 
 WKS_FILE ?= "rpi-sdimg"
 
diff --git a/meta-isar/classes/ubi-ubifs-img.bbclass b/meta-isar/classes/ubi-ubifs-img.bbclass
index 095719aa..7a917b47 100644
--- a/meta-isar/classes/ubi-ubifs-img.bbclass
+++ b/meta-isar/classes/ubi-ubifs-img.bbclass
@@ -5,6 +5,11 @@ 
 #
 # SPDX-License-Identifier: MIT
 
-inherit ubi-img ubifs-img fit-img
-addtask do_ubi_image after do_ubifs_image
-addtask do_ubi_image after do_fit_image
+IMAGE_TYPEDEP_ubi_ubifs = "ubi"
+IMAGE_TYPEDEP_ubi += "ubifs fit"
+
+IMAGE_CMD_ubi_ubifs() {
+    # we need to produce output (with extension .ubi-ubifs),
+    # so just create a symlink
+    ln -sf ${IMAGE_FULLNAME}.ubi ${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.ubi-ubifs
+}
diff --git a/meta-isar/conf/machine/bananapi.conf b/meta-isar/conf/machine/bananapi.conf
index dd3a0667..36cda28a 100644
--- a/meta-isar/conf/machine/bananapi.conf
+++ b/meta-isar/conf/machine/bananapi.conf
@@ -9,6 +9,6 @@  KERNEL_NAME ?= "armmp"
 
 IMAGE_INSTALL += "u-boot-script"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "bananapi"
 IMAGER_INSTALL += "u-boot-sunxi"
diff --git a/meta-isar/conf/machine/container-amd64.conf b/meta-isar/conf/machine/container-amd64.conf
index 1f7669ad..e24729ff 100644
--- a/meta-isar/conf/machine/container-amd64.conf
+++ b/meta-isar/conf/machine/container-amd64.conf
@@ -4,4 +4,4 @@ 
 # SPDX-License-Identifier: MIT
 
 DISTRO_ARCH ?= "amd64"
-IMAGE_FSTYPES ?= "container-img"
+IMAGE_FSTYPES ?= "docker-archive.gz"
diff --git a/meta-isar/conf/machine/de0-nano-soc.conf b/meta-isar/conf/machine/de0-nano-soc.conf
index f822e24b..55343e9f 100644
--- a/meta-isar/conf/machine/de0-nano-soc.conf
+++ b/meta-isar/conf/machine/de0-nano-soc.conf
@@ -11,7 +11,7 @@  PREFERRED_PROVIDER_u-boot-de0-nano-soc = "u-boot-de0-nano-soc"
 U_BOOT_CONFIG_de0-nano-soc = "socfpga_de0_nano_soc_defconfig"
 U_BOOT_BIN_de0-nano-soc = "u-boot-with-spl.sfp"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "de0-nano-soc.wks.in"
 IMAGER_INSTALL += "u-boot-de0-nano-soc"
 IMAGER_BUILD_DEPS += "u-boot-de0-nano-soc"
diff --git a/meta-isar/conf/machine/hikey.conf b/meta-isar/conf/machine/hikey.conf
index 615d6749..7f9cccb2 100644
--- a/meta-isar/conf/machine/hikey.conf
+++ b/meta-isar/conf/machine/hikey.conf
@@ -7,7 +7,7 @@  DISTRO_ARCH = "arm64"
 
 KERNEL_NAME ?= "mainline"
 
-IMAGE_FSTYPES = "wic-img"
+IMAGE_FSTYPES = "wic"
 WKS_FILE ?= "hikey"
 IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}"
 
diff --git a/meta-isar/conf/machine/imx6-sabrelite.conf b/meta-isar/conf/machine/imx6-sabrelite.conf
index 5be337f9..d8cb93ad 100644
--- a/meta-isar/conf/machine/imx6-sabrelite.conf
+++ b/meta-isar/conf/machine/imx6-sabrelite.conf
@@ -6,8 +6,9 @@ 
 MACHINE_SERIAL ?= "ttymxc0"
 BAUDRATE_TTY ?= "115200"
 
+IMAGE_CLASSES += "ubi-ubifs-img"
 MKUBIFS_ARGS := "-m 0x1000 -e 0x3e000 -c 1500"
 UBINIZE_ARGS = "-vv -m 0x1000 -p 0x40000"
-IMAGE_FSTYPES ?= "ubi-ubifs-img"
+IMAGE_FSTYPES ?= "ubi-ubifs"
 
 DTB_FILES = "imx6q-sabrelite.dtb"
diff --git a/meta-isar/conf/machine/nanopi-neo.conf b/meta-isar/conf/machine/nanopi-neo.conf
index 2475ce9d..5aa717e5 100644
--- a/meta-isar/conf/machine/nanopi-neo.conf
+++ b/meta-isar/conf/machine/nanopi-neo.conf
@@ -7,7 +7,7 @@  DISTRO_ARCH ?= "armhf"
 
 KERNEL_NAME ?= "armmp"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "nanopi-neo.wks.in"
 
 IMAGE_INSTALL += "u-boot-script"
diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
index 2d052d0c..0c6d29aa 100644
--- a/meta-isar/conf/machine/phyboard-mira.conf
+++ b/meta-isar/conf/machine/phyboard-mira.conf
@@ -6,8 +6,9 @@ 
 MACHINE_SERIAL ?= "ttymxc0"
 BAUDRATE_TTY ?= "115200"
 
+IMAGE_CLASSES += "ubi-ubifs-img"
 MKUBIFS_ARGS := "-m 0x1000 -e 0x7e000 -c 8083"
 UBINIZE_ARGS = "-vv -m 0x1000 -p 0x80000"
-IMAGE_FSTYPES ?= "ubi-ubifs-img"
+IMAGE_FSTYPES ?= "ubi-ubifs"
 
 DTB_FILES = "imx6q-phytec-mira-rdk-nand.dtb"
diff --git a/meta-isar/conf/machine/qemuamd64.conf b/meta-isar/conf/machine/qemuamd64.conf
index ccfde391..eca2628c 100644
--- a/meta-isar/conf/machine/qemuamd64.conf
+++ b/meta-isar/conf/machine/qemuamd64.conf
@@ -6,7 +6,7 @@  DISTRO_ARCH ?= "amd64"
 KERNEL_NAME ?= "amd64"
 KERNEL_NAME_ubuntu-focal ?= "generic"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "sdimage-efi"
 IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}"
 
diff --git a/meta-isar/conf/machine/qemuarm.conf b/meta-isar/conf/machine/qemuarm.conf
index 20a71ea4..06d4b34d 100644
--- a/meta-isar/conf/machine/qemuarm.conf
+++ b/meta-isar/conf/machine/qemuarm.conf
@@ -5,7 +5,7 @@  DISTRO_ARCH ?= "armhf"
 
 KERNEL_NAME ?= "armmp"
 
-IMAGE_FSTYPES ?= "ext4-img"
+IMAGE_FSTYPES ?= "ext4"
 
 QEMU_ROOTFS_DEV ?= "vda"
 
diff --git a/meta-isar/conf/machine/qemuarm64.conf b/meta-isar/conf/machine/qemuarm64.conf
index ca23cef5..b30fad47 100644
--- a/meta-isar/conf/machine/qemuarm64.conf
+++ b/meta-isar/conf/machine/qemuarm64.conf
@@ -6,7 +6,7 @@  DISTRO_ARCH ?= "arm64"
 KERNEL_NAME ?= "arm64"
 KERNEL_NAME_ubuntu-focal ?= "generic"
 
-IMAGE_FSTYPES ?= "ext4-img"
+IMAGE_FSTYPES ?= "ext4"
 
 QEMU_ROOTFS_DEV ?= "vda"
 
diff --git a/meta-isar/conf/machine/qemui386.conf b/meta-isar/conf/machine/qemui386.conf
index 17cff1eb..ddfc077b 100644
--- a/meta-isar/conf/machine/qemui386.conf
+++ b/meta-isar/conf/machine/qemui386.conf
@@ -4,7 +4,7 @@  DISTRO_ARCH ?= "i386"
 
 KERNEL_NAME ?= "686-pae"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "directdisk-isar"
 IMAGER_INSTALL += "${SYSLINUX_BOOTLOADER_INSTALL}"
 
diff --git a/meta-isar/conf/machine/qemumipsel.conf b/meta-isar/conf/machine/qemumipsel.conf
index b34e46de..40f5e744 100644
--- a/meta-isar/conf/machine/qemumipsel.conf
+++ b/meta-isar/conf/machine/qemumipsel.conf
@@ -5,7 +5,7 @@  DISTRO_ARCH ?= "mipsel"
 
 KERNEL_NAME ?= "4kc-malta"
 
-IMAGE_FSTYPES ?= "ext4-img"
+IMAGE_FSTYPES ?= "ext4"
 
 QEMU_ROOTFS_DEV ?= "sda"
 
diff --git a/meta-isar/conf/machine/qemuriscv64.conf b/meta-isar/conf/machine/qemuriscv64.conf
index 5c687a03..cd04d873 100644
--- a/meta-isar/conf/machine/qemuriscv64.conf
+++ b/meta-isar/conf/machine/qemuriscv64.conf
@@ -8,7 +8,7 @@  DISTRO_ARCH ?= "riscv64"
 
 KERNEL_NAME ?= "riscv64"
 
-IMAGE_FSTYPES ?= "ext4-img"
+IMAGE_FSTYPES ?= "ext4"
 
 QEMU_ROOTFS_DEV ?= "vda"
 
diff --git a/meta-isar/conf/machine/rpi-common.conf b/meta-isar/conf/machine/rpi-common.conf
index 8d6dff9e..327ac91b 100644
--- a/meta-isar/conf/machine/rpi-common.conf
+++ b/meta-isar/conf/machine/rpi-common.conf
@@ -5,7 +5,7 @@  BOOT_SPACE ?= "81920"
 MACHINE_SERIAL ?= "serial0"
 BAUDRATE_TTY ?= "115200"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "rpi-sdimg"
 
 KERNEL_TYPE = "raspios"
diff --git a/meta-isar/conf/machine/rpi.conf b/meta-isar/conf/machine/rpi.conf
index 0ab701c9..917527f0 100644
--- a/meta-isar/conf/machine/rpi.conf
+++ b/meta-isar/conf/machine/rpi.conf
@@ -4,5 +4,5 @@ 
 MACHINE_SERIAL ?= "ttyAMA0"
 BAUDRATE_TTY ?= "9600"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "rpi-sdimg"
diff --git a/meta-isar/conf/machine/sifive-fu540.conf b/meta-isar/conf/machine/sifive-fu540.conf
index d73f0475..1eb58db1 100644
--- a/meta-isar/conf/machine/sifive-fu540.conf
+++ b/meta-isar/conf/machine/sifive-fu540.conf
@@ -7,7 +7,7 @@  DISTRO_ARCH = "riscv64"
 
 KERNEL_NAME ?= "mainline"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "sifive-fu540"
 IMAGER_INSTALL += "opensbi-sifive-fu540"
 IMAGER_BUILD_DEPS += "opensbi-sifive-fu540"
diff --git a/meta-isar/conf/machine/stm32mp15x.conf b/meta-isar/conf/machine/stm32mp15x.conf
index 22e88ea9..62de7dd1 100644
--- a/meta-isar/conf/machine/stm32mp15x.conf
+++ b/meta-isar/conf/machine/stm32mp15x.conf
@@ -11,7 +11,7 @@  PREFERRED_PROVIDER_u-boot-stm32mp15x = "u-boot-stm32mp15x"
 U_BOOT_CONFIG_stm32mp15x = "stm32mp15_trusted_defconfig"
 U_BOOT_BIN_stm32mp15x = "u-boot.stm32"
 
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "stm32mp15x.wks.in"
 IMAGER_INSTALL += "trusted-firmware-a-stm32mp15x optee-os-stm32mp15x u-boot-stm32mp15x"
 IMAGER_BUILD_DEPS += "trusted-firmware-a-stm32mp15x optee-os-stm32mp15x u-boot-stm32mp15x"
diff --git a/meta-isar/conf/machine/virtualbox.conf b/meta-isar/conf/machine/virtualbox.conf
index c0f65842..de3d04c3 100644
--- a/meta-isar/conf/machine/virtualbox.conf
+++ b/meta-isar/conf/machine/virtualbox.conf
@@ -12,4 +12,4 @@  WKS_FILE ?= "sdimage-efi"
 IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}"
 
 VMDK_SUBFORMAT = "monolithicSparse"
-IMAGE_FSTYPES ?= "vm-img"
+IMAGE_FSTYPES ?= "ova"
diff --git a/meta-isar/conf/machine/vmware.conf b/meta-isar/conf/machine/vmware.conf
index 9bf1fd96..fba639b1 100644
--- a/meta-isar/conf/machine/vmware.conf
+++ b/meta-isar/conf/machine/vmware.conf
@@ -14,4 +14,4 @@  IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}"
 OVF_TEMPLATE_FILE ?= "vm-img-vmware.ovf.tmpl"
 
 VMDK_SUBFORMAT = "streamOptimized"
-IMAGE_FSTYPES ?= "vm-img"
+IMAGE_FSTYPES ?= "ova"
diff --git a/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf b/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf
index 37f89581..675d934a 100644
--- a/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf
+++ b/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf
@@ -6,4 +6,4 @@ 
 MACHINE ?= "qemuamd64"
 DISTRO ?= "debian-buster"
 
-IMAGE_FSTYPES = "cpiogz-img"
+IMAGE_FSTYPES = "cpio.gz"
diff --git a/meta-isar/conf/multiconfig/qemuamd64-buster-tgz.conf b/meta-isar/conf/multiconfig/qemuamd64-buster-tgz.conf
index e3992e60..b48b0a6c 100644
--- a/meta-isar/conf/multiconfig/qemuamd64-buster-tgz.conf
+++ b/meta-isar/conf/multiconfig/qemuamd64-buster-tgz.conf
@@ -6,4 +6,4 @@ 
 MACHINE ?= "qemuamd64"
 DISTRO ?= "debian-buster"
 
-IMAGE_FSTYPES ?= "targz-img"
+IMAGE_FSTYPES ?= "tar.gz"
diff --git a/meta-isar/conf/multiconfig/qemuamd64-buster.conf b/meta-isar/conf/multiconfig/qemuamd64-buster.conf
index 44fe8af9..79d0aa63 100644
--- a/meta-isar/conf/multiconfig/qemuamd64-buster.conf
+++ b/meta-isar/conf/multiconfig/qemuamd64-buster.conf
@@ -5,4 +5,4 @@  DISTRO ?= "debian-buster"
 WKS_FILE ?= "efi-plus-pcbios.wks"
 IMAGER_INSTALL += "${SYSLINUX_BOOTLOADER_INSTALL}"
 
-IMAGE_FSTYPES ?= "wic-img ext4-img"
+IMAGE_FSTYPES ?= "wic ext4"
diff --git a/meta-isar/recipes-core/images/isar-image-ubi.bb b/meta-isar/recipes-core/images/isar-image-ubi.bb
index ef2cf1c3..8c70c1f7 100644
--- a/meta-isar/recipes-core/images/isar-image-ubi.bb
+++ b/meta-isar/recipes-core/images/isar-image-ubi.bb
@@ -23,5 +23,5 @@  INITRD_IMG = "${PP_DEPLOY}/${INITRD_IMAGE}"
 # only one dtb file supported, pick the first
 DTB_IMG = "${PP_DEPLOY}/${@(d.getVar('DTB_FILES').split() or [''])[0]}"
 
-UBIFS_IMG = "${PP_DEPLOY}/${UBIFS_IMAGE_FILE}"
-FIT_IMG = "${PP_DEPLOY}/${FIT_IMAGE_FILE}"
+UBIFS_IMG = "${PP_DEPLOY}/${IMAGE_FULLNAME}.ubifs"
+FIT_IMG = "${PP_DEPLOY}/${IMAGE_FULLNAME}.fit"
diff --git a/testsuite/cibase.py b/testsuite/cibase.py
index 0281be41..1dd7c7a0 100755
--- a/testsuite/cibase.py
+++ b/testsuite/cibase.py
@@ -120,7 +120,7 @@  class CIBaseTest(CIBuilder):
                     ['do_bootstrap_setscene', '!do_bootstrap']),
                 check_executed_tasks('buildchroot-target',
                     ['do_rootfs_install_setscene', '!do_rootfs_install']),
-                check_executed_tasks('isar-image-base-*-wic-img',
+                check_executed_tasks('isar-image-base-*',
                     ['do_rootfs_install_setscene', '!do_rootfs_install'])
             ]):
             self.fail("Failed rebuild image")
@@ -163,7 +163,7 @@  class CIBaseTest(CIBuilder):
                 # TODO: if we actually make a change to hello, then we could test
                 #       that do_rootfs is executed. currently, hello is rebuilt,
                 #       but its sstate sig/hash does not change.
-                check_executed_tasks('isar-image-base-*-wic-img',
+                check_executed_tasks('isar-image-base-*',
                     ['do_rootfs_install_setscene', '!do_rootfs_install'])
             ]):
             self.fail("Failed rebuild package and image")