Fix: lttng-tracepoint module notifier should return NOTIFY_OK
[deliverable/lttng-modules.git] / scripts / built-in.sh
CommitLineData
f59ec0be 1#!/bin/bash
6c27a5cc 2# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
f59ec0be
MJ
3
4set -e
5
6usage() {
7 echo "usage: $0 <kernel source tree>" >&2
8 exit 1
9}
10
11[ "$#" -eq 1 ] || usage
12KERNEL_DIR="$(readlink --canonicalize-existing "$1")"
13
14# Symlink the lttng-modules directory in the kernel source
15ln -sf "$(pwd)" "${KERNEL_DIR}/lttng"
16
17# Graft ourself to the kernel build system
18echo 'source "lttng/Kconfig"' >> "${KERNEL_DIR}/Kconfig"
19sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile"
20
21echo >&2
22echo " $0: done." >&2
23echo " $0: now you can build the kernel with LTTng support." >&2
24echo " $0: make sure you enable it (CONFIG_LTTNG) before building." >&2
25echo >&2
This page took 0.059048 seconds and 5 git commands to generate.