From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LsBSJI7P1GRq/DwAWB0awg (envelope-from ) for ; Thu, 10 Aug 2023 07:52:46 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=izwD0l6o; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8AA121E0BB; Thu, 10 Aug 2023 07:52:46 -0400 (EDT) Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4A8F61E028 for ; Thu, 10 Aug 2023 07:52:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1691668363; bh=4PHSsU8A84IUUZwVFi4dL3Zeyo6o8vDKY/zNDpUa9Ys=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=izwD0l6o1XAdhxhtJ5N6qGc0cKfrlBFVvX5tQjWojMlwM9T5CYbfVc42+CFyqUN4Z Wwlocws3y6q4XC5uUTmtPLsnk6A/iYyQETPxS7nZhrcAYElkdajNTUZi4bVwySE0eo U5lukIm8icAN18eZBFAZNA1wvXhrUHm8BjVmIr/mg4oO3zmJkED36W7w/NBhHqbQAp 7Yt8QbsPDddouBenarP1uGi5cNrbq3aT+8SeePcBGt9Q+QbtkWP2zRV35w5jvgjeJ1 PeH9TlI6HjLfdH8QwzsygtFZUV6qw7X4h5UiQ0LHvRCpk5CIm5Vx4UzY/CXgc0d9js se4I0zArbbyBA== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4RM4zv5MTtz2Kb0; Thu, 10 Aug 2023 07:52:43 -0400 (EDT) Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lists.lttng.org (Postfix) with ESMTPS id 4RM4zr4wSwz2Kpc for ; Thu, 10 Aug 2023 07:52:40 -0400 (EDT) Received: from [192.168.18.28] (unknown [107.159.1.132]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4RM4zr0ZPzz1KsH; Thu, 10 Aug 2023 07:52:40 -0400 (EDT) Message-ID: Date: Thu, 10 Aug 2023 07:53:39 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Richa Bharti , Michael Jeanson Cc: Richa Bharti , lttng-dev References: <20230810100555.17568-1-Richa_Bharti@mentor.com> In-Reply-To: <20230810100555.17568-1-Richa_Bharti@mentor.com> Subject: Re: [lttng-dev] [PATCH] Fix: list lttng sub-directory in Kbuild X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mathieu Desnoyers via lttng-dev Reply-To: Mathieu Desnoyers Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" On 8/10/23 06:05, Richa Bharti wrote: > From: Richa Bharti 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 > --- > 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