From patchwork Tue May 14 14:15:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmidt, Adriaan" X-Patchwork-Id: 3552 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 14 May 2024 16:15:43 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f184.google.com (mail-lj1-f184.google.com [209.85.208.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 44EEFeeb032012 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 14 May 2024 16:15:40 +0200 Received: by mail-lj1-f184.google.com with SMTP id 38308e7fff4ca-2e3208c29absf51283261fa.2 for ; Tue, 14 May 2024 07:15:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715696135; cv=pass; d=google.com; s=arc-20160816; b=I9jxHq86Htd7ZzwtBD+lJWBRnWfR/pt97NZq3nLxDTjrk4YPdZ/1MbiyjYwUfaJe70 rtwGafLGeEokb6ag9mXCep490PWZY8UmC4uWPjClW06rKHZetuHYsPFGYFtEm/r2rn/J vPru4a0DzFY5zrAGjzyQsphAlL2aEA8Vz2dtL1vPDbgGYEBj9jrtd+C6rHwAgD6ps4Hm W9Jld80r43RWv4Qn9KVk4qdT8I8OhhJmDedz/F32ER0QWgtImGGomozsX1k/gr4zHPlW tHcp6e7XhfTsD2ZmG34NXZoCmcphOe1Bu8+gTpv4VGKvjEJa38Nz+F1YWsUQ749hyIxw 075g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z2FvxdHkQYmm/P7UWpKrBUE5zcwjMQK7/Bne2Y6Aoc0=; fh=QZZAIrzLLcwDL5+t4q4gjBYgvGOPDUyEswJDQsc2rPc=; b=mAmJDQgowtwxp434UBal35UxFgu8n6Ds0CASnw8C4XpFtX4VqTkP/2ZAio2JZYsGH1 oRmLh9kL3/8Gzkn0yz9ADHLJpet7DaUP+GY9jpNq1Cw/cFp6xi+bsRhFn509cCrPVV/G aslXWFkf8YiHm9keRNvoarjYc5lfA+ZRQ2wf9YZDcc9oizfvmmYLt2WRkMNfVQubizHU iWF9Vi0MQsEz/ku2XDAhQGHwuY3ODEjT8OCKJHBPnNkB8csL1WHHa2mSz2klalT1GGq1 k1dEMva9CZotoQYQtX80U0NA51LmT+WQPaMLBU7TlAh35XduMuabxAqaLhfixIBxCe27 pw7Q==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="cnCsUYW/"; spf=pass (google.com: domain of fm-526363-2024051414153105f6d961a8dd5f99e1-wf1wzq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-526363-2024051414153105f6d961a8dd5f99e1-wF1WzQ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1715696135; x=1716300935; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Z2FvxdHkQYmm/P7UWpKrBUE5zcwjMQK7/Bne2Y6Aoc0=; b=q0Z5qzSUEUjYTaX/LKiyoEWvN4GP3XbemLfs2fQicwl7dd4McnIAkMsGXgSK3jy6yL XuU5EWB5oJCOIHpAia+TEJtcYhv/7eN3fRUV27if7vKrIEEjj4dsdpDjTxyW4Dw26+8s t4k2wRm9L9SWQZ29Lx0vC9DX3+T8YRBSePURh1op3OO/NjQbYp21BPngKntskiUZep55 g95bhIPDXC8C5e+n9wNiY184t8csOTGDq/c3QENDzjB6F4Gd2nRj+6hyfZ7HQJtRu5NT 5qMUjx9yJ7TmUTsNIXt7rv5hU9KxvCE/rEL6ElHXB4OsGED48FiZhKqvImGyLVDhsm2g kLyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715696135; x=1716300935; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Z2FvxdHkQYmm/P7UWpKrBUE5zcwjMQK7/Bne2Y6Aoc0=; b=J5OFID7Y9b8gZDtOKMQIP1vTSegcYxx8k4uFkzQsEAKw7RZ3o5uP6ciq5EJ0DVMYSv XyCyPc/pd9DEDZWlL1q50MH9CiBhlUfDsff0FDiwtOE7LUiuhxF8Sk0quod5U7iycXz+ P6l9+sSp5c2XyQMx/h6Taz2D7ZrA4wlpl5RgsU6uKkYHkpo0XjHHfgUKXT/LlyRT8yks Wss70KB2Fp8Za6zdTQgwb6LItAuC56ZDoB/dsG6XoXi1jXtVwCymRg7X5EILIJxGiN1A rBcOPzsgKncdIGt3iBEnUWb8KE9Q6sqLx0ir3fEJdzDKud6gH4WA+xntA1pQx+QuCCqs BjGA== X-Forwarded-Encrypted: i=2; AJvYcCWikdBxq2UJCaYc+IMkyoXYDIsef3x/uu+eymqYpequFWNdrSIhyPG9jnNA5m/O5EnZFTTnUzu5oK3iv6OjxmyJ/3hde+4= X-Gm-Message-State: AOJu0YzUOOwZ5t20BftSOwVAyn2U3+tyZ9zXeq2x9NoPNLVDvFFSYkB6 RmnewNaOYb16WpTxu22Hw+Qh/JaNcsZfTzeopLdTIU73o3A01Ra+ X-Google-Smtp-Source: AGHT+IEbHFPN5VZpX9kbsqSJjPMSnV5YQJFF8xLmMV56uU14NrCeken9MlN9Fe5VNDBs+f5paEKm1A== X-Received: by 2002:ac2:454b:0:b0:523:8723:32de with SMTP id 2adb3069b0e04-5238723342fmr103542e87.53.1715696134213; Tue, 14 May 2024 07:15:34 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:3228:b0:572:512a:ed0b with SMTP id 4fb4d7f45d1cf-573332d9e6bls2040852a12.1.-pod-prod-08-eu; Tue, 14 May 2024 07:15:32 -0700 (PDT) X-Received: by 2002:a50:c356:0:b0:572:a71e:b8fa with SMTP id 4fb4d7f45d1cf-5734d5cff03mr11235971a12.16.1715696132179; Tue, 14 May 2024 07:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715696132; cv=none; d=google.com; s=arc-20160816; b=cTqZ38DQIMntjXxdZB4byKJCil5u9IUD8kFTTbsmGoAHNKnhjOC6j95SH7BWg9xtA3 lI8ahAjVtUsFX8FRKfJXgg/DoGH46zkxeFA44pwfIuveIHFYeOta15pzCGyea8SY6ccb bsjQ0Xkc4SA0JHFw7Lw907AsZjd6jC/HiD/b8QA86ZWoi8xWfk2FFMbEcdqz2Dg6MrQ6 XlvVatdK1qSYh+oHksTtIOEhovuTvr/IXVRmv+5YV1G3mm+s5XlQKas/MppPwc0QTxkp SEV3Zd5y6gqdlNGrq6w5TaXtXlAXRqtMf3KRO0Xo1Mbg2vuKPpy1bSEBTY2lSyr1D80o AgMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=CSrG6yw27XuZ3fzzVBnH1MxqB0spZJJQd8+PijuWFQI=; fh=qxj0qH++O2CSqXuHk1zmqR74UpYndUvoWfavR7y1BqY=; b=wzeZJB8QWBjhiLcUpi6rGrJltd4Q+LYVmZkvWaseP+e59fH5/l6OEpDSmygC5HQ0mF ifX/LqwIZmy9duQP8kOjEOUrTzg9fP/xX6qd+zKq+ZL4F/XzceQSd+GaUFf4bm6ZchvE s898vEyQH/K8f1BceAYIsKhMJaNXuK/axFxmhjyJRoRHtblJJtsu3bI3aoU2x6x67lIp a4lsz+9gkp4IF38GgKdMcQSYKa+dxBv/T7dnfp9yvpnO/SmKSG/HjLe3J166ZKQxdO5J beNyLOTcCDRue+guogAJbTE8aUsyxFGHveCJ7wJcXi1elkNMIoIOeFL/rJDyRrknpVj7 /N+w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="cnCsUYW/"; spf=pass (google.com: domain of fm-526363-2024051414153105f6d961a8dd5f99e1-wf1wzq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-526363-2024051414153105f6d961a8dd5f99e1-wF1WzQ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-574be5729e1si140512a12.0.2024.05.14.07.15.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2024 07:15:32 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-526363-2024051414153105f6d961a8dd5f99e1-wf1wzq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024051414153105f6d961a8dd5f99e1 for ; Tue, 14 May 2024 16:15:31 +0200 X-Patchwork-Original-From: "'Adriaan Schmidt' via isar-users" From: "Schmidt, Adriaan" To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, stefan-koch@siemens.com, Adriaan Schmidt Subject: [PATCH v4 1/3] module.inc: fix kbuild dependency Date: Tue, 14 May 2024 16:15:25 +0200 Message-Id: <20240514141527.1997170-2-adriaan.schmidt@siemens.com> In-Reply-To: <20240514141527.1997170-1-adriaan.schmidt@siemens.com> References: <20240514141527.1997170-1-adriaan.schmidt@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-526363:519-21489:flowmailer X-Original-Sender: adriaan.schmidt@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="cnCsUYW/"; spf=pass (google.com: domain of fm-526363-2024051414153105f6d961a8dd5f99e1-wf1wzq@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-526363-2024051414153105f6d961a8dd5f99e1-wF1WzQ@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Adriaan Schmidt Reply-To: Adriaan Schmidt 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-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= This achieves two things: * Module builds now depend on linux-headers-*-native as build dependency. This is a minimal API change compared to the previous linux-headers-*. The dependency on the new linux-kbuild is kept hidden in linux-custom.inc * Remove the unconditional building of native kbuild when it is not needed, i.e. when we're not actually cross-building a module Signed-off-by: Jan Kiszka Signed-off-by: Adriaan Schmidt --- meta/recipes-kernel/linux-module/module.inc | 2 +- meta/recipes-kernel/linux/linux-custom.inc | 25 ++++++++++++++------- meta/recipes-kernel/linux/linux-distro.bb | 1 + 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc index eddbf177..229e6a5c 100644 --- a/meta/recipes-kernel/linux-module/module.inc +++ b/meta/recipes-kernel/linux-module/module.inc @@ -17,7 +17,7 @@ PN .= "-${KERNEL_NAME}" KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}" KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}" -DEPENDS += "${KERNEL_HEADERS_PKG}" +DEPENDS += "${KERNEL_HEADERS_PKG}-native" DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}" SIGNATURE_KEYFILE ??= "" diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 0d222332..7b752f2b 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -116,11 +116,19 @@ HEADERS_DEPENDS:cross-profile = ", linux-kbuild-${KERNEL_NAME_PROVIDED}:${HOST_A # -native: kbuild package for host BUILD_PROFILES:class-native = "kbuild" -RECIPE_PROVIDES:class-native = "linux-kbuild-${KERNEL_NAME_PROVIDED}-native" +RECIPE_PROVIDES:class-native = " \ + linux-headers-${KERNEL_NAME_PROVIDED} \ + linux-kbuild-${KERNEL_NAME_PROVIDED}" +# Use pseudo target to pull in the base variant of the recipe. +# Will be auto-extended with -native by multiarch.bbclass. +RDEPENDS:class-native += "${BPN}-pseudo" # -kbuildtarget: kbuild package for target, enforcing non-cross-build BUILD_PROFILES:class-kbuildtarget = "kbuild" -RECIPE_PROVIDES:class-kbuildtarget = "linux-kbuild-${KERNEL_NAME_PROVIDED}" +RECIPE_PROVIDES:class-kbuildtarget = " \ + linux-headers-${KERNEL_NAME_PROVIDED} \ + linux-kbuild-${KERNEL_NAME_PROVIDED}" +RDEPENDS:class-kbuildtarget = "${BPN}" ISAR_CROSS_COMPILE:class-kbuildtarget = "0" # Make bitbake know we will be producing linux-image and linux-headers packages @@ -132,11 +140,15 @@ RECIPE_PROVIDES = " \ linux-libc-dev-${DISTRO_ARCH}-cross \ linux-image-${KERNEL_NAME_PROVIDED}-dbg \ linux-kbuild-${KERNEL_NAME_PROVIDED} \ + ${BPN}-pseudo-native \ " # When cross-profile is active: -# kbuild package is provided by -native or -kbuildtarget variant -# Otherwise it's provided by the default variant -RECIPE_PROVIDES:remove:cross-profile = "linux-kbuild-${KERNEL_NAME_PROVIDED}" +# kbuild package is provided by -native or -kbuildtarget variant. Also headers +# provisioning moves over to ensure those variants are pulled, although the +# package itself is still built by the base recipe. +RECIPE_PROVIDES:remove:cross-profile = " \ + linux-headers-${KERNEL_NAME_PROVIDED} \ + linux-kbuild-${KERNEL_NAME_PROVIDED}" # Append headers depends HEADERS_DEPENDS = ", linux-kbuild-${KERNEL_NAME_PROVIDED}" @@ -148,9 +160,6 @@ PROVIDES += "${RECIPE_PROVIDES}" # Append build profiles DEB_BUILD_PROFILES += "${BUILD_PROFILES}" -# Add dependency to build -kbuildtarget and -native automatically -RDEPENDS:append:cross-profile = " ${BPN}-native" - def get_kernel_arch(d): distro_arch = d.getVar("DISTRO_ARCH") if distro_arch in ["amd64", "i386"]: diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-kernel/linux/linux-distro.bb index bc43528c..13b8dc7e 100644 --- a/meta/recipes-kernel/linux/linux-distro.bb +++ b/meta/recipes-kernel/linux/linux-distro.bb @@ -10,6 +10,7 @@ python() { for kernel in distro_kernels.split(): d.appendVar('PROVIDES', ' linux-image-' + kernel) d.appendVar('PROVIDES', ' linux-headers-' + kernel) + d.appendVar('PROVIDES', ' linux-kbuild-' + kernel) if d.getVar('KERNEL_IMAGE_PKG'): d.appendVar('PROVIDES', ' ' + d.getVar('KERNEL_IMAGE_PKG')) if d.getVar('KERNEL_HEADERS_PKG'):