From 780f6285f0c5ee0028893b00b25b6a5778e7c5a2 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 28 Jan 2022 14:33:24 -0500 Subject: [PATCH] jjb: lttng-modules: fix kernel build >= 5.17 Starting with 5.17, the 'auto.conf' file syntax differs from '.config'. Stop overwriting it, only copy '.config' for older kernels where 'auto.conf' is missing. Change-Id: I917104c0f43fadfc61f292b0b43d3b4cdc6650b7 Signed-off-by: Michael Jeanson --- scripts/lttng-modules/param-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index 3a71365..902ee72 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -390,7 +390,9 @@ extract_distro_headers() { touch -r "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/generated/autoconf.h" # Copy .config to include/config/auto.conf so "make prepare" is unnecessary. - cp "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/config/auto.conf" + if [ ! -f "${LINUX_HDROBJ_DIR}/include/config/auto.conf" ]; then + cp "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/config/auto.conf" + fi # Finally clean the object files from the full source tree make clean -- 2.34.1