X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=inline;f=built-in.sh;fp=built-in.sh;h=782985f9d332b2e9435f171ef5e136315ac3c0ad;hb=f59ec0bee6032a26808d4bddaafb1d6f3e081725;hp=0000000000000000000000000000000000000000;hpb=50984b44b96011427045f6e294b6b09ba7b8ac1d;p=lttng-modules.git diff --git a/built-in.sh b/built-in.sh new file mode 100755 index 00000000..782985f9 --- /dev/null +++ b/built-in.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +usage() { + echo "usage: $0 " >&2 + exit 1 +} + +[ "$#" -eq 1 ] || usage +KERNEL_DIR="$(readlink --canonicalize-existing "$1")" + +# Symlink the lttng-modules directory in the kernel source +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 >&2 +echo " $0: done." >&2 +echo " $0: now you can build the kernel with LTTng support." >&2 +echo " $0: make sure you enable it (CONFIG_LTTNG) before building." >&2 +echo >&2