X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-modules%2Fparam-build.sh;h=e8709d2e0200bbbed7beda97d9b92d15442554ea;hb=4d27af8f99434c6dcadf1d22430d4e8a27b8bee2;hp=0ce165a7aca1d2b67a542a8868d3d1bf9d160970;hpb=105282023d5ba6bc9fcdd0d268e9a1a4e0476d5e;p=lttng-ci.git diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index 0ce165a..e8709d2 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -32,6 +32,7 @@ verlte() { } verlt() { + # shellcheck disable=SC2015 [ "$1" = "$2" ] && return 1 || verlte "$1" "$2" } @@ -40,13 +41,22 @@ vergte() { } vergt() { + # shellcheck disable=SC2015 [ "$1" = "$2" ] && return 1 || vergte "$1" "$2" } git_clone_modules_sources() { mkdir -p "$MODULES_GIT_DIR" - git clone --depth=1 -b "${mversion}" "${mgitrepo}" "$MODULES_GIT_DIR" + + # If the version starts with "refs/", checkout the specific git ref, otherwise treat it + # as a branch name. + if [ "${mversion:0:5}" = "refs/" ]; then + git clone --no-tags --depth=1 "${mgitrepo}" "$MODULES_GIT_DIR" + (cd "$MODULES_GIT_DIR" && git fetch origin "${mversion}" && git checkout FETCH_HEAD) + else + git clone --no-tags --depth=1 -b "${mversion}" "${mgitrepo}" "$MODULES_GIT_DIR" + fi } # Checkout a shallow kernel tree of the specified tag @@ -140,6 +150,15 @@ build_linux_kernel() { exit 0 fi fi + + # 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 @@ -270,7 +289,7 @@ build_linux_kernel() { # 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" @@ -590,7 +609,13 @@ signature_v2 = False" > "$WORKSPACE/.s3cfg" url_hash="$(echo -n "$kgitrepo" | md5sum | awk '{ print $1 }')" obj_name="linux.tar.bz2" -obj_url_prefix="$OBJ_STORE_URL/linux-build/$url_hash/$ktag/$arch/${cross_arch:-native}" + +if [ "x${cross_arch}" = "x" ]; then + obj_url_prefix="$OBJ_STORE_URL/linux-build/$url_hash/$ktag/$arch/native" +else + obj_url_prefix="$OBJ_STORE_URL/linux-build/$url_hash/$ktag/${cross_arch}" +fi + obj_url="$obj_url_prefix/$obj_name" set +e