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; Fri, 03 Jul 2026 17:08:55 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f62.google.com (mail-lf1-f62.google.com [209.85.167.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 663F8rjS017210 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 3 Jul 2026 17:08:54 +0200 Received: by mail-lf1-f62.google.com with SMTP id 2adb3069b0e04-5aeb49bb645sf493546e87.0 for ; Fri, 03 Jul 2026 08:08:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1783091328; cv=pass; d=google.com; s=arc-20260327; b=SuEr8+YxqzKUwK1NzC4zZhLE+nICDzsrS/DXUu2K9qcYJ7LyFpDOd146rnAuZv7nv7 O10f0EXSa4avZf8hVWDa3Q0iA+WEb0M8Mbf+c3uBAFdu1QEdbPcK50W/h4axXewT6uM3 sYEAW7xCs9EpTjEHl4GWjguJPgw516PN5r+DQ0OvF/Tg5b15EbFlE9HV6snqwTl6Lr/6 0Hm9TW5BBhaAungjddnq60UQWquLZG/ou7G0hBmk6ePHOex9Y5c8NTS+CLfdQQi7zl0c Yc7uan/gcBHmQKUlw2E1PIDboRgZZjC7oFho+hq9udR3u8D/ztC34D7vODHPOLpuezPW r7sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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=7Lu2GweBDe8KE0SKUsLV0rLqGlCoXMMXVooKHVlNPWI=; fh=1dAjrahrw87QtCUVWyDT8u7k+DOv7371RDqvUiF+Yf0=; b=X/ww2GpM+qNVGIc+jthOXBbfWgnztVc6FObC/03HD7MeeQGn8b6Z3imQL3hkYGLG7R 6YSblVU4M0FHD6TWCKRB/4LH7H4byabFyswzZmSTkgKF5eDlo6TzMrEEO5Xi82gObBIR 9qqc+6HZt2QTo3rGygd9do/7eFEUSd65tbMgG9Jol7Iq9zMwn6wSHSomUXx4uvdYkdce RySPQ3cJWdwB6jDzXDmLKkl3wuKuVm0hcXKD/eKx6L/SxzXy3cGpvSJXluX86EsRhkaK DlkXf4A5nljo7CLS8NPFXJGMBKOQEMYaq+Z88t8CqEVaKAkDSyValuK36owz277uDMfS VFYg==; darn=ilbers.de 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=20251104; t=1783091328; x=1783696128; 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=7Lu2GweBDe8KE0SKUsLV0rLqGlCoXMMXVooKHVlNPWI=; b=MWSfOZId0MDNUwWY0dNzba7D90cvYcY6DYjCYA17WyB6QZSNH5jOlh40xZD7ljQKCr C1tNbDpzPFj8GdBnMuQbml0sDpOmC5keuPWCLZLma/3tUoLE6xxaxV36+Cw0emyf96Mx l+jW3uaAQ6vVxdPPmU9N/LArsEJUv9IDRf2SA8LEaS1qkWR6si47DZB0Fog00RL8n0pV 9npkfDSTC/9vwTGBy1IZ3lvPBgjdRnlimhKUo50t5RCk38piZJHh+eNlDbipzofZMS++ YT45ZR5HqxnPgx7dLnVLK3J3/NGro8aIi8hOZNw6nzotMntqnIDMspuI68mfR7RnFCuQ MBfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783091328; x=1783696128; 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=7Lu2GweBDe8KE0SKUsLV0rLqGlCoXMMXVooKHVlNPWI=; b=qZnHjNvrsufH57XTNyN5DrAFQEtBzgWfWZ+pbg3Y0kr5+FiIEUYpVdqDLFrQfPp3nI tFl9NehrW/R0emMdC+3mPNrM2nkMTCv10qMdY812RYiRt0kwq4KWzmS+B0jtfHuI+gRN fGYyDRcxAADoxVcV36T1w7X/5wla94SgjqkZl+WEmG+IZkqlNeBsBcvryG6nDszorHzN mOzhY0lWgoVbzT+Af3o4HXmwlBTwK8bdyVBZ+c5euHZDeE+OaZF8GPjXN6Dda1A8ABoj fwayeozMFjjuZqDhUfzHAmYc1AZfaxA1qI9KGgcKucwO7NCnVs/iGCeY59tRb/BdEyo0 uRBQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AHgh+RqQudoo2WeHksQ+y5MGzMF3DInK3bU2BvGvwgGcDnZCfHqeoT3x8C31Aso0KNxelHJOpSCf@ilbers.de X-Gm-Message-State: AOJu0Yxg4ogdqcQ7+/k2y8LHjNlBIPVQBe36tf+lFrwnHyyaEA8VMqur f3CTGrj/u2Wg1nHJOryrvBx2jTxeS8bAsUP9mU3RID35qR9faCZbi1u+ X-Received: by 2002:a05:6512:66cf:b0:5ae:ba28:a56e with SMTP id 2adb3069b0e04-5aed455f13emr16235e87.35.1783091328137; Fri, 03 Jul 2026 08:08:48 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="AX0PUUf/Hy0GKxVhib/a0Qf4ADLpRCMdDvouWZMlK0ymAy51yA==" Received: by 2002:a05:651c:31c8:b0:39b:126f:e3ec with SMTP id 38308e7fff4ca-39b2d533f82ls12210681fa.0.-pod-prod-08-eu; Fri, 03 Jul 2026 08:08:46 -0700 (PDT) X-Received: by 2002:ac2:4c8e:0:b0:5ae:c745:f39 with SMTP id 2adb3069b0e04-5aed4568094mr19189e87.44.1783091325771; Fri, 03 Jul 2026 08:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783091325; cv=none; d=google.com; s=arc-20260327; b=gg0evMyQoWi3ai9icosRN+Ar6GrB3NYEzbbqCTNkO6Q3HMKKx6Ov72LDfsVX4tsOK7 8soBoBdCmtPCn5OdNATXVDqoGWAUhYhex+JtwCabiVYhJD72Mk3PmYTqC2obyrCQlBAt QVgMU/P9qEj0KcYXkyBOf1M95DMYYQglruqvdHJrbZk1bKtnPfDpBvNGD0yzaJAGDJwH XNrX+QQuyjzRBVkdds1q92V0tVam+i0k0tO7bJBhcpO8w7IzFUOJlG/J/AtIDWH8c7Qn qk5DnPgMKsN3Jv16dBgmYbqtEfSF4sp+cueavbtTbtLCDUmg71pcabSoiyYp7Vdz33hb QRZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=gmtucNpX6zPhFkX1F7r3Wtyi0lUADOSB6FuRuAgVMUo=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=nxERh1tDNSFU7O09KIpmkkucQG/yq3IDx7uK2q2gjHohZEfr4LUzKM1AwI8y1PqbMe 9+yDiqcDszNHx47WPsTh9e8L0gGfXI63WswpwvxlQ7v4GMY+6wg9Cu6WZVm2isvEIQqR KWbYAVUrO81MH86t8jqed6C/5TC/bgtVxrjd2PebzbhSEdj+dt/s2N0emmypEn4FO8oM ev6W1CPlzVem6KfBpwjriqIJqQ5QVM2OZFDg580R0Ycf0CIkdjrQkEIK9PlavSuyhoQC Q6fvRGIDlMGjsiPRSRlSoQ0SaPsbzi1itur+l9A2IBEG2INnuiZ0J0Ez4Hh9JJqYpAFh jRmw==; 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 38308e7fff4ca-39b4ad91a95si436021fa.6.2026.07.03.08.08.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Jul 2026 08:08:45 -0700 (PDT) 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 663F8gDT017164 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 3 Jul 2026 17:08:44 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v12 2/3] meta: Move kernel artifacts deployment from image recipe Date: Fri, 3 Jul 2026 18:08:34 +0300 Message-Id: <20260703150835.2490688-3-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260703150835.2490688-1-amikan@ilbers.de> References: <20260703150835.2490688-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 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: 9fPYhQZ4ZuiO 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 universal `kernel-deploy` bbclass responsible for extracting the DTBs and kernel from the linux-image package and deploying them. For the distro kernel type its package is now installed into sbuild chroot. After that, deb which contains vmlinu[xz] file is extracted from the apt cache. 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 | 13 ++++++ meta/classes-recipe/image.bbclass | 39 +++++++++-------- meta/classes-recipe/linux-deploy.bbclass | 46 ++++++++++++++++++++ meta/classes-recipe/linux-kernel.bbclass | 3 ++ meta/recipes-kernel/linux/files/getkernel.sh | 40 +++++++++++++++++ meta/recipes-kernel/linux/files/rules.tmpl | 12 +++++ meta/recipes-kernel/linux/linux-distro.bb | 27 ++++++++++++ testsuite/citest.py | 2 - 8 files changed, 161 insertions(+), 21 deletions(-) create mode 100644 meta/classes-recipe/linux-deploy.bbclass create mode 100755 meta/recipes-kernel/linux/files/getkernel.sh create mode 100644 meta/recipes-kernel/linux/files/rules.tmpl diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index a6ded089..ef9dce00 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -1102,3 +1102,16 @@ 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 one + +To prevent parallel conflicting artifacts deployment from the same kernel +used by different images, move original deployment logic from +do_copy_boot_files() task of the image recipe to the kernel recipe. As we have +two types of kernel (distro and self build), both are affected. With this +aproach the deployment of any kernel artifacts will be performed only once per +kernel. + +Also allow using different kernels for one machine and distro without +overwritting by storing kernel artifacts in kernel-{KERNEL_NAME} subdirectory +of DEPLOY_DIR_IMAGE. Previous image linking names are kept by symlinks. diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index 26a4ec06..5f34cd4f 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,37 @@ 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}" +KERNEL_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}/kernel-${KERNEL_NAME}" +KERNEL_WILDCARD = "${@ 'vmlinu[xz]*' if (p := d.getVar('KERNEL_FILE')) == 'vmlinux' else p+'*'}" + +python() { + if d.getVar('KERNEL_NAME'): + pn = d.getVar('KERNEL_IMAGE_PKG') or '' + task = 'do_deploy_kernel_%s' % (d.getVar('MACHINE').replace('-','_') or '') + d.appendVarFlag("do_copy_boot_files", "depends", f"{pn}:{task}") +} + +# Associate kernel with image by symlinks +do_copy_boot_files[dirs] += "${DEPLOY_DIR_IMAGE}" +do_copy_boot_files[file-checksums] += "${KERNEL_DEPLOY_DIR}/${KERNEL_WILDCARD}:True" 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 -mq '${KERNEL_DEPLOY_DIR}/'${KERNEL_WILDCARD} | head -n1)" 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)" + dtb="${KERNEL_DEPLOY_DIR}/$(basename ${file})" if [ -z "$dtb" -o ! -e "$dtb" ]; then die "${file} not found" fi - cp -f "$dtb" "${DEPLOYDIR}/" + ln -sfr "$dtb" "${DEPLOY_DIR_IMAGE}/$(basename $dtb)" 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/classes-recipe/linux-deploy.bbclass b/meta/classes-recipe/linux-deploy.bbclass new file mode 100644 index 00000000..4b33e234 --- /dev/null +++ b/meta/classes-recipe/linux-deploy.bbclass @@ -0,0 +1,46 @@ +# This software is a part of Isar. +# Copyright (C) 2026 ilbers GmbH +# +# SPDX-License-Identifier: MIT + +DEPLOYDIR = "${WORKDIR}/deploy_${@ d.getVar('MACHINE').replace('-','_') or ''}" +KERNEL_DEPLOY_TASKNAME ?= "do_deploy_kernel_${@ d.getVar('MACHINE').replace('-','_') or ''}" +SSTATETASKS += "${KERNEL_DEPLOY_TASKNAME}" + +python () { + kernel_name = d.getVar('KERNEL_NAME_PROVIDED') or '' + if "linux-image-"+kernel_name in d.getVar('PROVIDES'): + task = d.getVar('KERNEL_DEPLOY_TASKNAME') + d.setVar(task, d.expand('kernel_deploy')) + d.setVarFlag(task, 'func', '1') + d.setVarFlag(task, 'sstate-inputdirs', d.getVar('DEPLOYDIR')) + d.setVarFlag(task, 'sstate-outputdirs', d.getVar('KERNEL_DEPLOY_DIR')) + d.appendVarFlag(task, 'cleandirs', d.getVar('DEPLOYDIR')) + d.appendVarFlag(task, 'stamp-extra-info', d.getVar('MACHINE')) + bb.build.addtask(task, 'do_build', 'do_dpkg_build', d) +} + +KERNEL_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}/kernel-${KERNEL_NAME_PROVIDED}" + +KERNEL_LOCATION ?= "./boot" +KERNEL_DEB ?= "linux-image-${KERNEL_NAME_PROVIDED}_${CHANGELOG_V}_${DISTRO_ARCH}.deb" + +# Take care the case when requested kernel format doesn't match distro one +DEPLOY_WILDCARDS = "'${KERNEL_LOCATION}/${@ 'vmlinu[xz]*' if (p := d.getVar('KERNEL_FILE')) == 'vmlinux' else p+'*'}'" +DEPLOY_WILDCARDS += "${@(' '.join("'*%s'" % p for p in (d.getVar('DTB_FILES') or '').split()))}" + +kernel_deploy() { + case "${PROVIDES}" in + *linux-image-${KERNEL_NAME_PROVIDED}*) + dpkg --fsys-tarfile ${WORKDIR}/${KERNEL_DEB} | \ + tar xvf - -C "${DEPLOYDIR}" \ + --transform='s|^.*/||' \ + --wildcards ${DEPLOY_WILDCARDS} + ;; + esac +} + +python do_copy_boot_files_setscene () { + sstate_setscene(d) +} +addtask do_copy_boot_files_setscene diff --git a/meta/classes-recipe/linux-kernel.bbclass b/meta/classes-recipe/linux-kernel.bbclass index fffdf12c..42e0c6b3 100644 --- a/meta/classes-recipe/linux-kernel.bbclass +++ b/meta/classes-recipe/linux-kernel.bbclass @@ -3,6 +3,7 @@ # This software is a part of Isar. # Copyright (c) Siemens AG, 2022 # Copyright (c) Mentor Graphics, a Siemens business, 2022 +# Copyright (C) 2022-2026 ilbers GmbH # # SPDX-License-Identifier: MIT @@ -338,3 +339,5 @@ do_dpkg_source:prepend() { dpkg_configure_kernel get_localversion_auto } + +inherit linux-deploy diff --git a/meta/recipes-kernel/linux/files/getkernel.sh b/meta/recipes-kernel/linux/files/getkernel.sh new file mode 100755 index 00000000..7070dbc0 --- /dev/null +++ b/meta/recipes-kernel/linux/files/getkernel.sh @@ -0,0 +1,40 @@ +#!/bin/bash -e + +deb_cache="/var/cache/apt/archives" + +paths="/vmlinu[xz] /boot/vmlinu[xz]" +if [ -n "$1" ]; then + paths="/$1 /boot/$1 $paths" +fi + +# Lookup for the kernel file +for path in ${paths}; do + kernel="$(realpath -q ${path})" + if [ -f "${kernel}" ]; then + break + fi +done + +# Obtain package name for the kernel file +pkg="$(dpkg -S ${kernel} | cut -d':' -f1)" +if [ -z "${pkg}" ]; then + >&2 echo "No package providing ${kernel} found!" + exit 1 +fi + +# Query for deb filename +deb_name=$(dpkg-query -W -f='${Package}_${Version}_${Architecture}.deb\n' ${pkg}) + +# Take care about special symbols +deb_name="${deb_name//%/%25}" +deb_name="${deb_name//:/%3a}" +deb_name="${deb_name//~/%7e}" + +# Search for deb in cache dir +deb_path="$(find ${deb_cache} -name "${deb_name}" 2>/dev/null | head -n1)" +if [ ! -f "${deb_path}" ]; then + >&2 echo "Package ${deb_name} not found in ${deb_cache}!" + exit 1 +fi + +echo "${deb_path}" diff --git a/meta/recipes-kernel/linux/files/rules.tmpl b/meta/recipes-kernel/linux/files/rules.tmpl new file mode 100644 index 00000000..69d79bb5 --- /dev/null +++ b/meta/recipes-kernel/linux/files/rules.tmpl @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +KERNEL_PATH := $(shell ./debian/getkernel.sh ${KERNEL_FILE}) +DEB_NAME := ${KERNEL_DEB} + +binary: + @[ -z "$(KERNEL_PATH)" ] && { echo "Kernel not found!"; exit 1; } || true + cp "$(KERNEL_PATH)" ../$(DEB_NAME) + echo "$(DEB_NAME) misc optional" > debian/files + +%: + true diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-kernel/linux/linux-distro.bb index 8fc1bcb7..47fe3fb4 100644 --- a/meta/recipes-kernel/linux/linux-distro.bb +++ b/meta/recipes-kernel/linux/linux-distro.bb @@ -2,6 +2,7 @@ # # This software is a part of Isar. # Copyright (c) Siemens AG, 2018 +# Copyright (C) 2022-2026 ilbers GmbH # # SPDX-License-Identifier: MIT @@ -27,3 +28,29 @@ python() { } inherit multiarch +inherit dpkg +inherit linux-deploy + +# Always use target arch for kernel package lookup +ISAR_CROSS_COMPILE = "0" + +MAINTAINER = "isar-users " + +PN .= "-${KERNEL_NAME}" +KERNEL_NAME_PROVIDED ??= "${KERNEL_NAME}" +DEBIAN_BUILD_DEPENDS ?= "${@d.getVar('KERNEL_IMAGE_PKG') or ('linux-image-' + (d.getVar('KERNEL_NAME') or ''))}" + +FILESPATH:prepend = "${LAYERDIR_core}/recipes-kernel/linux/files:" + +SRC_URI = "file://getkernel.sh \ + file://rules.tmpl" + +TEMPLATE_VARS += "KERNEL_FILE KERNEL_DEB" +TEMPLATE_FILES = "rules.tmpl" + +do_prepare_build[cleandirs] += "${S}/debian" +do_prepare_build() { + deb_debianize + cp "${WORKDIR}/getkernel.sh" "${S}/debian/" +} +do_deploy_deb[noexec] = "1" diff --git a/testsuite/citest.py b/testsuite/citest.py index 7d666880..5aa3e799 100644 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -740,8 +740,6 @@ class DtbDeployTest(CIBaseTest): self.init() try: self.perform_build_test(targets, image_install='') - except exceptions.TestFail: - self.cancel('KFAIL') finally: self.move_in_build_dir('tmp', 'tmp_dtbdeploy') -- 2.34.1 -- 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/20260703150835.2490688-3-amikan%40ilbers.de.