[PATCH 0/2] linux-custom: Enable compat vDSO support for arm64, clean up rules

8 views
Skip to first unread message

Jan Kiszka

unread,
Oct 28, 2024, 7:13:30 AM10/28/24
to isar-users, Stefan Koch, Cedric Hombourger, Florian Bezdeka, Clara Kowalsky
See patches for details.

Jan Kiszka (2):
linux-custom: Drop redundant setting of CROSS_COMPILE
linux-custom: Add support for arm64 compat vDSO

meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 1 +
meta/recipes-kernel/linux/files/debian/isar/common.tmpl | 7 ++++++-
meta/recipes-kernel/linux/files/debian/rules.tmpl | 3 ---
meta/recipes-kernel/linux/linux-custom.inc | 2 ++
4 files changed, 9 insertions(+), 4 deletions(-)

--
2.43.0

Jan Kiszka

unread,
Oct 28, 2024, 7:13:30 AM10/28/24
to isar-users, Stefan Koch, Cedric Hombourger, Florian Bezdeka, Clara Kowalsky
From: Jan Kiszka <jan.k...@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.k...@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

Uladzimir Bely

unread,
Nov 4, 2024, 8:54:43 AM11/4/24
to Jan Kiszka, isar-users
Applied to next, thanks.

--
Best regards,
Uladzimir.



Reply all
Reply to author
Forward
0 new messages