From: Uladzimir Bely <ubely@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
"Arjunan, Srinu (FT FDS CES LX PBU 2)" <srinuvasan.a@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH v3 2/2] linux-custom: Add a provision to support CONFIG_LOCALVERSION_AUTO
Date: Fri, 25 Oct 2024 16:13:47 +0300 [thread overview]
Message-ID: <19e24d8e7b06465b0553cb95f2985b91466b220d.camel@ilbers.de> (raw)
In-Reply-To: <2b65e7e2-49ac-4a67-a3be-5641b7ab89fe@siemens.com>
On Fri, 2024-10-25 at 11:09 +0200, 'Jan Kiszka' via isar-users wrote:
> On 25.10.24 07:14, Arjunan, Srinu (FT FDS CES LX PBU 2) wrote:
> > Hi Jan,
> >
> > Addressed the suggested points, Please confirm is
> > this changes in V3 is fine or still need to look any changes?
>
> Looks good to me now.
>
> Jan
>
> >
Just one more addition for patch v1. Since a new machine config is
added, it is worth having kas menu item for it as well.
Running `scripts/generate_yaml.sh` should help with it, but manual
editing of Kconfig files (distro/ and machine/) is also required.
> > Many thanks,
> > Srinu
> >
> > -----Original Message-----
> > From: Arjunan, Srinu (FT FDS CES LX PBU 2)
> > <srinuvasan.a@siemens.com>
> > Sent: 24 October 2024 11:39
> > To: isar-users@googlegroups.com
> > Cc: Hombourger, Cedric (FT FDS CES LX)
> > <cedric.hombourger@siemens.com>; Kiszka, Jan (FT RPD CED)
> > <jan.kiszka@siemens.com>; Arjunan, Srinu (FT FDS CES LX PBU 2)
> > <srinuvasan.a@siemens.com>
> > Subject: [PATCH v3 2/2] linux-custom: Add a provision to support
> > CONFIG_LOCALVERSION_AUTO
> >
> > From: srinuvasan <srinuvasan.a@siemens.com>
> >
> > This change might be useful for downstream layers to set
> > CONFIG_LOCALVERSION_AUTO in their base defconfig to append the
> > version automatically to the kernel release.
> >
> > Presently ISAR doesn't have this support, hence add this provision.
> >
> > Here we try to find the CONFIG_LOCALVERSION_AUTO availability and
> > .git present during build the kernel package, unfortunately we are
> > not getting the .git directory in the dpkg_build stage even if we
> > are fetching the git repo, this is due to sbuild always using the
> > sources (dsc) file to build the package, when we generate the dsc
> > file it creates the tar ball without .git, hence during the
> > dpkg_build stage it is not possible to get the latest commit HEAD
> > value using "git rev-parse --verify HEAD"
> >
> > To solve this issue, we have base .config and .git available in the
> > do_dpkg_source stage, here we try to find the latest commit and
> > write them into .scmversion file, later during the kernel build
> > package stage we are calling the kernelrelease target to set the
> > localversion, this setlocalversion script handle the availability
> > of .scmversion file and append the string accordingly to the
> > kernelrelease.
> >
> > Added qemuamd64-cip BSP to demonstrate this feature.
> >
> > Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> > ---
> > meta-isar/recipes-kernel/linux/files/x86_64_defconfig | 2 +-
> > .../linux/files/debian/isar/version.cfg.tmpl | 1 -
> > meta/recipes-kernel/linux/linux-custom.inc | 10
> > ++++++++++
> > 3 files changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
> > b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
> > index f3bafe00..c27a5a61 100644
> > --- a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
> > +++ b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
> > @@ -1,6 +1,6 @@
> > # Copy of linux/arch/x86/configs/x86_64_defconfig for
> > demonstration purposes
> >
> > -# CONFIG_LOCALVERSION_AUTO is not set
> > +CONFIG_LOCALVERSION_AUTO=y
> > CONFIG_SYSVIPC=y
> > CONFIG_POSIX_MQUEUE=y
> > CONFIG_BSD_PROCESS_ACCT=y
> > diff --git a/meta/recipes-
> > kernel/linux/files/debian/isar/version.cfg.tmpl b/meta/recipes-
> > kernel/linux/files/debian/isar/version.cfg.tmpl
> > index 17effe52..1ab699f5 100644
> > --- a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
> > @@ -1,2 +1 @@
> > CONFIG_LOCALVERSION="${LINUX_VERSION_EXTENSION}"
> > -# CONFIG_LOCALVERSION_AUTO is not set
> > diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> > b/meta/recipes-kernel/linux/linux-custom.inc
> > index 0f23d6f0..bf6c879b 100644
> > --- a/meta/recipes-kernel/linux/linux-custom.inc
> > +++ b/meta/recipes-kernel/linux/linux-custom.inc
> > @@ -296,6 +296,16 @@ EOF
> > done
> > }
> >
> > +get_localversion_auto() {
> > + if grep -q "^CONFIG_LOCALVERSION_AUTO=y"
> > ${S}/${KERNEL_BUILD_DIR}/.config; then
> > + cd ${S}
> > + if head=$(git rev-parse --verify --short HEAD
> > 2>/dev/null); then
> > + echo "-g${head}" >${S}/.scmversion
> > + fi
> > + fi
> > +}
> > +
> > do_dpkg_source:prepend() {
> > dpkg_configure_kernel
> > + get_localversion_auto
> > }
> > --
> > 2.39.5
> >
>
> --
> Siemens AG, Technology
> Linux Expert Center
>
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/19e24d8e7b06465b0553cb95f2985b91466b220d.camel%40ilbers.de.
next prev parent reply other threads:[~2024-10-25 13:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 11:58 [RFC][PATCH v1] " srinuvasan.a via isar-users
2024-10-22 13:17 ` 'Jan Kiszka' via isar-users
2024-10-23 12:53 ` [PATCH v2 1/2] add new machine qemuamd64-cip and corresponding mc srinuvasan.a via isar-users
2024-10-23 12:53 ` [PATCH v2 2/2] linux-custom: Add a provision to support CONFIG_LOCALVERSION_AUTO srinuvasan.a via isar-users
2024-10-23 12:54 ` 'Arjunan, Srinu' via isar-users
2024-10-23 16:04 ` 'Jan Kiszka' via isar-users
2024-10-23 16:26 ` 'Arjunan, Srinu' via isar-users
2024-10-23 16:31 ` 'Jan Kiszka' via isar-users
2024-10-23 16:43 ` 'Arjunan, Srinu' via isar-users
2024-10-23 16:02 ` [PATCH v2 1/2] add new machine qemuamd64-cip and corresponding mc 'Jan Kiszka' via isar-users
2024-10-24 6:09 ` [PATCH v3 " srinuvasan.a via isar-users
2024-10-24 6:09 ` [PATCH v3 2/2] linux-custom: Add a provision to support CONFIG_LOCALVERSION_AUTO srinuvasan.a via isar-users
2024-10-25 5:14 ` 'Arjunan, Srinu' via isar-users
2024-10-25 9:09 ` 'Jan Kiszka' via isar-users
2024-10-25 13:13 ` Uladzimir Bely [this message]
2024-10-26 1:55 ` [PATCH v4 1/2] add new machine qemuamd64-cip and corresponding mc srinuvasan.a via isar-users
2024-10-26 1:55 ` [PATCH v4 2/2] linux-custom: Add a provision to support CONFIG_LOCALVERSION_AUTO srinuvasan.a via isar-users
2024-11-04 13:52 ` [PATCH v4 1/2] add new machine qemuamd64-cip and corresponding mc Uladzimir Bely
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=19e24d8e7b06465b0553cb95f2985b91466b220d.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=srinuvasan.a@siemens.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