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