public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Stefan Koch <stefan-koch@siemens.com>,
	Cedric Hombourger <cedric.hombourger@siemens.com>,
	Florian Bezdeka <florian.bezdeka@siemens.com>,
	Clara Kowalsky <clara.kowalsky@siemens.com>
Subject: [PATCH 2/2] linux-custom: Add support for arm64 compat vDSO
Date: Mon, 28 Oct 2024 12:13:24 +0100	[thread overview]
Message-ID: <1152ee8621ae69c6422890214dd3fbc3866cb05f.1730114004.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1730114004.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

To build the 32-bit vDSO for arm64 kernels, we need to set
CROSS_COMPILE_COMPAT during the build as well. Do that if
ISAR_ENABLE_COMPAT_ARCH is enabled.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-kernel/linux/files/debian/isar/build.tmpl  | 1 +
 meta/recipes-kernel/linux/files/debian/isar/common.tmpl | 7 ++++++-
 meta/recipes-kernel/linux/linux-custom.inc              | 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
index bafc5ca4..b4c105c1 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
@@ -43,6 +43,7 @@ print_settings() {
 # ---------------
 # ARCH=${ARCH}
 # CROSS_COMPILE=${CROSS_COMPILE}
+# CROSS_COMPILE_COMPAT=${CROSS_COMPILE_COMPAT}
 # KBUILD_BUILD_TIMESTAMP=${KBUILD_BUILD_TIMESTAMP}
 EOF
 }
diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
index 5ba11289..f9cc2f02 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
@@ -21,6 +21,11 @@ then
     CROSS_COMPILE=$(dpkg-architecture -f -A ${DISTRO_ARCH} -q DEB_TARGET_GNU_TYPE)-
 fi
 
+# Required from building a compat vDSO on arm64
+if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ] && [ "${DISTRO_ARCH}" = "arm64" ]; then
+    CROSS_COMPILE_COMPAT=$(dpkg-architecture -f -A ${COMPAT_DISTRO_ARCH} -q DEB_TARGET_GNU_TYPE)-
+fi
+
 # Constants
 KCONF=.config
 
@@ -51,7 +56,7 @@ main() {
     done
 
     # variables to be exported
-    export ARCH CROSS_COMPILE
+    export ARCH CROSS_COMPILE CROSS_COMPILE_COMPAT
 
     # are we cross-compiling?
     BUILD_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 0f23d6f0..f6486096 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -87,6 +87,8 @@ TEMPLATE_VARS += "                \
     DISTRIBUTOR                   \
     KERNEL_EXTRA_BUILDARGS        \
     HEADERS_INSTALL_EXTRA         \
+    ISAR_ENABLE_COMPAT_ARCH       \
+    COMPAT_DISTRO_ARCH            \
 "
 
 inherit dpkg
-- 
2.43.0

-- 
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/1152ee8621ae69c6422890214dd3fbc3866cb05f.1730114004.git.jan.kiszka%40siemens.com.

  parent reply	other threads:[~2024-10-28 11:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 11:13 [PATCH 0/2] linux-custom: Enable compat vDSO support for arm64, clean up rules 'Jan Kiszka' via isar-users
2024-10-28 11:13 ` [PATCH 1/2] linux-custom: Drop redundant setting of CROSS_COMPILE 'Jan Kiszka' via isar-users
2024-10-28 11:13 ` 'Jan Kiszka' via isar-users [this message]
2024-11-04 13:54 ` [PATCH 0/2] linux-custom: Enable compat vDSO support for arm64, clean up rules Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1152ee8621ae69c6422890214dd3fbc3866cb05f.1730114004.git.jan.kiszka@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=clara.kowalsky@siemens.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=stefan-koch@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox