From patchwork Fri May 17 16:35:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3569 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 17 May 2024 18:35:54 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f56.google.com (mail-lf1-f56.google.com [209.85.167.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 44HGZq8K017324 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 17 May 2024 18:35:53 +0200 Received: by mail-lf1-f56.google.com with SMTP id 2adb3069b0e04-51f98fc5a80sf8455548e87.1 for ; Fri, 17 May 2024 09:35:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715963746; cv=pass; d=google.com; s=arc-20160816; b=Nw89t69LYRrJ6ADkMzSOFBxMHD+ZKKFR4fVetgcRjFZC+7ayQMo1AYitdVvqFlxyn1 hx+jyWFD8nMFht0Mqj3pRI6yvlJEdPurvtz0kES2Oq6MC8WPDEW1S9l2a0+z9xfq8P0H wV2z175t0JtHLZDMs0S4SXYqVU7YI/yAUnDZ1m8PLEZVv5XZYfpAmkReXM8Mgdystwf3 zikcViZ+TpLtW6Yk2Kg9H3+BmRgYfeNzc1xtPJZFRfNr8Dq+KnaAw0qMgD7eCfvYkEvI G92XJqxRW+ykOnJyR/tXsThIlAsPSo08NIBggZQd+kvuvsYEAdUMFy+rrwB7qsXtQhdj W4gw== 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=kJwuke175jmvTfq3LCz33/7m1lmog+VQpT3koODe73M=; fh=aU9lgjNDnRGOI93ONV4VpZ/9vUDTU20wqmM2w/p9eO0=; b=lumm9yLASeBMVEy0ZCElF6KIoVNNKp2rzLAbVLQRaZvihytiFLBWSUH2LYpWjGHWP9 3fe1ZeEXhbB4FrflOAOhSebWXGgY7mLgg0y3RlsdFCzfg/zFlO5GGe173f9rSmiJAAp9 mLQgXiVODkzlEAUSBU6n4YVOxYofp8afgTAq0kd1lqXkJ8BxgSZYF4CVwM0M907yhiTm aNtZv6Wf3/e1uwm3u3HPq9wbpJPfwurX84LLya2/6crBQaE4zxJANw4aIcJeS8WMXa4t UryTwFT4/8I8UzljWartYUlZoFg5f5mLvZUvyc4NsutzDXCNFdh+WaYwF+AbhTd+mE2s eYPw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=ZURseEGm; spf=pass (google.com: domain of fm-294854-202405171635432b767118505ffcbd31-07wzal@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-202405171635432b767118505ffcbd31-07WZal@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=1715963746; x=1716568546; 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=kJwuke175jmvTfq3LCz33/7m1lmog+VQpT3koODe73M=; b=KakpzHi3tfQ/fDfnsX/hzQQHyf4JbMIsa7TVttTa3kjq5CSL+sWIKMMPgAzjNxYfxZ 0RDLDTkDpypF1toXhGjUdfXfy5rvKRcpv4VaE/Oe2P+yUR5qR0Ow10xTasnRE1fEVQ6o /YBxElb1YwRhKVltWaruGy2c5jsX6VAIrPyI5r3FSMauTK8I0U8IYVwcJEaivpPDKc67 WHIUTVF0h+ysOo36lqbQ+Cc/i45keavya4KVvk2UTMX5wT4basXtlk7QtqQnS364De2L pkjd81jtcQa/VE+uzkik46Nri/pCmX2GRWZI20WOi6G9Iddl0h74Oe5l4ymlmA/cWQPx b2cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715963746; x=1716568546; 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=kJwuke175jmvTfq3LCz33/7m1lmog+VQpT3koODe73M=; b=ryLLmG+utz9XTwzxpteU0VyWVFQINc2A6nV0FMnScWx+SmuHhdjojvwCRPiIkSXHP/ z/SKWYjp1XXLHz+wZ6xrDkRRd0NtOJtABbZD6q9wOK5q++tlB//Z1F5Udh8bXnczcGMR 0R1wNI5D/BIlhs9+QbLF0L3kpqKAccPju2q91l5I+n9C9LtPhiPUeIVl4bu9pRUEPDGf UwTjEFdy1YztQA/VWHAQZTc5ivr/LXhs2dFL8Yi423BfCBKM7jc+hxspxt0a9F2dC+27 b57OQ5dEQlQNFI6K5WY9NTiNy7VONo6qYS/pNymwiPspswUYh0gWZTJ4U8nfpZqfLFMY b6KQ== X-Forwarded-Encrypted: i=2; AJvYcCXCW+vkmn9xYi5Q1Izug2aumsdklt2kHB//tumRBL+wRjtt1NMKfz1eQ4FS6PT5SyCdms+xeQ21q2rh820jiszrm+zkRHU= X-Gm-Message-State: AOJu0Yy/yj4sk0EwEtDupfULLfchTjd8JGPFDZBT5gxTZS75vjJ7gKLl 66hmDVdupWuszNjMMKQZ7ZaCQ13EHF+8DLlGXlYP6neKk5aMRfnm X-Google-Smtp-Source: AGHT+IGynik7lQA9oo3GkRPFCE8GOXxdIXSHCew3PStMKmdbXRdz1rV5xXWBcwL1Yc4uGBihxCNebA== X-Received: by 2002:ac2:5dc1:0:b0:522:33cd:64bd with SMTP id 2adb3069b0e04-52233cd6563mr14053410e87.27.1715963745977; Fri, 17 May 2024 09:35:45 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:f10:b0:572:5087:dac1 with SMTP id 4fb4d7f45d1cf-5733331e4d9ls853383a12.1.-pod-prod-07-eu; Fri, 17 May 2024 09:35:44 -0700 (PDT) X-Received: by 2002:a50:955c:0:b0:572:a16f:294 with SMTP id 4fb4d7f45d1cf-5734d67f7edmr15447463a12.30.1715963743812; Fri, 17 May 2024 09:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715963743; cv=none; d=google.com; s=arc-20160816; b=mZmVhAUdOUZE9EA4protUHYl8ZcDuM0trDiiL4pIbzCzWbrJFpSyb6RxszAk5GLRgj pw1EAtsV+FnOTWQ8D4E+bZ8nUGyomXMjJ0Q5AAXgFRqq/9symm/2bxpZyEvyuFT0ZhkM acHPwYGA5xz0QgY3mbGNkwd58OsAL2dzO/bSDVpYyCQB+1cREvCc0BDvH8527u7213TW 3sWOL+nRNmwH0TDr7I7mIQ6N37tpSgltg8T2srY61S/uo1dAQSKBYlawoCpteeaWDaH+ JV0SnLht+79OQyJWqE1VhxnG8lRE9/fHLsOtSIcItwOZXaUp8P1aUNGg/X9ZN4zaibLD HpXA== 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=DSVmfzOM6TszmHt6WM9uoGsrLM5RpwJqj2tR2PnVEzI=; fh=XGT9su1InluIJlpNbfO5AhdONNgYrcrI0omn79eqbSQ=; b=eDxwbMH5+AumXpwzkEAv3Ecjj46DOwMmVBoqnTrKdmmywJ+9OMitvXPHc3s4oTmyUY M/Cx5PVxi15tTJBmVunpMo1xkZmi+mTHpPkY3Z3PMJuzQqD09PSKHkfe4rSwOCc+zU0d 9BWfQnH7fy4CdtmflpILgSoK96B/6q8vSoSDHqXSgGLeZ/1NC6LNtkW/yr0uOaslRNO4 5KRyDBk9u0ingR/MwJff84C86L8Dp6TVTr2HEEdCvD22X34M9cNt+0KqZZAzqaznaZva AwX/9Guda8EsTclSqXvrJ5jGyeqVkwZbYUgFofxjUDEAEqM7dJaklNwAZPzNXkxCx1Hj 0UVQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=ZURseEGm; spf=pass (google.com: domain of fm-294854-202405171635432b767118505ffcbd31-07wzal@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-202405171635432b767118505ffcbd31-07WZal@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-574be5729e1si305430a12.0.2024.05.17.09.35.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2024 09:35:43 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-294854-202405171635432b767118505ffcbd31-07wzal@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 202405171635432b767118505ffcbd31 for ; Fri, 17 May 2024 18:35:43 +0200 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Felix Moessbauer , stefan-koch@siemens.com, Adriaan Schmidt , Anton Mikanovich Subject: [PATCH v3 2/5] linux-custom: Model cross-built kbuild package separately Date: Fri, 17 May 2024 18:35:39 +0200 Message-Id: <54c70edb8d5334a5aa5983d6559b75e0d552515a.1715963742.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=ZURseEGm; spf=pass (google.com: domain of fm-294854-202405171635432b767118505ffcbd31-07wzal@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-202405171635432b767118505ffcbd31-07WZal@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Jan Kiszka Reply-To: Jan Kiszka 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?= From: Jan Kiszka Rename to kbuild package containing tools to cross-build modules linux-kbuild---cross. The headers package now depends on either the native kbuild or a cross variant, unconditionally. This allows to have unstable source packages between native and cross and is generally cleaner to describe the cross version. Signed-off-by: Jan Kiszka --- meta/recipes-kernel/linux/files/debian/control.tmpl | 12 +++++++++++- .../linux/files/debian/isar/common.tmpl | 2 ++ .../linux/files/debian/isar/install.tmpl | 6 +++++- meta/recipes-kernel/linux/linux-custom.inc | 5 +---- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index 6f8f8afe..e0e932a0 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -51,9 +51,19 @@ Description: Linux kernel debugging symbols for @KR@ all the necessary debug symbols for the kernel and its modules. Package: linux-kbuild-${KERNEL_NAME_PROVIDED} -Build-Profiles: +Build-Profiles: Architecture: any Depends: ${perl:Depends}, ${shlib:Depends} Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@ This package provides kernel kbuild scripts and tools for @KR@ This is useful for people who need to build external modules + +Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross +Build-Profiles: +Architecture: any +Multi-Arch: foreign +Depends: ${perl:Depends}, ${shlib:Depends} +Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED} +Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@ + This package provides kernel kbuild scripts and tools for @KR@ + This is useful for people who need to build external modules diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl index e3a1d8a0..86af70c5 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl @@ -11,6 +11,7 @@ KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED} KERNEL_PKG_LIBC_HEADERS=linux-libc-dev KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED} +KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross # Force creating debian package with valid host arch for -native build # Use a cross build to comply with arch specific kernel defconfigs @@ -32,6 +33,7 @@ deb_kern_hdr_dir=${deb_top_dir}/${KERNEL_PKG_KERN_HEADERS} deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS} deb_libc_hdr_cross_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS_CROSS} deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD} +deb_kern_kbuild_cross_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD_CROSS} # Array of packages to be generated declare -A kern_pkgs diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl index 77856aee..00011517 100644 --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl @@ -35,7 +35,11 @@ do_install() { if echo "${DEB_BUILD_PROFILES}" | grep -q "kbuild"; then # Install kernel scripts and tools - install_kbuild ${deb_kern_kbuild_dir} + if echo "${DEB_BUILD_PROFILES}" | grep -q "cross"; then + install_kbuild ${deb_kern_kbuild_cross_dir} + else + install_kbuild ${deb_kern_kbuild_dir} + fi fi if echo "${DEB_BUILD_PROFILES}" | grep -q "kernel"; then diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index 3fd0c6c2..c54c287f 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -111,9 +111,6 @@ BBCLASSEXTEND:append:cross-profile = " kbuildtarget" # build only kernel with the default variant of the recipe BUILD_PROFILES:cross-profile = "kernel" -# Select correct kbuild package for isar cross-build -HEADERS_DEPENDS:cross-profile = ", linux-kbuild-${KERNEL_NAME_PROVIDED}:${HOST_ARCH} | linux-kbuild-${KERNEL_NAME_PROVIDED}" - # -native: kbuild package for host BUILD_PROFILES:class-native = "kbuild" RECIPE_PROVIDES:class-native = " \ @@ -151,7 +148,7 @@ RECIPE_PROVIDES:remove:cross-profile = " \ linux-kbuild-${KERNEL_NAME_PROVIDED}" # Append headers depends -HEADERS_DEPENDS = ", linux-kbuild-${KERNEL_NAME_PROVIDED}" +HEADERS_DEPENDS = ", linux-kbuild-${KERNEL_NAME_PROVIDED} | linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross" KERNEL_HEADERS_DEBIAN_DEPENDS:append = "${HEADERS_DEPENDS}" # Append provides