From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7032205572624613376 X-Received: by 2002:a05:6402:2067:: with SMTP id bd7mr21951738edb.240.1637312951194; Fri, 19 Nov 2021 01:09:11 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:8e41:: with SMTP id 1ls1653003edx.0.gmail; Fri, 19 Nov 2021 01:09:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzGxtaJbIIVyyR+uy+9ipg6UnkxFxlm9StWSwVgXFU8AZ+5NJknzXyuey0l/82mIwCVqEQ X-Received: by 2002:a05:6402:35c2:: with SMTP id z2mr21917172edc.92.1637312949905; Fri, 19 Nov 2021 01:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637312949; cv=none; d=google.com; s=arc-20160816; b=ia9HheaueX8teclv3eQpz4uv5fkoghByCPjYuRJh+QCntnM+xBX05vPeGJhJYuilzA +E3LBDU9E/v0lokCithP+RKii0ococfHrZRzjLsbFyqdhMPl0KQ/dsTxAjLg3Twfc0F0 B6n8TbdjytzGCW8WlBjJe4UHYBRHVJAgnVYfcUXPtQ1W45ukFoWCSjLxGiGCgwJGulci zS87Ygumt02XXcwlsi7tmPNQlUegZ8Gk2XtgWInWr5XBY4vKBPXsQrAMfSvlEm+F1MS4 9yvHcCmIKHn24iQa2E9crcp9NxKemu8qRCcnEloa6idy5e3dpb0snpG5VJuM2U2c7sHe UrxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=PkD+WheSExyDs1QB+C/VHlBIhD2nr0p3qfdWcUeG2E4=; b=Ard2Hz7Z4C8BchJiw4WXijISRzlVAEtgLfYDxqFaUpMVnAJY93gLWlpJr9B51ZD1P5 08eu30zgSlqb9IX5boBQKXXrhE5eq65+Z7bJg6uGKSEk9NSBNOQlw+cNCDp2BzvC6b1d 2eMSgGj827+/LHQ5XYWK3VxMBavBJtDqw88K7x6JHNLglbRM0H/g2pTXOiW9hGVbIdKL 6OUEjvXK0MO3Ix4BOdlZVAPKYsw6FGEegOwotrx9Vq/z38Phf52juWk5rODlX4zVJJQs 0qqN+5kFFZPm/6VmPVdLR+49hA5YZct87bO1mfOEZvC/FVR6ewXZtw1CtKjx4x3HMMSw ac/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id w5si98921ede.3.2021.11.19.01.09.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Nov 2021 01:09:09 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 1AJ996ZI020180 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 19 Nov 2021 10:09:09 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v3 6/6] api: Rename IMAGE_TYPE to IMAGE_FSTYPES Date: Fri, 19 Nov 2021 10:09:06 +0100 Message-Id: <20211119090906.31305-7-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211119090906.31305-1-ubely@ilbers.de> References: <20211119090906.31305-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: cxc+O7hoRRw6 The variable is renamed to get closer to OpenEmbedded/Poky variables naming. If user still uses IMAGE_TYPE, it will be used with the deprecation warning shown. Signed-off-by: Uladzimir Bely --- RECIPE-API-CHANGELOG.md | 5 +++++ doc/user_manual.md | 22 ++++++++++--------- 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/nand-ubi-demo.conf | 2 +- meta-isar/conf/machine/nanopi-neo.conf | 2 +- 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.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 +- .../multiconfig/qemuamd64-buster-cpiogz.conf | 2 +- .../multiconfig/qemuamd64-buster-tgz.conf | 2 +- .../conf/multiconfig/qemuamd64-buster.conf | 2 +- meta/classes/image.bbclass | 8 ++++--- scripts/start_vm | 8 +++---- testsuite/start_vm.py | 2 +- 25 files changed, 47 insertions(+), 38 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 7312d4d4..55836258 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -301,3 +301,8 @@ Kernel update with "apt-get" will not work since bootloader configuration will not be updated. It used to "kind of work" for grub and efi, that hack is gone. When using the plugins it is advised to name the partition "/boot" and to exclude boot from the follwing rootfs to not waste space. + +### Rename IMAGE_TYPE to IMAGE_FSTYPES + +The variable is renamed to get closer to OE/Poky variables naming. The old naming +will still also work, but with deprecation warning shown. diff --git a/doc/user_manual.md b/doc/user_manual.md index f8f58a5c..f6badb8e 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -210,7 +210,7 @@ tmp/deploy/images/rpi/isar-image-base.rpi-sdimg ### Generate full disk image -A bootable disk image is generated if `wic-img` is listed in IMAGE_TYPE. +A bootable disk image is generated if `wic-img` is listed in IMAGE_FSTYPES. Behind the scenes a tool called `wic` is used to assemble the images. It is controlled by a `.wks` file which you can choose with changing WKS_FILE. Some examples in the tree use that feature already. @@ -249,7 +249,7 @@ https://github.com/intel/bmap-tools ### Generate container image with root filesystem -A runnable container image is generated if IMAGE_TYPE variable includes +A runnable container image is generated if IMAGE_FSTYPES variable includes 'container-img'. Getting a container image can be the main purpose of an Isar configuration, but not only. @@ -290,8 +290,8 @@ The resulting container image archives (only for `docker-archive` and For one-shot builds (use `local.conf` otherwise): ``` -export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE IMAGE_TYPE CONTAINER_FORMAT" -export IMAGE_TYPE="container-img" +export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE IMAGE_FSTYPES CONTAINER_FORMAT" +export IMAGE_FSTYPES="container-img" export CONTAINER_FORMAT="docker-archive" ``` @@ -452,7 +452,9 @@ Please refer to `Add a Custom Application` section for more information about wr ## Image Type Selection -Isar can generate various images types for specific machine. The type of the image to be generated may be specified through the `IMAGE_TYPE` variable. Currently, the following image types are provided: +Isar can generate various images types for specific machine. The type of the +image to be generated may be specified through the `IMAGE_FSTYPES` variable. +Currently, the following image types are provided: - `ext4` - Raw ext4 filesystem image (default option for `qemuarm` machine). - `rpi-sdimg` - A complete, partitioned Raspberry Pi SD card image (default option for the `rpi` machine). @@ -460,7 +462,7 @@ Isar can generate various images types for specific machine. The type of the ima - `ubi-img` - A image for use on mtd nand partitions employing UBI - `vm-img` - A image for use on VirtualBox or VMware -There are several image types can be listed in `IMAGE_TYPE` divided by space. +There are several image types can be listed in `IMAGE_FSTYPES` divided by space. Instead of setting multiple image types in one target, user can also use [multiconfig](#building-target-images-for-multiple-configurations) feature and specify @@ -519,7 +521,7 @@ Every machine is described in its configuration file. The file defines the follo - `KERNEL_IMAGE` - The name of kernel binary that it installed to `/boot` folder in target filesystem. This variable is used by Isar to extract the kernel binary and put it into the deploy folder. This makes sense for embedded devices, where kernel and root filesystem are written to different flash partitions. This variable is optional. - `INITRD_IMAGE` - The name of `ramdisk` binary. The meaning of this variable is similar to `KERNEL_IMAGE`. This variable is optional. - `MACHINE_SERIAL` - The name of serial device that will be used for console output. - - `IMAGE_TYPE` - The types of images to be generated for this machine. + - `IMAGE_FSTYPES` - The types of images to be generated for this machine. Below is an example of machine configuration file for `Raspberry Pi` board: ``` @@ -528,7 +530,7 @@ IMAGE_PREINSTALL = "linux-image-rpi-rpfv \ KERNEL_IMAGE = "vmlinuz-4.4.0-1-rpi" INITRD_IMAGE = "initrd.img-4.4.0-1-rpi" MACHINE_SERIAL = "ttyAMA0" -IMAGE_TYPE = "rpi-sdimg" +IMAGE_FSTYPES = "rpi-sdimg" ``` To add new machine user should perform the following steps: @@ -561,7 +563,7 @@ The user may use `meta-isar/recipes-core/images` as a template for new image rec ### General Information The image recipe in Isar creates a folder with target root filesystem. Its default location is: ``` -tmp/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_TYPE}/${PV}-${PR}/rootfs +tmp/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_FSTYPES}/${PV}-${PR}/rootfs ``` Every image type in Isar is implemented as a `bitbake` class. The goal of these classes is to pack root filesystem folder to appropriate format. @@ -584,7 +586,7 @@ The content of `do_my_image` function can be implemented either in shell or in P In the machine configuration file, set the following: ``` -IMAGE_TYPE = "my-image" +IMAGE_FSTYPES = "my-image" ``` ### Reference Classes diff --git a/meta-isar/conf/machine/bananapi.conf b/meta-isar/conf/machine/bananapi.conf index cec80578..dd3a0667 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_TYPE ?= "wic-img" +IMAGE_FSTYPES ?= "wic-img" 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 d2978c46..1f7669ad 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_TYPE ?= "container-img" +IMAGE_FSTYPES ?= "container-img" diff --git a/meta-isar/conf/machine/de0-nano-soc.conf b/meta-isar/conf/machine/de0-nano-soc.conf index 5e35602c..f822e24b 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_TYPE ?= "wic-img" +IMAGE_FSTYPES ?= "wic-img" 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 09dfaf49..615d6749 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_TYPE = "wic-img" +IMAGE_FSTYPES = "wic-img" WKS_FILE ?= "hikey" IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}" diff --git a/meta-isar/conf/machine/nand-ubi-demo.conf b/meta-isar/conf/machine/nand-ubi-demo.conf index 25ec72f3..5be337f9 100644 --- a/meta-isar/conf/machine/nand-ubi-demo.conf +++ b/meta-isar/conf/machine/nand-ubi-demo.conf @@ -8,6 +8,6 @@ BAUDRATE_TTY ?= "115200" MKUBIFS_ARGS := "-m 0x1000 -e 0x3e000 -c 1500" UBINIZE_ARGS = "-vv -m 0x1000 -p 0x40000" -IMAGE_TYPE ?= "ubi-ubifs-img" +IMAGE_FSTYPES ?= "ubi-ubifs-img" DTB_FILES = "imx6q-sabrelite.dtb" diff --git a/meta-isar/conf/machine/nanopi-neo.conf b/meta-isar/conf/machine/nanopi-neo.conf index 703b4f4e..2475ce9d 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_TYPE ?= "wic-img" +IMAGE_FSTYPES ?= "wic-img" WKS_FILE ?= "nanopi-neo.wks.in" IMAGE_INSTALL += "u-boot-script" diff --git a/meta-isar/conf/machine/qemuamd64.conf b/meta-isar/conf/machine/qemuamd64.conf index dab4f094..ccfde391 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_TYPE ?= "wic-img" +IMAGE_FSTYPES ?= "wic-img" 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 fbbdc233..20a71ea4 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_TYPE ?= "ext4-img" +IMAGE_FSTYPES ?= "ext4-img" QEMU_ROOTFS_DEV ?= "vda" diff --git a/meta-isar/conf/machine/qemuarm64.conf b/meta-isar/conf/machine/qemuarm64.conf index e5e762ff..ca23cef5 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_TYPE ?= "ext4-img" +IMAGE_FSTYPES ?= "ext4-img" QEMU_ROOTFS_DEV ?= "vda" diff --git a/meta-isar/conf/machine/qemui386.conf b/meta-isar/conf/machine/qemui386.conf index e6afb06b..17cff1eb 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_TYPE ?= "wic-img" +IMAGE_FSTYPES ?= "wic-img" 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 85178ee9..b34e46de 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_TYPE ?= "ext4-img" +IMAGE_FSTYPES ?= "ext4-img" QEMU_ROOTFS_DEV ?= "sda" diff --git a/meta-isar/conf/machine/qemuriscv64.conf b/meta-isar/conf/machine/qemuriscv64.conf index f4f5312a..5c687a03 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_TYPE ?= "ext4-img" +IMAGE_FSTYPES ?= "ext4-img" QEMU_ROOTFS_DEV ?= "vda" diff --git a/meta-isar/conf/machine/rpi.conf b/meta-isar/conf/machine/rpi.conf index 31f22191..61852a9b 100644 --- a/meta-isar/conf/machine/rpi.conf +++ b/meta-isar/conf/machine/rpi.conf @@ -4,4 +4,4 @@ MACHINE_SERIAL ?= "ttyAMA0" BAUDRATE_TTY ?= "9600" -IMAGE_TYPE ?= "rpi-sdimg" +IMAGE_FSTYPES ?= "rpi-sdimg" diff --git a/meta-isar/conf/machine/sifive-fu540.conf b/meta-isar/conf/machine/sifive-fu540.conf index c815f4a8..d73f0475 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_TYPE ?= "wic-img" +IMAGE_FSTYPES ?= "wic-img" 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 e963d080..22e88ea9 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_TYPE ?= "wic-img" +IMAGE_FSTYPES ?= "wic-img" 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 b20eaca6..c0f65842 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_TYPE ?= "vm-img" +IMAGE_FSTYPES ?= "vm-img" diff --git a/meta-isar/conf/machine/vmware.conf b/meta-isar/conf/machine/vmware.conf index 731559e7..5832b299 100644 --- a/meta-isar/conf/machine/vmware.conf +++ b/meta-isar/conf/machine/vmware.conf @@ -12,4 +12,4 @@ WKS_FILE ?= "sdimage-efi" IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}" VMDK_SUBFORMAT = "streamOptimized" -IMAGE_TYPE ?= "vm-img" +IMAGE_FSTYPES ?= "vm-img" diff --git a/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf b/meta-isar/conf/multiconfig/qemuamd64-buster-cpiogz.conf index cadcdacf..37f89581 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_TYPE = "cpiogz-img" +IMAGE_FSTYPES = "cpiogz-img" diff --git a/meta-isar/conf/multiconfig/qemuamd64-buster-tgz.conf b/meta-isar/conf/multiconfig/qemuamd64-buster-tgz.conf index 17de3384..e3992e60 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_TYPE ?= "targz-img" +IMAGE_FSTYPES ?= "targz-img" diff --git a/meta-isar/conf/multiconfig/qemuamd64-buster.conf b/meta-isar/conf/multiconfig/qemuamd64-buster.conf index d6981bfe..5615198d 100644 --- a/meta-isar/conf/multiconfig/qemuamd64-buster.conf +++ b/meta-isar/conf/multiconfig/qemuamd64-buster.conf @@ -3,4 +3,4 @@ MACHINE ?= "qemuamd64" DISTRO ?= "debian-buster" -IMAGE_TYPE ?= "wic-img ext4-img" +IMAGE_FSTYPES ?= "wic-img ext4-img" diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 2d060704..0fab40e0 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -2,14 +2,14 @@ # Copyright (C) 2015-2017 ilbers GmbH # Replace possible multiple spaces with single underscores -IMAGE_SUFFIX = "${@'_'.join(d.getVar("IMAGE_TYPE", True).split())}" +IMAGE_SUFFIX = "${@'_'.join(d.getVar("IMAGE_FSTYPES", True).split())}" # Make workdir and stamps machine-specific without changing common PN target WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_SUFFIX}/${PV}-${PR}" STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_SUFFIX}/${PV}-${PR}" STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}-${IMAGE_SUFFIX}/*-*" IMAGE_INSTALL ?= "" -IMAGE_TYPE ?= "ext4-img" +IMAGE_FSTYPES ?= "${@ d.getVar("IMAGE_TYPE", True) if d.getVar("IMAGE_TYPE", True) else "ext4-img"}" IMAGE_ROOTFS ?= "${WORKDIR}/rootfs" IMAGE_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getVar("KERNEL_NAME", True) else ""}" @@ -38,6 +38,8 @@ BUILDROOT_WORK = "${BUILDCHROOT_DIR}${PP_WORK}" python(){ if (d.getVar('IMAGE_TRANSIENT_PACKAGES')): bb.warn("IMAGE_TRANSIENT_PACKAGES is set and no longer supported") + if (d.getVar('IMAGE_TYPE')): + bb.warn("IMAGE_TYPE is deprecated, please switch to IMAGE_FSTYPES") } def cfg_script(d): @@ -222,4 +224,4 @@ EOSUDO addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess # Last so that the image type can overwrite tasks if needed -inherit ${IMAGE_TYPE} +inherit ${IMAGE_FSTYPES} diff --git a/scripts/start_vm b/scripts/start_vm index 38355a6a..2d8a8b7e 100755 --- a/scripts/start_vm +++ b/scripts/start_vm @@ -109,10 +109,10 @@ readonly ISARROOT="$(dirname "$0")"/.. readonly MACHINE_CONF=$ISARROOT/meta-isar/conf/machine/qemu$ARCH.conf eval "$(egrep 'MACHINE_SERIAL|QEMU_' $MACHINE_CONF |bb2sh)" -eval $(bitbake -e mc:qemu$ARCH-$DISTRO:isar-image-base | grep "\(^IMAGE_TYPE=\|^IMAGE_FULLNAME=\)") +eval $(bitbake -e mc:qemu$ARCH-$DISTRO:isar-image-base | grep "\(^IMAGE_FSTYPES=\|^IMAGE_FULLNAME=\)") # Take first image type for VM if there are several defined -IMAGE_TYPE=$(echo "$IMAGE_TYPE" | awk '{print $1}') -case "$IMAGE_TYPE" in +IMAGE_FSTYPES=$(echo "$IMAGE_FSTYPES" | awk '{print $1}') +case "$IMAGE_FSTYPES" in ext4-img) readonly ROOTFS_IMAGE=$IMAGE_FULLNAME.ext4.img @@ -135,7 +135,7 @@ case "$IMAGE_TYPE" in EXTRA_ARGS="$EXTRA_ARGS -snapshot" ;; *) - echo "IMAGE_TYPE \"$IMAGE_TYPE\" not supported" + echo "IMAGE_FSTYPES \"$IMAGE_FSTYPES\" not supported" exit 1 ;; esac diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py index 63c90059..4f5b2ec4 100755 --- a/testsuite/start_vm.py +++ b/testsuite/start_vm.py @@ -28,7 +28,7 @@ def format_qemu_cmdline(arch, build, distro, out, pid): extra_args = '' cpu = [''] - image_type = get_bitbake_var(bb_output, 'IMAGE_TYPE').split()[0] + image_type = get_bitbake_var(bb_output, 'IMAGE_FSTYPES').split()[0] deploy_dir_image = get_bitbake_var(bb_output, 'DEPLOY_DIR_IMAGE') base = 'ubuntu' if distro in ['focal', 'bionic'] else 'debian' if image_type == 'ext4-img': -- 2.20.1