X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=scripts%2Fbuilt-in.sh;h=5e57e9341c03f6c0ab4e05a6cfcb68197d2e6d42;hb=HEAD;hp=d9720230e6a9e69de5e73bc90c5accbcb726952d;hpb=b7cdc18250880cc44edeef4a4b42c8ac7a135a6d;p=lttng-modules.git diff --git a/scripts/built-in.sh b/scripts/built-in.sh index d9720230..5c580422 100755 --- a/scripts/built-in.sh +++ b/scripts/built-in.sh @@ -15,8 +15,14 @@ KERNEL_DIR="$(readlink --canonicalize-existing "$1")" ln -sf "$(pwd)" "${KERNEL_DIR}/lttng" # Graft ourself to the kernel build system -echo 'source "lttng/Kconfig"' >> "${KERNEL_DIR}/Kconfig" -sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile" +echo 'source "lttng/src/Kconfig"' >> "${KERNEL_DIR}/Kconfig" + +# In kernel v6.1, subdirectories were moved to Kbuild +if grep -qE '^obj-y[[:space:]]+\+= kernel/' "${KERNEL_DIR}/Kbuild"; then + echo 'obj-y += lttng/' >> "${KERNEL_DIR}/Kbuild" +else + sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile" +fi echo >&2 echo " $0: done." >&2