From c0849ee1f49bc0c0d84095feaf210f6a3ea7bd46 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 31 Aug 2023 11:00:04 -0400 Subject: [PATCH] jjb: lttng-modules: adjust kernel version ranges in param build patches Change-Id: Ia70e1eedd6435d02095b1c1e898fb4f0665e5949 Signed-off-by: Michael Jeanson --- scripts/lttng-modules/param-build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index d88ac71..5ffffd2 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -387,7 +387,8 @@ build_linux_kernel() { patch_linux_kernel 9feeb638cde083c737e295c0547f1b4f28e99583 fi - if { vergte "${kversion}" "4.12"; } && { verlt "${kversion}" "4.19"; } ; then + if ( { vergte "${kversion}" "4.12"; } && { verlt "${kversion}" "4.20.17"; } ) || \ + ( { vergte "${kversion}" "5.0"; } && { verlt "${kversion}" "5.0.12"; } ) ; then # Old kernels can fail to build while on newer host kernels with errors # such as: # In file included from scripts/selinux/genheaders/genheaders.c:19: @@ -487,7 +488,8 @@ EOF patch_linux_kernel 9f73bd8bb445e0cbe4bcef6d4cfc788f1e184007 fi - if [ "${kversion}" == "4.6.7" ] ; then + if ( { vergte "${kversion}" "4.4"; } && { verlt "${kversion}" "4.4.136"; } ) || + ( { vergte "${kversion}" "4.5"; } && { verlt "${kversion}" "4.8"; } ); then # Hacky patch to deal with the following build error: # Cannot find symbol for section 7: .text.unlikely. # kernel/kexec_file.o: failed @@ -513,6 +515,11 @@ EOF scripts/config --disable CONFIG_GCOV_KERNEL fi + if { vergte "${kversion}" "4.5"; } && { verlt "${kversion}" "4.5.5"; } ; then + # drivers/staging/wilc1000/wilc_spi.c:123:34: error: storage size of ‘wilc1000_spi_ops’ isn’t known + patch_linux_kernel ce7b516f3f9e11fe4ee06fad0d7e853bb6e8f160 + fi + # Newer binutils don't accept 3 operand 'cmp' instructions on ppc64 # Convert them to 'cmpw' which was previously done silently if verlt "$kversion" "4.9"; then -- 2.34.1