From patchwork Thu Feb 26 16:26:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihang Wei X-Patchwork-Id: 4910 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 26 Feb 2026 17:26:27 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f59.google.com (mail-wm1-f59.google.com [209.85.128.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 61QGQPYF009030 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Feb 2026 17:26:25 +0100 Received: by mail-wm1-f59.google.com with SMTP id 5b1f17b1804b1-4837f288194sf8472065e9.2 for ; Thu, 26 Feb 2026 08:26:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1772123179; cv=pass; d=google.com; s=arc-20240605; b=VAXq5mp5gAbGuwluFWuZV3vn3dWYaXKXolxlNJkwq15q/dVuGwXm5r3dFOh8p9X3/e o6oJ3TNTBMnvDvcmw/zsWAeweD+hoqYoENeirlb9ST8ftWWzMKdqCw2DDBPNRSbEw5fV AmQpv4NgAvspfxrJeVhzNs4A0BUVJXzYQ4pEbg5DAmsg/Vtzy+zCVRqXHTqKL7oYJKvk 2Ml0abQwFbkrMJ2b4evkFT/qIYO+UPDL1dPwmxNeXO6bdkQszRzV64ouWsG9fjVOjwPP FbUJwN9LNz3XejaCjKxpjzY20PySeuHhREiFvLpril8rmhLbVpYL3EyOdBmdSvzqL1km WHJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:dkim-signature; bh=yNwpDY7AZMqwlz0KOpQnJWsbobvHWLXkjcNWB6Ta7gg=; fh=YQBoMKslkM4mQa+hb4dY2xf9Z/WKLTcL+ovPU9/DJVw=; b=InvA4jw36iUR8it6FtE7I71h4MrW/8aNCB/vrGMTkZoPbZDmhYeY4YXDIxPipGeeyq zLKWTGXHKI3E2gHzEE6yWhGk8slDvPMBSowMpCpHHEt4Myp6+NUIvERBHiPtfxBkTuJR i/S29cQ6SoaudAYEG2L4E5YEhgaXwld//gtZUpdms/tBmC35XaGWBVkTtwBjd2BZhFIZ JTWSn0uq39P2dD6HIJNWfQLm9UP73iX71ZmK85IlyWUXDhWMLaFo+JUTfIK0b5j2dltv C0Q04j/yjOOacBQZJofh8Yx5nHUvF4zu0SJx39ozI+nu1YzBT9LLn5m6iC1mhrwEvOR+ 0PxQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1772123179; x=1772727979; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=yNwpDY7AZMqwlz0KOpQnJWsbobvHWLXkjcNWB6Ta7gg=; b=OCm9nXt8iPQIs5UTlLO77O9zw0e81qdsqIqE0QsUs4SmVIsBp3LpuFKfUGUUF1s5gn wjjiNf0g0JXsXqq3H6KJK6DVIOzQHmfrhmIsreBaDiJpzghxjpv/0cOXlsxmg91StWLN rk7Btp8Xqs3ZqtRJM7wG4qbdPmU7o1c1d6r15p9otupFuxlCvTjfWmvMSIv/uHtO0Rpy g9+Ni04MKiojiWlO0Uw8pD5bAqFN+dxVIvYrWuTirZQ4UZZ4xjf6Uow2fWYchTvmAd02 NhK4OGvFfpBuuhGuVyrdBUxp9qxISlUWE77uZS+vvL0RD0LofIIcmNnsdjw4KOilYzKI ghMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772123179; x=1772727979; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=yNwpDY7AZMqwlz0KOpQnJWsbobvHWLXkjcNWB6Ta7gg=; b=nRYMvz2d8P8Kj0fGS+RRetd488D79AAplPFvQUY5Sqk37ZMuGFFlyaxjTS+Z9AxjJm vkK4QOYemPDNQC2Rl7bSYLHQK13EwIDDZgEfi5/Sj0PDTiEMlMIC6pJESEF6sYfWBcNB NAvd1CfGliYfjxaDM0GDJ4ydtlivdQYFX4GZGuxS0bUhfHCmAWBUS/qjweXk7te2Ydw4 T08+s/HxfoMosPKmeejpDxpMJTFNFJvgjCIsriC8OofKbB1ttv6dZZ/oBIhKoR2rZIMn 7i0vh8E1VInANzps2ePoWuFdCsZMZ7F5CNfz+uU93d5HpZyyfePqFpacLQza0PD+iZVe 4s3w== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUA0Hlw263Pzi+mI5sqJyIK0uDLvgsIJcxLpdbxAqzjzPaGMgvBLJ9yE5tgOhs9+PKgLz5RHKE=@isar-build.org X-Gm-Message-State: AOJu0YzemsoC9XCyfur7+lI6M/ei+umk6ODm0elejWITLzlgxkAlvKIB Wd+XVLI9161fsbT6Y0uaqCv2ouEWDPkhfNdPsSBm2mApDLdsuiSsXrjE X-Received: by 2002:a05:600c:4e12:b0:480:39ad:3b7c with SMTP id 5b1f17b1804b1-483a962e465mr381359335e9.16.1772123178966; Thu, 26 Feb 2026 08:26:18 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="AV1CL+HlL+77zU7h5Kzi/TfclVTqh95w+oShiO0BrKKQ75LxhQ==" Received: by 2002:a05:6000:2512:b0:42b:52c4:6656 with SMTP id ffacd0b85a97d-439903efef7ls1420775f8f.2.-pod-prod-03-eu; Thu, 26 Feb 2026 08:26:17 -0800 (PST) X-Received: by 2002:a05:6000:26c3:b0:437:6d8c:c08a with SMTP id ffacd0b85a97d-4396f19e6c8mr37791141f8f.45.1772123176716; Thu, 26 Feb 2026 08:26:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772123176; cv=none; d=google.com; s=arc-20240605; b=FcJIYOBSXU0XXFrj2r1Uy8sJVAYtSdLFJhqlVTqd2AKOo7bfs0wMuJ3xs+GUX0GKeg xSH09obxlxv7uNm6ItfmEvLYvYkM+xHd7KpTE7pyIONaAEnMKtxALp88OB7Jka9ALWYa VtuBEgymCWs1kO8pRC1V5/m4F5MGsmImmhktC+YaZPm5dyZx10Ye/6aFIa/A0DLv1jWp 8YmmiWwTtG1ayKzYp8UAEbXcnCuJyxhRwRXBY2imeQ0+08b+eTq/8KpNu7XFNmMoDDA3 I5ZsjarIScCauRIHsYdbMmdzzGyONbLRaCLlIxaXN1Z5dIP7PS4E4e2n179vWvOCPFby 4FHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=GbsjJ4rouDYtjKko6J1//2I0e7+rr5FosOcvO15aJq4=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=MhIguJW3EDh6uwjweOT7w9rDajNsqsUXzFWZUv5SwC2aW1RCOL3cWWjfTAKhTbz03b YbsBg9FELqFqRt7b/cCb1lPMEf3pthjCd+6YtKa29fm4FITndrcj6YsgoD9FCDNehlAx L3stCJUff2kxQ/ZJdEd6S4lGpd0SMSZ8U0wxPa6LKSjHNCHbWLaxOECthFLM/RYWillB fRy+6CIhAndoh+XHORWL0Jr8p2Ba0j4kPzfWX6kkh8din0Gqfj6RdHh9vM8JUbuu8aZ6 ccJ/9mX3NWPP0rxK4ccCMFtaOIOMc/w78Oa9UBgYuAXHAvlyI7lb+01ZRfY+mDF4r+QH 9n6g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-4399c75cc55si4602f8f.4.2026.02.26.08.26.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Feb 2026 08:26:16 -0800 (PST) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from localhost.localdomain (dslb-088-074-195-234.088.074.pools.vodafone-ip.de [88.74.195.234]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPA id 61QGQEXX008973 for ; Thu, 26 Feb 2026 17:26:15 +0100 From: Zhihang Wei To: isar-users@googlegroups.com Subject: [PATCH v7 3/3] meta: Deploy image build artifacts into distro- and image-specific subdirs Date: Thu, 26 Feb 2026 17:26:13 +0100 Message-Id: <20260226162613.1954014-4-wzh@ilbers.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260226162613.1954014-1-wzh@ilbers.de> References: <20260226162613.1954014-1-wzh@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS 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-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Ilia Skochilov When building different distros or images for the same machine (e.g. phyboard-mira-bullseye and phyboard-mira-bookworm, or isar-image-ci and isar-image-base), artifacts with identical names (e.g. DTB files) may be deployed to the same location, resulting file conflicts and build failures. Deploy image build artifacts into a subdirectory named ${DISTRO}-${IMAGE_PN} to avoid such collisions. Since the directory now encodes the distro and image name, remove the ${DISTRO} and ${IMAGE_PN} prefixes from artifact filenames to keep the names short and clear. Fixes test_dtb_deploy_distros testcase: ERROR: mc:phyboard-mira-bookworm:isar-image-base-1.0-r0 do_copy_boot_files: The recipe isar-image-base is trying to install files into a shared area when those files already exist. Those files and their manifest location are: NOTE: recipe isar-image-base-1.0-r0: task do_copy_boot_files: Failed build/tmp/deploy/images/phyboard-mira/imx6q-phytec-mira-rdk-nand.dtb (not matched to any task) Please verify which recipe should provide the above files. Signed-off-by: Ilia Skochilov Signed-off-by: Uladzimir Bely Signed-off-by: Badrikesh Prusty Signed-off-by: Anton Mikanovich Signed-off-by: Zhihang Wei --- RECIPE-API-CHANGELOG.md | 63 +++++++++++++++++++ .../installer-add-rootfs.bbclass | 9 +-- meta/classes-recipe/image.bbclass | 11 ++-- .../imagetypes_container.bbclass | 2 +- meta/conf/bitbake.conf | 3 +- .../plugins/source/isoimage-isohybrid-isar.py | 2 +- testsuite/cibase.py | 2 +- testsuite/citest.py | 7 ++- testsuite/start_vm.py | 2 +- 9 files changed, 84 insertions(+), 17 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 0bad8a44..bc7abb37 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -962,3 +962,66 @@ INSTALLER_UNATTENDED_ABORT_ENABLE = "1" # Optional: set countdown timeout in seconds (default 5) INSTALLER_UNATTENDED_ABORT_TIMEOUT = "5" ``` + +### Change DEPLOY_DIR_IMAGE path and artifacts naming + +Change DEPLOY_DIR_IMAGE from ${DEPLOY_DIR}/images/${MACHINE} to +${DEPLOY_DIR}/images/${MACHINE}/${DISTRO}-${IMAGE_PN}. + +When building different distros with the same machine the following +error occurs: + +do_copy_boot_files: The recipe isar-image-base is trying to install +files into a shared area when those files already exists. It happens +when some files have the same names (e.g., dtb files) for different +distros. + +To prevent such collisions, image artifacts are now deployed into a +distro- and image-specific subdirectory. + +Additionally, artifact filenames have been shortened by removing the +${DISTRO} and ${IMAGE_PN} prefix, since this information is now +encoded in the directory path. + +Example 1: Build isar-image-base (phyboard-mira, debian-bookworm) +Under "build/tmp/deploy/images/": +Before: +phyboard-mira/imx6q-phytec-mira-rdk-nand.dtb +phyboard-mira/isar-image-base-debian-bookworm-phyboard-mira-initrd.img +phyboard-mira/isar-image-base-debian-bookworm-phyboard-mira-vmlinuz +phyboard-mira/isar-image-base-debian-bookworm-phyboard-mira.dpkg_status +phyboard-mira/isar-image-base-debian-bookworm-phyboard-mira.ubi + +After: +phyboard-mira/debian-bookworm-isar-image-base/imx6q-phytec-mira-rdk-nand.dtb +phyboard-mira/debian-bookworm-isar-image-base/initrd.img +phyboard-mira/debian-bookworm-isar-image-base/vmlinuz +phyboard-mira/debian-bookworm-isar-image-base/phyboard-mira.dpkg_status +phyboard-mira/debian-bookworm-isar-image-base/phyboard-mira.ubi + +Example 2: Build isar-image-ci (qemuamd64, debian-bookworm) +Under "build/tmp/deploy/images/": +Before: +qemuamd64/isar-image-ci-debian-bookworm-qemuamd64-initrd.img +qemuamd64/isar-image-ci-debian-bookworm-qemuamd64-vmlinuz +qemuamd64/isar-image-ci-debian-bookworm-qemuamd64.dpkg_status +qemuamd64/isar-image-ci-debian-bookworm-qemuamd64.manifest +qemuamd64/isar-image-ci-debian-bookworm-qemuamd64.wic +qemuamd64/isar-image-ci-debian-bookworm-qemuamd64.wic.bmap +qemuamd64/isar-image-ci-debian-bookworm-qemuamd64.wic.manifest + +After: +qemuamd64/debian-bookworm-isar-image-ci/initrd.img +qemuamd64/debian-bookworm-isar-image-ci/vmlinuz +qemuamd64/debian-bookworm-isar-image-ci/qemuamd64.dpkg_status +qemuamd64/debian-bookworm-isar-image-ci/qemuamd64.manifest +qemuamd64/debian-bookworm-isar-image-ci/qemuamd64.wic +qemuamd64/debian-bookworm-isar-image-ci/qemuamd64.wic.bmap +qemuamd64/debian-bookworm-isar-image-ci/qemuamd64.wic.manifest + +Artifacts that do not belong to a full image (e.g. isar-image-base, +isar-image-ci) remain unchanged. For example, a customized initramfs +built independently is not affected. + +This change affects the location and naming of build artifacts and must +be taken into account by downstream users. diff --git a/meta-isar/classes-recipe/installer-add-rootfs.bbclass b/meta-isar/classes-recipe/installer-add-rootfs.bbclass index 2fa551bd..edf93016 100644 --- a/meta-isar/classes-recipe/installer-add-rootfs.bbclass +++ b/meta-isar/classes-recipe/installer-add-rootfs.bbclass @@ -13,9 +13,10 @@ INSTALLER_TARGET_IMAGES ??= "${INSTALLER_TARGET_IMAGE}" INSTALLER_TARGET_MC ??= "installer-target" INSTALLER_TARGET_DISTRO ??= "${DISTRO}" INSTALLER_TARGET_MACHINE ??= "${MACHINE}" -INSTALLER_TARGET_DEPLOY_DIR_IMAGE ??= "${DEPLOY_DIR}/images/${INSTALLER_TARGET_MACHINE}" +INSTALLER_TARGET_IMAGE ??= "${IMAGE_PN}" +INSTALLER_TARGET_DEPLOY_DIR_IMAGE ??= "${DEPLOY_DIR}/images/${INSTALLER_TARGET_MACHINE}/${INSTALLER_TARGET_DISTRO}-${INSTALLER_TARGET_IMAGE}" -IMAGE_DATA_FILE ??= "${INSTALLER_TARGET_IMAGE}-${INSTALLER_TARGET_DISTRO}-${INSTALLER_TARGET_MACHINE}" +IMAGE_DATA_FILE ??= "${INSTALLER_TARGET_MACHINE}" IMAGE_DATA_POSTFIX ??= "wic.zst" IMAGE_DATA_POSTFIX:buster ??= "wic.xz" IMAGE_DATA_POSTFIX:bullseye ??= "wic.xz" @@ -29,7 +30,7 @@ def get_installer_sources(d, suffix): target_machine = d.getVar('INSTALLER_TARGET_MACHINE') sources = [] for image in installer_target_images: - image_data = f"{image}-{target_distro}-{target_machine}" + image_data = f"{target_machine}" sources.append(f"{target_deploy_dir}/{image_data}.{suffix}") return sources @@ -41,7 +42,7 @@ def get_installer_destinations(d, suffix): target_machine = d.getVar('INSTALLER_TARGET_MACHINE') dests = [] for image in installer_target_images: - image_data = f"{image}-{target_distro}-{target_machine}" + image_data = f"{target_machine}" dests.append(f"/install/{image_data}.{suffix}") return dests diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index afe6906e..d4f9e2c0 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -18,8 +18,9 @@ IMAGE_ROOTFS ?= "${WORKDIR}/rootfs" KERNEL_IMAGE_PKG ??= "${@ ("linux-image-" + d.getVar("KERNEL_NAME")) if d.getVar("KERNEL_NAME") else ""}" IMAGE_INSTALL += "${KERNEL_IMAGE_PKG}" -# Name of the image including distro&machine names -IMAGE_FULLNAME = "${PN}-${DISTRO}-${MACHINE}" +# Name the image as the machine name only, since the path includes distro name now +IMAGE_FULLNAME = "${MACHINE}" +IMAGE_PN = "${PN}" # Deprecated; this would be set to e.g. "${INITRAMFS_RECIPE}-${DISTRO}-${MACHINE}-initrd.img" INITRD_IMAGE ?= "" @@ -29,7 +30,7 @@ INITRD_IMAGE ?= "" IMAGE_INITRD ?= "" # Name of the deployed initrd image -INITRD_DEPLOY_FILE = "${@ d.getVar('IMAGE_INITRD') or '${PN}' }-${DISTRO}-${MACHINE}-initrd.img" +INITRD_DEPLOY_FILE = "initrd.img" # Make sure dependent initramfs recipe is built do_image[depends] += "${@ '${IMAGE_INITRD}:do_build' if '${IMAGE_INITRD}' else '' }" @@ -52,7 +53,7 @@ python() { ROOTFS_FEATURES += "${@ 'generate-initrd' if (d.getVar('INITRD_IMAGE') == '' and d.getVar('IMAGE_INITRD') == '') else ''}" # This variable is used by wic and start_vm -KERNEL_IMAGE ?= "${IMAGE_FULLNAME}-${KERNEL_FILE}" +KERNEL_IMAGE ?= "${KERNEL_FILE}" # This defines the deployed dtbs for reuse by imagers DTB_FILES ?= "" @@ -108,7 +109,7 @@ ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${@isar_multiarch_packages('IMAGE_INSTAL ROOTFS_VARDEPS += "IMAGE_INSTALL" ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" -ROOTFS_PACKAGE_SUFFIX ?= "${PN}-${DISTRO}-${MACHINE}" +ROOTFS_PACKAGE_SUFFIX ?= "${MACHINE}" CACHE_DEB_SRC = "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-deb-src', '1', '0', d)}" python () { diff --git a/meta/classes-recipe/imagetypes_container.bbclass b/meta/classes-recipe/imagetypes_container.bbclass index ea15decf..1c5386a8 100644 --- a/meta/classes-recipe/imagetypes_container.bbclass +++ b/meta/classes-recipe/imagetypes_container.bbclass @@ -9,7 +9,7 @@ CONTAINER_TYPES = "oci-archive docker-archive docker-daemon containers-storage" USING_CONTAINER = "${@bb.utils.contains_any('IMAGE_BASETYPES', d.getVar('CONTAINER_TYPES').split(), '1', '0', d)}" -CONTAINER_IMAGE_NAME ?= "${PN}-${DISTRO}-${DISTRO_ARCH}" +CONTAINER_IMAGE_NAME ?= "container-${DISTRO_ARCH}" CONTAINER_IMAGE_TAG ?= "${PV}-${PR}" CONTAINER_IMAGE_CMD ?= "/bin/dash" CONTAINER_IMAGE_ENTRYPOINT ?= "" diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 0f84e715..7c544e5d 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -57,7 +57,8 @@ WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}/${PV}-${PR}" GIT_DL_LINK_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}" DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap" DEPLOY_DIR_SDKCHROOT = "${DEPLOY_DIR}/sdkchroot" -DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}" +IMAGE_PN ?= "" +DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}${@('/%s-%s' % (d.getVar('DISTRO'), d.getVar('IMAGE_PN'))) if d.getVar('IMAGE_PN') != '' else ''}" DL_DIR ?= "${TOPDIR}/downloads" SSTATE_DIR ?= "${TOPDIR}/sstate-cache" SSTATE_MANIFESTS = "${TMPDIR}/sstate-control/${DISTRO}-${DISTRO_ARCH}" diff --git a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py index 0ed61fff..eaef9c79 100644 --- a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py +++ b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py @@ -196,7 +196,7 @@ class IsoImagePlugin(SourcePlugin): raise WicError("Couldn't find MACHINE, exiting.") pattern = '%s/%s*%s.%s' % (initrd_dir, image_name, machine, image_type) - pattern = '%s/%s-%s-initrd.%s' % (initrd_dir, image_name, machine, image_type) + pattern = '%s/initrd.%s' % (initrd_dir, image_type) files = glob.glob(pattern) if files: initrd = files[0] diff --git a/testsuite/cibase.py b/testsuite/cibase.py index fd6a3df9..fac2ab75 100755 --- a/testsuite/cibase.py +++ b/testsuite/cibase.py @@ -44,7 +44,7 @@ class CIBaseTest(CIBuilder): self.configure(wic_deploy_parts=wic_deploy_parts, **kwargs) self.bitbake(targets, **kwargs) - wic_path = f"{self.build_dir}/tmp/deploy/images/*/*.wic.p1" + wic_path = f"{self.build_dir}/tmp/deploy/images/*/*/*.wic.p1" partition_files = set(glob.glob(wic_path)) if wic_deploy_parts and len(partition_files) == 0: self.fail("Found raw wic partitions in DEPLOY_DIR") diff --git a/testsuite/citest.py b/testsuite/citest.py index ca701422..f36da786 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -496,8 +496,9 @@ class InitRdBaseTest(CIBaseTest): super().init() self.deploy_dir = os.path.join(self.build_dir, 'tmp', 'deploy') - def deploy_dir_image(self, machine): - return os.path.join(self.deploy_dir, 'images', machine) + def deploy_dir_image(self, mc, image): + multiconfig = f"{mc}:{image}" + return CIUtils.getVars('DEPLOY_DIR_IMAGE', target=multiconfig) def dracut_in_image(self, targets): machine = 'qemuamd64' @@ -526,7 +527,7 @@ class InitRdBaseTest(CIBaseTest): bb_should_fail=False): mc = f'mc:{machine}-{distro.removeprefix("debian-")}' initrd_image = f'{initrd}-{distro}-{machine}-initrd.img' - initrd_path = os.path.join(self.deploy_dir_image(machine), initrd_image) + initrd_path = os.path.join(self.deploy_dir_image(mc, initrd), initrd_image) # cleansstate if the initrd image was already built/deployed to verify # that a new build does result in the image being deployed diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py index 57d169df..a37ffe82 100755 --- a/testsuite/start_vm.py +++ b/testsuite/start_vm.py @@ -50,7 +50,7 @@ def format_qemu_cmdline( image_type = image_fstypes.split()[0] base = 'ubuntu' if distro in ['jammy', 'focal', 'noble'] else 'debian' - rootfs_image = f"{image}-{base}-{distro}-qemu{arch}.{image_type}" + rootfs_image = f"qemu{arch}.{image_type}" if image_type == 'ext4': kernel_image = deploy_dir_image + '/' + kernel_image