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/>.
19 # Kernel version compare functions
21 [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ]
25 [ "$1" = "$2" ] && return 1 || verlte
$1 $2
29 [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | tail -n1`" ]
33 [ "$1" = "$2" ] && return 1 || vergte
$1 $2
40 SRCDIR
="${WORKSPACE}/lttng-modules"
41 BUILDDIR
="${WORKSPACE}/build"
42 LNXSRCDIR
="${WORKSPACE}/linux"
43 LNXBINDIR
="${WORKSPACE}/deps/linux/build"
45 # Create build directory
47 mkdir
-p "${BUILDDIR}"
52 # Fix path to linux src in builddir Makefile
53 sed -i "s#MAKEARGS := -C .*#MAKEARGS := -C ${LNXSRCDIR}#" "${LNXBINDIR}"/Makefile
55 # Get kernel version from source tree
57 KVERSION
=$
(make kernelversion
)
60 # kernels 3.10 to 3.10.13 and 3.11 to 3.11.2 introduce a deadlock in the
61 # timekeeping subsystem. We want those build to fail.
62 if { vergte
"$KVERSION" "3.10" && verlte
"$KVERSION" "3.10.13"; } || \
63 { vergte
"$KVERSION" "3.11" && verlte
"$KVERSION" "3.11.2"; }; then
68 KERNELDIR
="${LNXBINDIR}" make -j${NPROC} V
=1 CONFIG_LTTNG
=m
70 # We expect this build to fail, if it doesn't, fail the job.
71 if [ "$?" -eq 0 ]; then
75 # We have to publish at least one file or the build will fail
76 echo "This kernel is broken, there is a deadlock in the timekeeping subsystem." > "${BUILDDIR}/BROKEN.txt"
83 KERNELDIR
="${LNXBINDIR}" make -j${NPROC} V
=1 CONFIG_LTTNG
=m
85 # Install modules to build dir
86 KERNELDIR
="${LNXBINDIR}" make INSTALL_MOD_PATH
="${BUILDDIR}" modules_install
This page took 0.031071 seconds and 4 git commands to generate.