From patchwork Fri Feb 13 07:40:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 4856 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 13 Feb 2026 08:41:04 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f58.google.com (mail-wm1-f58.google.com [209.85.128.58]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 61D7f3t7026962 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 13 Feb 2026 08:41:03 +0100 Received: by mail-wm1-f58.google.com with SMTP id 5b1f17b1804b1-48336b182ebsf6034225e9.3 for ; Thu, 12 Feb 2026 23:41:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1770968458; cv=pass; d=google.com; s=arc-20240605; b=MlYf4WKbSF51lAc1MpKzaYz+9oIk1pI1xnCxa3utYvbIRwpGrs3cxgZH1jfgt92j5/ wo/WugwwRMdoawioSRy0nqPAG2Lc+o6vAH7ybCk9jw8tQAxV/wpU0+UCaeA97gpNNW0O 5kWAcZRcasWFwuHHYq4fe5E6EN56USpErk/FHbagv7bmZPJr8iVxUjuniaLtTgNwPTgv DGoB6YE4vsYPFFsSrMu6gJrq2BNfjEw/sLTyk134Gu287cWkwYkmkIECMvB5XDzpEfI5 6HCZiMJREiGPLvGa0H80m4wU/BAk0R6zihTTw90eBXmSbbumX0I+nDoWaHOSoWnoPmwF rScw== 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=rf6tuhR/C8noOBGtiJWJSqtCy1MJr7ClAKU1/3tTK7s=; fh=mm7CgvtS0IcLDYTl6y8Kb1OcZCZPZAT9O+qJ8y34H1E=; b=ErVztumVIVWgGD8VLP7bx2E4Z6YGYWlnqAbu398pN9yOuRWgrGpfu1XrrAdAoOYa1O 06N2c5djFflxOQlkNmxVi1Nc+e64obVODPx9MWnxz3Ra+uCGULMMfq0SR7J5MOqCVNDb o7M/XNkZOqUtxlLLVaXhgsNMHnUaXtOD/Xp9GrUzFURjQ2TbdeusDvi1HkWQB43qpvFe S0quIw6UIZtE8l6Rojk87Ccwn9kEn05DSjeAvC7cqBKJRiYUHgE0bljAhMF7EjqL/kOT q+2ruj4Nasamk2DhYBta/4SFv16E1+vNEVSqstMM9TIkyrw6kQxetpUzUCYS8xmBsCd7 p1TA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1770968458; x=1771573258; 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:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=rf6tuhR/C8noOBGtiJWJSqtCy1MJr7ClAKU1/3tTK7s=; b=xZPOB3qedpL1li0E0qVNBhFpIwboNqG0ruWV9um6QGBEZtD9nxbS7rFcZtVTV2AzBM 8h4/6KfroDmf6hUpeCffkwkIcsJMthZJCmoRwiNK0A9gYQEhOedvMIuJORNpiRM6WAm5 elTWAV0e/Uoo3xFMgRaKZeTRBBsCRxzSpMQ+D4G678LE8hWEKMCGas2vU821ThR7rSJB 9hygLbsaoAIjiYx1E7++peiHg/LCYxxM0oXjIyl9xfaqNDD63V7tt/apuBnG/ldbNmLf l4S38qzjU9azU762vvoOSUJ9ZGE0Ge9K8+8VKw6Q7R/xYAoabc61N29I1lhS2fTkldNU hrCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770968458; x=1771573258; 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=rf6tuhR/C8noOBGtiJWJSqtCy1MJr7ClAKU1/3tTK7s=; b=gFZfCLveOVOyrx8yjcpePo1bPmWOMazzKccbKYYNhXvEdkVA50u/kk9IxTGEx1uW9R 2iN7wjxaOb+oTiLxNx/wFvSq10+50jh3NaOhL5nAvPubuT1BKo25rHTgsV/9r5i0UV5J aqXyvS5sjrbs9wRZlFZ821cnHoiybXK5Sczk+Y5+YqWmir3WOjZ0smyoQattcO/hHA5/ 30iwWhbwT22VW4v3Gxj5rfZX4d0YWJSDG1utty1YSU76vW2YyHDpfWnb+3lIgttUiv7d 9MUSa+R2QpsKpOm6aF9m8cB2rjx48b+G70s2pG9vegzD6j50Wy9LJVLu5Kx0PgbIvWaC l66w== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCULPzxm3IvJgAwfdIek01eAbzdXH38ovpEj5FAZDykwH6ptU9lI2hpK6Y52/2S6HVDV8oacqdU=@isar-build.org X-Gm-Message-State: AOJu0YzeW3d/FpcQoWFYNKamn+ClX0Pycdxci5ybfrmH+ItQGX8Tk4ks HR8cJgSK/Z5wgKoWfRvWxwh3qQ+U0uVAfxJgV9OWOOsgu8Yjq4nRpPIq X-Received: by 2002:a05:600c:3145:b0:471:13dd:bae7 with SMTP id 5b1f17b1804b1-48373a74362mr12220435e9.30.1770968457463; Thu, 12 Feb 2026 23:40:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="AV1CL+FUd993KhApc2F9hvDm5TUSTZalrVA9LqA3Lab3++RPNA==" Received: by 2002:a05:600c:1d1e:b0:480:6c57:d5d8 with SMTP id 5b1f17b1804b1-48367063dbbls8126145e9.0.-pod-prod-09-eu; Thu, 12 Feb 2026 23:40:55 -0800 (PST) X-Received: by 2002:a05:600c:82c3:b0:483:71f7:2794 with SMTP id 5b1f17b1804b1-48373a25cffmr11098215e9.15.1770968455326; Thu, 12 Feb 2026 23:40:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770968455; cv=none; d=google.com; s=arc-20240605; b=aLoH+i9NXBhFH4F8sVM3Mb6oBQHyrTGRtCHZ5TyackcOxP/YfJ8fclYA4Y0s6z4NGG kK3uySmhWh7yW+TBTeUgCqBzjeSnIywoM/5fEtKPER2VOJVtwGAQ3SU8SRYuRrPDju82 OBP9eJRSBxrPiMp0ll/elglYQU4oO/M38Ne0rIO5MZfLx8H147/sQRfLLdIV4726fgRk XBZcsLqXkt0mS19cz1Ed2Dok76w7kTRI+3xk+ylUV3ZPce2vVab0kBF8NYN5pOrgdIJW FLVdEzbNK9Fepjuv7fRQnj8eZl0W3WW9wcjvtGoAK7hmhwMseH4Q4ZgLZPPfJSk/MW8U qFmg== 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=qiU7cYlwElYWZgStrvP4BUnOIcocag0RA1ZZFNG3LSs=; fh=403AV4hwEHWB4lTYzGdOyLsp6fLjI4P6I+0rnADDAes=; b=PjcIEsFk6N1zAJT9apPiaCNb66krwE66xA/8q2oGFiIe0iSdicpd3/GEAIwJgDF8v5 VIh9GLbceZkJzTtE49wqrhkXZNtQRLBOmMNElm1Z4M+en/yEfajm7sWgykiQcxUvDw+o ZtHOAuNv0hULbxcKR30U5oIcju1HNnEb/33TzSO4B9uDnJ8t5cGE/c3fcYG86n2bmGEm c++86hXDMC4yMvcF8hJRF432qbrx5YRBkWaEpOWRsIoHb+IK7qS9H7JEK7KBDfa06K2p 9SfUbdMNEp5DImMItVR0C5EH/CqVhDZB4LNT2vinPqGbIk9SVqPumNm/4PGL33CtsgB6 UyKA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-483709f536asi223425e9.0.2026.02.12.23.40.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Feb 2026 23:40:55 -0800 (PST) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.123]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 61D7enLx026889 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Feb 2026 08:40:54 +0100 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Uladzimir Bely , Anton Mikanovich Subject: [PATCH v6 4/4] meta: Deploy DTBs once per kernel Date: Fri, 13 Feb 2026 09:40:42 +0200 Message-Id: <20260213074042.76277-5-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260213074042.76277-1-amikan@ilbers.de> References: <20260213074042.76277-1-amikan@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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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: Uladzimir Bely 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 `dtb-files` recipe responsible for extracting the DTBs 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 `dtb-files` 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: Uladzimir Bely Signed-off-by: Anton Mikanovich --- meta/classes-recipe/image.bbclass | 15 +++----- meta/recipes-kernel/dtb-files/dtb-files.bb | 41 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 meta/recipes-kernel/dtb-files/dtb-files.bb diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index afe6906e..06b72b09 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -381,6 +381,11 @@ 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]}" +python() { + if d.getVar('DTB_FILES'): + d.appendVarFlag("do_copy_boot_files", "depends", "dtb-files-${MACHINE}:do_deploy") +} + do_copy_boot_files[cleandirs] += "${DEPLOYDIR}" do_copy_boot_files[sstate-inputdirs] = "${DEPLOYDIR}" do_copy_boot_files[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" @@ -394,16 +399,6 @@ do_copy_boot_files() { sudo cat "$kernel" > "${DEPLOYDIR}/${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 diff --git a/meta/recipes-kernel/dtb-files/dtb-files.bb b/meta/recipes-kernel/dtb-files/dtb-files.bb new file mode 100644 index 00000000..6f1ef146 --- /dev/null +++ b/meta/recipes-kernel/dtb-files/dtb-files.bb @@ -0,0 +1,41 @@ +# This software is a part of Isar. +# Copyright (C) ilbers GmbH, 2026 +# +# SPDX-License-Identifier: MIT + +inherit dpkg-raw + +PN:append = "-${MACHINE}" + +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() { + 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 ./usr/lib/${PN} + 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