-#!/bin/bash -exu
+#!/bin/bash
#
-# Copyright (C) 2016-2019 - Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2016-2019 Michael Jeanson <mjeanson@efficios.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+set -exu
+
# Parameters
-arch=${arch:-}
+arch=${arch:-amd64}
cross_arch=${cross_arch:-}
ktag=${ktag:-}
kgitrepo=${kgitrepo:-}
set +e
- for cc in gcc-5 gcc-4.8; do
+ for cc in gcc-8 gcc-5 gcc-4.8; do
if "${CROSS_COMPILE:-}${cc}" -I include/ -D__LINUX_COMPILER_H -D__LINUX_COMPILER_TYPES_H -E include/linux/compiler-gcc.h; then
selected_cc="$cc"
break
# Disable riscv64 config generation, we don't have a toolchain on bionic
sed -i 's/riscv64 //' debian.master/etc/kernelconfig
+ # Hack for kernel Ubuntu-hwe-5.8
+ if [ ! -f "debian/compat" ]; then
+ echo "10" > "debian/compat"
+ fi
+
fakeroot debian/rules clean KW_DEFCONFIG_DIR=.
fakeroot debian/rules genconfigs KW_DEFCONFIG_DIR=.
cp CONFIGS/"${ubuntu_config}" .config
# Save the kernel and modules
mkdir -p "$LINUX_INSTOBJ_DIR/boot"
make INSTALL_MOD_PATH="$LINUX_INSTOBJ_DIR" INSTALL_MOD_STRIP=1 modules_install CC="$CC"
- make INSTALL_PATH="$LINUX_INSTOBJ_DIR/boot" install CC="$CC"
+ make INSTALL_MOD_PATH="$LINUX_INSTOBJ_DIR" INSTALL_PATH="$LINUX_INSTOBJ_DIR/boot" install CC="$CC"
rm -f "$LINUX_INSTOBJ_DIR/lib/modules/${krelease}/source" "$LINUX_INSTOBJ_DIR/lib/modules/${krelease}/build"
ln -s ../../../../sources "$LINUX_INSTOBJ_DIR/lib/modules/${krelease}/source"
ln -s ../../../../sources "$LINUX_INSTOBJ_DIR/lib/modules/${krelease}/source"
kversion=$(make -C "$LINUX_HDROBJ_DIR" -s kernelversion)
+ # Try to catch some compatibility problems by turning some
+ # warnings into errors.
+ #export KCFLAGS="$KCFLAGS -Wall -Werror"
+
# Enter lttng-modules source dir
cd "${MODULES_GIT_DIR}"