From: Mathieu Desnoyers via lttng-dev <lttng-dev@lists.lttng.org>
To: Richa Bharti <Richa_Bharti@mentor.com>,
Michael Jeanson <mjeanson@efficios.com>
Cc: Richa Bharti <Richa.Bharti@siemens.com>,
lttng-dev <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] [PATCH] Fix: list lttng sub-directory in Kbuild
Date: Thu, 10 Aug 2023 07:53:39 -0400 [thread overview]
Message-ID: <c7705847-7373-47ba-884e-fe5f3e8df785@efficios.com> (raw)
In-Reply-To: <20230810100555.17568-1-Richa_Bharti@mentor.com>
On 8/10/23 06:05, Richa Bharti wrote:
> From: Richa Bharti <Richa.Bharti@siemens.com>
Hi!
Thanks for your patch. I'm adding Michael Jeanson and the lttng-dev
mailing list in CC.
Thanks,
Mathieu
>
> * Linux kernel>=6.1 reads sub-directory from Kbuild
> * Kernel < 6.1 reads sub-directory from Makefile
>
> Signed-off-by: Richa Bharti <Richa.Bharti@siemens.com>
> ---
> scripts/built-in.sh | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/built-in.sh b/scripts/built-in.sh
> index f0594ec..2451230 100755
> --- a/scripts/built-in.sh
> +++ b/scripts/built-in.sh
> @@ -14,9 +14,19 @@ KERNEL_DIR="$(readlink --canonicalize-existing "$1")"
> # Symlink the lttng-modules directory in the kernel source
> ln -sf "$(pwd)" "${KERNEL_DIR}/lttng"
>
> +# Get kernel version from Makefile
> +version=$(grep -m 1 VERSION ${KERNEL_DIR}/Makefile | sed 's/^.*= //g')
> +patchlevel=$(grep -m 1 PATCHLEVEL ${KERNEL_DIR}/Makefile | sed 's/^.*= //g')
> +kernel_version=${version}.${patchlevel}
> +
> # Graft ourself to the kernel build system
> echo 'source "lttng/src/Kconfig"' >> "${KERNEL_DIR}/Kconfig"
> -sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile"
> +
> +if awk "BEGIN {exit !(${kernel_version} >= 6.1)}"; 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
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
parent reply other threads:[~2023-08-10 11:52 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20230810100555.17568-1-Richa_Bharti@mentor.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c7705847-7373-47ba-884e-fe5f3e8df785@efficios.com \
--to=lttng-dev@lists.lttng.org \
--cc=Richa.Bharti@siemens.com \
--cc=Richa_Bharti@mentor.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mjeanson@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox