From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 29 Apr 2026 17:38:41 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f57.google.com (mail-wm1-f57.google.com [209.85.128.57]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 63TFceVq018756 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 29 Apr 2026 17:38:40 +0200 Received: by mail-wm1-f57.google.com with SMTP id 5b1f17b1804b1-488d9e1e61asf109239995e9.0 for ; Wed, 29 Apr 2026 08:38:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1777477114; cv=pass; d=google.com; s=arc-20240605; b=EzGNdEJpeQ9G5KHrCiTPz8wpoDkYEnNPfPD+7BCep3FrDItIBKLOoRfgOZujiI/qgM +KRVteXVCTUwGtiAksU/zH3CYiKWNSpvNgwxDHNX2FPEFl+I3hPNwVJ6DJOYts5NuudE 9WB2/8vBg4T3NRaP5yKB3oTcMR3tRbmRk2Z0PRubfQw1VxcwzgbTZZMJZhtN/0F1xmA+ oxAu0TOPOWd8ejGaJgD92PGCPk65dVY899N0MMJbtpald56jVWSBONTsambWHNyHSYKz +MMkqrw0NkYYmrZ+RpPtXNawpH7KJkTB/97HEHG0wQQLOX81T7LF8fe6Z6ywA+nsRfLg rR5Q== 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:cc:to:from:sender:dkim-signature; bh=XNJMjHI1yItocEtIM0HC1WGuaJdgWAjtPZ4pMlI0q4M=; fh=kgleT1loteHmJiT5DndFD7H5fPyKL+Sj4vNaCAUN0SQ=; b=S2r4yR8klWUGhEUcXFE9NzWPJ8n1gsgtzyF3YY4UxzRGtlnyU+bohGik2B3kPK8mJw rDBQGl39EdR8fbFg73I+N9IvfWz3dZqKT3H9ajgEU2xCkj/0G7QCJSPI9oUjLgyOspuO dQccXiUuy7v1Rg13D0FyQfsEfYdFiVg2ZZRHLSe0oPSGdcbX/4GMRQgnunHGiacb/fig GhI5lAY/ypLlAhEhd4krwFphnQnD7XBvbDdxSzegE9O12hQIf1WZIroIZXX9hiWsGCAb 2q3kEMTnuWzFWHjxFgdcUxC3T6AwdRWvQVPc7Z+XOkwYxBrXepjGRlgDIPa8aZ+0PQ0h 8F4Q==; darn=ilbers.de 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=20251104; t=1777477114; x=1778081914; darn=ilbers.de; 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:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=XNJMjHI1yItocEtIM0HC1WGuaJdgWAjtPZ4pMlI0q4M=; b=YF+orh7GLsk1VpGjZYHwUGSVMgEpwu5ANT5lhA0xu2ZLvjWaAqQUP3IeZeRINYakHu w9OihiuqZDIiZNiY4GZoCMoyXuYWfVzLydSpbYtpvcHh8ad7/EsNlp2Ok981w3jGmyh4 yhOQuUCBfka2M6EbWlsKqDZhjzhsyd+OD48foWCzM+0AEFU7rygmOIvdt4la+/YWjW3e XMVDh0tCCyXf0b529DpPHr0RYK0RwAEANABhCXbPM1MebFNkVeErHZChcl+VXg8jhytm NiWIpZjpx9hU+KVGegpBFVVQoFwqkdZTyMQz7SJO+tnER6y57RKdHIlD/i9RaRibW+Aw lo+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777477114; x=1778081914; 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:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=XNJMjHI1yItocEtIM0HC1WGuaJdgWAjtPZ4pMlI0q4M=; b=FgURAxmIQ6OhgTbujRL3Nw+UdT0rE/skXNbbNE9w2NQCGdQsFruWD3jCCe8AZhHYHz KPdxe7v3/SlpVKUNdW/dF9W5jRVs+PvTSZNCn16v4KFLcz+BL/HJ1UoOpaDvTe6fLNNk MgFxssMiaVlkjlvgBXXT2y/R3USQCPLnVAYif/vOEfPAS56esy2zQjegRHWIUD/DEpl8 rPWuPT2HESGYW6eGngfgNID0NTujS5KZWbUVWO38o+Q9fgXwyCAC+hu7ioOPHNmCYkbD 2A6+3rj3aw8Yn55ljOFN2k5jg+SJUmvXAHoSUdpgr56rpcwIcYKnbOwKMYtlBwERjQ5q lmuQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AFNElJ9lGdYMkzNL6Q75eMThjDOn2oaMQPSbNA2o3oieg9Ogi400wspBgh1h5PRYAc8JAYCN/C/q@ilbers.de X-Gm-Message-State: AOJu0Ywz1pCT6/W7yUvcXChVAs5wmssl92eSmSKbe+CFik5s5NSw0iM0 EqYrKZBZ1Bxkir3JAqD0aeRJ+mcFRHiNhPLWFUihjzPSMCKgFi+IRpbV X-Received: by 2002:a05:600c:3411:b0:489:1ff5:edda with SMTP id 5b1f17b1804b1-48a7b83efe0mr41597085e9.6.1777477113910; Wed, 29 Apr 2026 08:38:33 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AUV6zMOkgRxEwyK+956+FxNOvZdkZSGBTIKKYYdh+k+XIGmL6Q==" Received: by 2002:a05:6000:2982:20b0:43e:aa64:9a2b with SMTP id ffacd0b85a97d-43eb1c71e0els7125941f8f.2.-pod-prod-09-eu; Wed, 29 Apr 2026 08:38:31 -0700 (PDT) X-Received: by 2002:a05:6000:2c03:b0:441:360a:9438 with SMTP id ffacd0b85a97d-44790473b3fmr7538126f8f.25.1777477111461; Wed, 29 Apr 2026 08:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777477111; cv=none; d=google.com; s=arc-20240605; b=YcIM6DFVEodxVoKGvq1Uf8ECXHj1SC8yWlb5dRime8oJ61mGnnJKEFATjztCD3DpHC 0WtxEt5VDXvBKKfLQGlB6hXIR3Ht/U4Nfodb+vqP6Xg3ihVzIWzJLQtp+OBsAc89Ey9i TyKXZcEeiwBUaCmrTriNDmsGCaRKmEIk/D42PXepNuvzhIRd/KEa6BTnNY1NTBe+39dZ 0v8zRW2zAtPZ9SjtjJMDfxB4JbO1QjAT8g/ilkkU7/bKpxH6SSZs27V6P6sxDikqqDzb a1Wzxw1vz7lCPVGeXypPfzIjhGN9VDVlYGOfmdvFFgwZ/BHOQkUZtkvDlkv3GMYkpEYz hpPg== 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:cc:to:from; bh=S6Gi/Tj5FoeXI8wVfrFo+QyE7jjE1so2V+V3KAfiy8M=; fh=SviDX/E5C+CNuLG4aYddj0ECCwgb1wEYINL+8UO5M6M=; b=M6G6d52fsFnaNX8oh8XvYLxP8zInMh65aCQ3pIyCE1UZzDCKoYHYvKH1OY7vmlvlFe HEDu4qHl3lui0j579qIkhOyxf6cLarLCX6WRd5wFMTMPoDrPGmyG+/Yyx42fNCgO2ACo Ye5LP20L+/UTFI9YvdV9iaP31JrMPGLklJXF3Pshwn5I/4YYKVjc5HWEHQ2PYSeM0os9 /OWNbosMbO16SCp03+K62w6CSzS7uGhxI3ewkVEoh2meB0220Otx1ZufX20/CBklEZWt gpZAWNSp4OFyoVXx5MEabHjL7ElKYa/yuj5MEL+WF6SatFpPZakPdPLeb8io11iFvwb7 xXWw==; 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-447b5ee6894si42860f8f.5.2026.04.29.08.38.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Apr 2026 08:38:31 -0700 (PDT) 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 debian-zwei.m.ilbers.de ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPA id 63TFcUGd018721; Wed, 29 Apr 2026 17:38:30 +0200 From: Zhihang Wei To: isar-users@googlegroups.com Cc: amikan@ilbers.de Subject: [PATCH v10 2/2] meta: Move kernel artifacts deployment from image recipe Date: Wed, 29 Apr 2026 17:38:29 +0200 Message-Id: <20260429153829.2668049-3-wzh@ilbers.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260429153829.2668049-1-wzh@ilbers.de> References: <20260429153829.2668049-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_DNSWL_BLOCKED,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 Content-Type: text/plain; charset="UTF-8" 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-TUID: XbkGB2xNCGVJ From: Anton Mikanovich Task do_copy_boot_files deploys DTB files into the same location for different images (e.g., isar-image-base and isar-image-ci). This causes a build error. do_copy_boot_files is called once for every image recipe while dtb files belong to the kernel which is the same for both images. Performing dtb deployment once for the same kernel solves the issue. Introduce `kernel-deploy` recipe responsible for extracting the DTBs and kernel from the linux-image package and deploying them. The kernel package is now installed into sbuild chroot. This is achieved via the respective dependency of `kernel-deploy` recipe. Fixes test_dtb_deploy_images 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: 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: Anton Mikanovich --- RECIPE-API-CHANGELOG.md | 12 +++++ meta/classes-recipe/image.bbclass | 39 +++++--------- .../kernel-deploy/kernel-deploy.bb | 53 +++++++++++++++++++ 3 files changed, 77 insertions(+), 27 deletions(-) create mode 100644 meta/recipes-kernel/kernel-deploy/kernel-deploy.bb diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 5723c4c3..2cecd03b 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -1082,3 +1082,15 @@ To prevent this new path is separated also by distro and kernel values. This change will influence on build artifacts location and should be taken into account by downstreams. + +### Move kernel and DTBs deployment from image recipe to kernel related one + +To prevent parallel conflicting artifacts deployment from the same kernel +used by different images, move do_copy_boot_files() task logic from the image +recipe to the separate one, which is once-per-kernel. With this aproach the +deployment of any kernel artifacts will be performed only once per kernel. + +To left previous kernel image path per-image symlinks are now used. + +This deployment is implemented as separated recipe to be compatible both with +custom and distro kernel types. diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index 26a4ec06..a86ee443 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -1,5 +1,7 @@ # This software is a part of Isar. -# Copyright (C) 2015-2017 ilbers GmbH +# Copyright (C) 2015-2026 ilbers GmbH +# +# SPDX-License-Identifier: MIT # Make workdir and stamps machine-specific without changing common PN target WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/${PV}-${PR}" @@ -9,7 +11,6 @@ STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/*-*" # Sstate also needs to be machine-specific SSTATE_MANIFESTS = "${TMPDIR}/sstate-control/${MACHINE}-${DISTRO}-${DISTRO_ARCH}" -SSTATETASKS += "do_copy_boot_files" IMAGE_INSTALL ?= "" IMAGE_FSTYPES ?= "ext4" @@ -381,37 +382,21 @@ INITRD_IMG = "${PP_DEPLOY}/${INITRD_DEPLOY_FILE}" # only one dtb file supported, pick the first DTB_IMG = "${PP_DEPLOY}/${@(d.getVar('DTB_FILES').split() or [''])[0]}" -do_copy_boot_files[cleandirs] += "${DEPLOYDIR}" -do_copy_boot_files[sstate-inputdirs] = "${DEPLOYDIR}" -do_copy_boot_files[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" -do_copy_boot_files[network] = "${TASK_USE_SUDO}" +python() { + if d.getVar('DTB_FILES'): + d.appendVarFlag("do_copy_boot_files", "depends", "kernel-deploy-${KERNEL_NAME}:do_deploy") +} + +# Associate kernel with image by symlinks +do_copy_boot_files[dirs] += "${DEPLOY_DIR_IMAGE}" do_copy_boot_files() { - kernel="$(realpath -q '${IMAGE_ROOTFS}'/vmlinu[xz])" - if [ ! -f "$kernel" ]; then - kernel="$(realpath -q '${IMAGE_ROOTFS}'/boot/vmlinu[xz])" - fi + kernel="$(realpath -q '${DEPLOY_DIR_IMAGE}/${KERNEL_NAME}'-vmlinu[xz]*)" if [ -f "$kernel" ]; then - sudo cat "$kernel" > "${DEPLOYDIR}/${KERNEL_IMAGE}" + ln -sfr "$kernel" "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}" fi - - for file in ${DTB_FILES}; do - dtb="$(find '${IMAGE_ROOTFS}/usr/lib' -type f \ - -iwholename '*linux-image-*/'${file} | head -1)" - - if [ -z "$dtb" -o ! -e "$dtb" ]; then - die "${file} not found" - fi - - cp -f "$dtb" "${DEPLOYDIR}/" - done } addtask copy_boot_files before do_rootfs_postprocess after do_rootfs_install -python do_copy_boot_files_setscene () { - sstate_setscene(d) -} -addtask do_copy_boot_files_setscene - python do_image_tools() { """Virtual task""" pass diff --git a/meta/recipes-kernel/kernel-deploy/kernel-deploy.bb b/meta/recipes-kernel/kernel-deploy/kernel-deploy.bb new file mode 100644 index 00000000..32521148 --- /dev/null +++ b/meta/recipes-kernel/kernel-deploy/kernel-deploy.bb @@ -0,0 +1,53 @@ +# This software is a part of Isar. +# Copyright (C) ilbers GmbH, 2026 +# +# SPDX-License-Identifier: MIT + +inherit dpkg-raw + +MAINTAINER = "isar-users " + +PN:append = "-${KERNEL_NAME}" + +KERNEL_IMAGE_PKG ??= "${@ ("linux-image-" + d.getVar("KERNEL_NAME")) if d.getVar("KERNEL_NAME") else ""}" + +DEPENDS = "${KERNEL_IMAGE_PKG}" +DEBIAN_BUILD_DEPENDS = "${KERNEL_IMAGE_PKG}" + +DPKG_ARCH = "${PACKAGE_ARCH}" + +do_prepare_build:append() { + dir=debian/${PN}/boot + cat <> ${S}/debian/rules + mkdir -p ${dir} + realpath -q /boot/vmlinu[xz] + kernel="\$\$(realpath -q /vmlinu[xz])" && \ + if [ ! -f "\$\${kernel}" ]; then kernel="\$\$(realpath -q /boot/vmlinu[xz])"; fi && \ + if [ -f "\$\${kernel}" ]; then cp "\$\${kernel}" "${dir}/${KERNEL_NAME}-\$\$(basename \$\${kernel})"; fi +EOF + + for dtb in ${DTB_FILES}; do + dir=debian/${PN}/usr/lib/${PN}/$(dirname ${dtb}) + cat <> ${S}/debian/rules + mkdir -p ${dir} + find /usr/lib/linux-image* -path "*${dtb}" -print -exec cp {} ${dir} \; +EOF + done +} + +DTB_PACKAGE ??= "${PN}_${CHANGELOG_V}_${DISTRO_ARCH}.deb" + +do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}" +do_deploy[cleandirs] = "${WORKDIR}/deploy" +do_deploy() { + dpkg --fsys-tarfile ${WORKDIR}/${DTB_PACKAGE} | \ + tar --wildcards --extract --directory ${WORKDIR}/deploy ./boot ./usr/lib/${PN} + find ${WORKDIR}/deploy/boot -path "*vmlinu*" -print \ + -exec cp {} ${DEPLOY_DIR_IMAGE}/ \; + for dtb in ${DTB_FILES}; do + mkdir -p ${DEPLOY_DIR_IMAGE}/$(dirname ${dtb}) + find ${WORKDIR}/deploy/usr/lib/${PN} -path "*${dtb}" -print \ + -exec cp {} ${DEPLOY_DIR_IMAGE}/${dtb} \; + done +} +addtask deploy before do_deploy_deb after do_dpkg_build -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260429153829.2668049-3-wzh%40ilbers.de.