From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7369181641447571456 X-Received: by 2002:a2e:b01a:0:b0:2de:3421:9edd with SMTP id 38308e7fff4ca-2e5203a4665mr99615081fa.33.1715771305166; Wed, 15 May 2024 04:08:25 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:3008:0:b0:2e1:e370:18d4 with SMTP id 38308e7fff4ca-2e4b6e5f873ls3951591fa.2.-pod-prod-01-eu; Wed, 15 May 2024 04:08:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEetceWt+SelAcsgW1wWVfbkUKap0xMYXh0IAzZSaeUTZcZt4xylqvQNL/iOT0zsj/y2ktl X-Received: by 2002:a2e:3a07:0:b0:2e1:aa75:6504 with SMTP id 38308e7fff4ca-2e5204cc972mr106722311fa.43.1715771302617; Wed, 15 May 2024 04:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715771302; cv=none; d=google.com; s=arc-20160816; b=qqdfOV6dp65v+VRzEgFKGiaTjhHuw0y3mp2Wx9pEXJMbOVkcjQrbgYNreEQM0cbol3 CjpsUnNh1e8DO2UKSkNVnsqadDEw9mMZmat+5rNEWt+Bx2uljKYAUYqlQZ96XS1FMnSI 759gUi1xHVj3q0sfmVKlhueY1P6g0+jIf0gDnSSiCU2fvmcELBQxPPtW6LX1mPl1IYko jI4s52umwn/Fj4n1LnnDrkJZNEl83W9Sig2QUcDfbtnHzBMHD3WA+gRxLJscI+CUPScP ylgRxEQc4wjflhCHZ8VmiBdHtRTe5mgVgYB3zPTZULmmE5M8rSq+6ZmuPb6uibY0FOmp yMvQ== 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=IWEUB0Rm5asBCFWuA13uiWGs23hNYrQZixIQrmpJ0CWp+pnmkMDfDUKkRs1jixZsOD gEWJzbr1LEeSGSb/vBuLt3wVrTbgyvT/Rkwo/v2puKb4aMuB4kEhleS6WSTGgI7eWICi Zm0v2xS9hBFUaYEyPcsGEEz/lE6lutf9t+9qM/aUskooo4k5EiiLavu/zJCvfpRyDd7e GV1/EFCqCxsYd40P6gKV8SzWAhvWEQvu/XnZQ+rB05kbJl/0Ox+gCUK4H0KFkacviTR/ HsedXRx11LNy5NOubBQ59OEoJoO7knJ4AzzzSKmfselgo9xQdsbEgEXEwWPwRBMJJCwO ZkgQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=G443UHIW; spf=pass (google.com: domain of fm-294854-20240515110821abf0adb821c6ba3f4b-ue2fj2@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-20240515110821abf0adb821c6ba3f4b-ue2fj2@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2e4d0bbe1bfsi3771831fa.2.2024.05.15.04.08.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2024 04:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-294854-20240515110821abf0adb821c6ba3f4b-ue2fj2@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=G443UHIW; spf=pass (google.com: domain of fm-294854-20240515110821abf0adb821c6ba3f4b-ue2fj2@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-20240515110821abf0adb821c6ba3f4b-ue2fj2@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 20240515110821abf0adb821c6ba3f4b for ; Wed, 15 May 2024 13:08:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=DSVmfzOM6TszmHt6WM9uoGsrLM5RpwJqj2tR2PnVEzI=; b=G443UHIWRvrCxYML42MYw+KpU8Pcjz2XyUxYhf5yHQtFws76dlMTA2etIge/hprLcJv1Xi JfYhdo5tGgXZX49CaGp1zYQrnP5OEiLff0qiLGz6DrylkSMf3EKIPEtshwR6qQLHcWrW02sH jZIE8b0Qt9ZH1j0O1/4p8y50OFZNQ=; From: Jan Kiszka To: isar-users Cc: Felix Moessbauer , stefan-koch@siemens.com, Adriaan Schmidt , Anton Mikanovich Subject: [PATCH v2 2/5] linux-custom: Model cross-built kbuild package separately Date: Wed, 15 May 2024 13:08:16 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-TUID: J32y4ropzl7+ 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 -- 2.35.3