default: 'master'
description: 'The lttng-modules branch to build.'
- string:
- name: 'kversion'
+ name: 'ktag'
default: ''
description: 'The linux kernel git tag to build against.'
- string:
builders:
- shell: |
- git clone --depth=1 -b "$kversion" --reference $HOME/gitcache/linux-stable.git/ "$kgitrepo" src/linux
+ git clone --depth=1 -b "$ktag" --reference $HOME/gitcache/linux-stable.git/ "$kgitrepo" src/linux
- shell:
!include-raw-escape: scripts/lttng-modules/param-build.sh
default: 'master'
description: 'The lttng-modules branch to build.'
- string:
- name: 'kversion'
+ name: 'ktag'
default: ''
description: 'The linux kernel git tag to build against.'
- string:
builders:
- shell: |
- git clone --depth=1 -b "$kversion" --reference $HOME/gitcache/linux-stable.git/ "$kgitrepo" src/linux
+ git clone --depth=1 -b "$ktag" --reference $HOME/gitcache/linux-stable.git/ "$kgitrepo" src/linux
- shell:
!include-raw-escape: scripts/lttng-modules/param-build.sh
def kversion = kversions.pop()
def job_params = [
new StringParameterValue('mversion', mversion),
- new StringParameterValue('kversion', kversion.toString()),
+ new StringParameterValue('ktag', kversion.toString()),
new StringParameterValue('kgitrepo', kgitrepo),
]
// Print results
def matrixParent = currentBuild.get()
allBuilds.add(matrixParent)
- def kernelStr = matrixParent.buildVariableResolver.resolve("kversion")
+ def kernelStr = matrixParent.buildVariableResolver.resolve("ktag")
println "${matrixParent.fullDisplayName} (${kernelStr}) completed with status ${matrixParent.result}"
// Process child runs of matrixBuild
println "---Build report---"
for (b in allBuilds) {
- def kernelStr = b.buildVariableResolver.resolve("kversion")
+ def kernelStr = b.buildVariableResolver.resolve("ktag")
println "${b.fullDisplayName} (${kernelStr}) completed with status ${b.result}"
// Cleanup builds
try {
def kversion = kversions.pop()
def job_params = [
new StringParameterValue('mversion', mversion),
- new StringParameterValue('kversion', kversion.toString()),
+ new StringParameterValue('ktag', kversion.toString()),
new StringParameterValue('kgitrepo', kgitrepo),
]
// Print results
def matrixParent = currentBuild.get()
allBuilds.add(matrixParent)
- def kernelStr = matrixParent.buildVariableResolver.resolve("kversion")
+ def kernelStr = matrixParent.buildVariableResolver.resolve("ktag")
println "${matrixParent.fullDisplayName} (${kernelStr}) completed with status ${matrixParent.result}"
// Process child runs of matrixBuild
println "---Build report---"
for (b in allBuilds) {
- def kernelStr = b.buildVariableResolver.resolve("kversion")
+ def kernelStr = b.buildVariableResolver.resolve("ktag")
println "${b.fullDisplayName} (${kernelStr}) completed with status ${b.result}"
// Cleanup builds
try {
fi
# Generate kernel configuration
- case "$kversion" in
+ case "$ktag" in
Ubuntu*)
fakeroot debian/rules clean
fakeroot debian/rules genconfigs
make arch/powerpc/lib/crtsavres.o CC="$CC" ${koutput}
fi
+ # On arm64 this object is required to build with ftrace support
+ if [ "${karch}" = "arm64" ]; then
+ if vergte "$KVERSION" "4.13-rc1"; then
+ make arch/arm64/kernel/ftrace-mod.o CC="$CC" ${koutput}
+ fi
+ fi
+
# Version specific tasks
- case "$kversion" in
+ case "$ktag" in
Ubuntu*)
# Add Ubuntu ABI number to kernel headers, this is normally done by the packaging code
- ABINUM="$(echo "$kversion" | grep -P -o 'Ubuntu-(lts-)?.*-\K\d+(?=\..*)')"
+ ABINUM="$(echo "$ktag" | grep -P -o 'Ubuntu-(lts-)?.*-\K\d+(?=\..*)')"
echo "#define UTS_UBUNTU_RELEASE_ABI $ABINUM" >> "${outdir}"/include/generated/utsrelease.h
;;
esac
kdir="$1"
bdir="$2"
- # Get kernel version from source tree
- cd "${kdir}"
- kversion=$(make kernelversion)
-
# Enter lttng-modules source dir
cd "${LTTSRCDIR}"
# kernels 3.10 to 3.10.13 and 3.11 to 3.11.2 introduce a deadlock in the
# timekeeping subsystem. We want those build to fail.
- if { vergte "$kversion" "3.10" && verlte "$kversion" "3.10.13"; } || \
- { vergte "$kversion" "3.11" && verlte "$kversion" "3.11.2"; }; then
+ if { vergte "$KVERSION" "3.10" && verlte "$KVERSION" "3.10.13"; } || \
+ { vergte "$KVERSION" "3.11" && verlte "$KVERSION" "3.11.2"; }; then
set +e
# Enter linux source dir
cd "${LNXSRCDIR}"
+# Get kernel version from source tree
+KVERSION=$(make kernelversion)
+
prepare_lnx_sources "."
# For RT kernels, copy version file
cp -a --parents arch/powerpc/lib/crtsavres.[So] "${LNXHDRDIR}/"
fi
+# On arm64 this object is required to build with ftrace support
+if [ "${karch}" = "arm64" ]; then
+ if vergte "$KVERSION" "4.13-rc1"; then
+ cp -a --parents arch/arm64/kernel/ftrace-mod.[So] "${LNXHDRDIR}/"
+ fi
+fi
+
# Copy modules related stuff, if available
if [ -s Module.symvers ]; then
cp Module.symvers "${LNXHDRDIR}"