Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Denys Dmytriyenko" <denis@denix.org>
To: Otavio Salvador <otavio.salvador@ossystems.com.br>
Cc: OpenEmbedded Core Mailing List
	<openembedded-core@lists.openembedded.org>,
	Tom Rini <trini@konsulko.com>, Stefano Babic <sbabic@denx.de>,
	Otavio Salvador <otavio@ossystems.com.br>
Subject: Re: [OE-core] [PATCH] u-boot: Add UBOOT_LOCALVERSION_AUTO support
Date: Tue, 31 Mar 2020 14:47:10 -0400	[thread overview]
Message-ID: <20200331184710.GO1578@denix.org> (raw)
In-Reply-To: <CAP9ODKpgo=WJuR5CupXuGmMLSiYxvDrHBbur1Q93+OVc1OMvcQ@mail.gmail.com>

On Tue, Mar 31, 2020 at 03:18:41PM -0300, Otavio Salvador wrote:
> Hello Denys,
> 
> On Tue, Mar 31, 2020 at 3:07 PM Denys Dmytriyenko <denis@denix.org> wrote:
> > On Tue, Mar 31, 2020 at 02:46:41PM -0300, Otavio Salvador wrote:
> > > Add the Git revision used for the build. It is very useful especially when
> > > using custom or vendor U-Boot forks so we can map a binary to a specific
> > > source revision. Valid values are "0" or "1".
> >
> > Well, UBOOT_LOCALVERSION was originally added specifically for this purpose -
> > to be able to append git hash.
> 
> Not really; it kinda of maps to what Linux kernel provides and it is a
> "suffix" for the version. For example "-ti" to imply it came from a
> Texas Instruments fork.

There are multiple uses and you can append anything you want. Here's the 
original patch that specifically mentions adding git hash, as an example:
https://lists.openembedded.org/g/openembedded-core/topic/72204283


> > > This is based on a class which has been in use in `meta-freescale` BSP
> > > for years and has been very useful especially for custom U-Boot releases
> > > as it allow we to know the exact Git revision used for the binary.
> >
> > And in meta-ti BSP we've used for many years:
> > UBOOT_LOCALVERSION = "-g${@get_git_revision('${S}')}"
> >
> > And get_git_revision() just calls "git rev-parse HEAD"
> >
> > So, it seems a bit redundant to add another variable for this...
> 
> How I use this is:
> 
> UBOOT_LOCALVERSION = "-updatehub"
> UBOOT_LOCALVERSION_AUTO = "1"
> 
> I think it is way easier for users to do that. Using inline Python
> code is possible but it is not something I qualify as user friendly.

UBOOT_LOCALVERSION = "-updatehub-g${SRCPV}"

-- 
Denys

  reply	other threads:[~2020-03-31 18:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 17:46 [PATCH] u-boot: Add UBOOT_LOCALVERSION_AUTO support Otavio Salvador
2020-03-31 18:07 ` [OE-core] " Denys Dmytriyenko
2020-03-31 18:18   ` Otavio Salvador
2020-03-31 18:47     ` Denys Dmytriyenko [this message]
2020-03-31 19:20       ` Otavio Salvador

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=20200331184710.GO1578@denix.org \
    --to=denis@denix.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=otavio.salvador@ossystems.com.br \
    --cc=otavio@ossystems.com.br \
    --cc=sbabic@denx.de \
    --cc=trini@konsulko.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