From: Ryan Eatmon <reatmon@ti.com>
To: Praneeth Bajjuri <praneeth@ti.com>,
Denys Dmytriyenko <denys@konsulko.com>,
<meta-ti@lists.yoctoproject.org>
Subject: [meta-ti][master/kirkstone][PATCH 1/2] linux-ti-staging: Update KERNEL_LOCALVERSION
Date: Wed, 28 Feb 2024 16:16:54 -0600 [thread overview]
Message-ID: <20240228221655.19511-1-reatmon@ti.com> (raw)
The use of KERNEL_LOCALVERSION for controlling the kernel version has
changed recently. Placing the value of KERNEL_LOCALVERSION in
.scmversion was causing it to duplicate the string in the final version.
Instead, drop KERNEL_LOCALVERSION to just identify that it comes from
TI, and that it is an RT kernel. Additionally, place the commit sha for
the kernel into the .scmversion file explicitly to be both backward and
forward compatible.
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
.../recipes-kernel/linux/linux-ti-staging-rt_6.1.bb | 2 ++
meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc | 10 +++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
index e78707f4..b7426aff 100644
--- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
+++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
@@ -1,5 +1,7 @@
require linux-ti-staging_6.1.bb
+KERNEL_LOCALVERSION:append = "-rt"
+
# Look in the generic major.minor directory for files
# This will have priority over generic non-rt path
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:"
diff --git a/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc b/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc
index df7d9ac8..8da90c79 100644
--- a/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc
+++ b/meta-ti-bsp/recipes-kernel/linux/setup-defconfig.inc
@@ -1,6 +1,4 @@
-# KERNEL_LOCALVERSION can be set to add a tag to the end of the
-# kernel version string. such as the commit id
-KERNEL_LOCALVERSION = "-g${@d.getVar('SRCPV', True).replace('AUTOINC+','')[:10]}"
+KERNEL_LOCALVERSION = "-ti"
# Check the defconfig file and see if it points to an in kernel
# defconfig that should be used, or if it is a complete config file
@@ -13,8 +11,10 @@ do_configure() {
# tree config
cp ${WORKDIR}/defconfig ${B}/.config
- echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
- echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+ scm_version=$(printf '%s%s' -g $(git -C ${S} rev-parse --verify HEAD 2>/dev/null | cut -c1-12))
+
+ echo ${scm_version} > ${B}/.scmversion
+ echo ${scm_version} > ${S}/.scmversion
# Zero, when using "tisdk" configs, pass control to defconfig_builder
config=`cat ${B}/.config | grep use-tisdk-config | cut -d= -f2`
--
2.17.1
next reply other threads:[~2024-02-28 22:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 22:16 Ryan Eatmon [this message]
2024-02-28 22:16 ` [meta-ti][master/kirkstone][PATCH 2/2] u-boot-ti: Change from UBOOT_LOCALVERSION and SRCPV Ryan Eatmon
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=20240228221655.19511-1-reatmon@ti.com \
--to=reatmon@ti.com \
--cc=denys@konsulko.com \
--cc=meta-ti@lists.yoctoproject.org \
--cc=praneeth@ti.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).