3 # Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
4 # Michael Jeanson <mjeanson@efficios.com>
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 # Kernel version compare functions
23 [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ]
27 [ "$1" = "$2" ] && return 1 || verlte
$1 $2
31 [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | tail -n1`" ]
35 [ "$1" = "$2" ] && return 1 || vergte
$1 $2
42 SRCDIR
="${WORKSPACE}/src/lttng-modules"
43 BUILDDIR
="${WORKSPACE}/build"
44 LNXSRCDIR
="${WORKSPACE}/src/linux"
45 LNXBINDIR
="${WORKSPACE}/deps/linux/build"
47 # Create build directory
49 mkdir
-p "${BUILDDIR}"
54 # Fix path to linux src in builddir Makefile
55 sed -i "s#MAKEARGS := -C .*#MAKEARGS := -C ${LNXSRCDIR}#" "${LNXBINDIR}"/Makefile
57 # Get kernel version from source tree
59 KVERSION
=$
(make kernelversion
)
62 # kernels 3.10 to 3.10.13 and 3.11 to 3.11.2 introduce a deadlock in the
63 # timekeeping subsystem. We want those build to fail.
64 if { vergte
"$KVERSION" "3.10" && verlte
"$KVERSION" "3.10.13"; } || \
65 { vergte
"$KVERSION" "3.11" && verlte
"$KVERSION" "3.11.2"; }; then
70 KERNELDIR
="${LNXBINDIR}" make -j${NPROC} V
=1 CONFIG_LTTNG
=m
72 # We expect this build to fail, if it doesn't, fail the job.
73 if [ "$?" -eq 0 ]; then
77 # We have to publish at least one file or the build will fail
78 echo "This kernel is broken, there is a deadlock in the timekeeping subsystem." > "${BUILDDIR}/BROKEN.txt"
85 KERNELDIR
="${LNXBINDIR}" make -j${NPROC} V
=1 CONFIG_LTTNG
=m
87 # Install modules to build dir
88 KERNELDIR
="${LNXBINDIR}" make INSTALL_MOD_PATH
="${BUILDDIR}" modules_install
This page took 0.030585 seconds and 4 git commands to generate.