mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <post@lespocky.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] UBIFS generation question
Date: Thu, 01 Nov 2012 21:37:26 +0100	[thread overview]
Message-ID: <5092DD86.1080501@lespocky.de> (raw)
In-Reply-To: <CAM7q1LmRPVvme726Se3ZX5NGsRBad_N_u=GevTczXOiwo1QegQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1170 bytes --]

Hei Jeff,

On 01.11.2012 19:22, Jeff Horn wrote:
> echo $(shell git rev-parse --verify HEAD) > $(ROOTDIR)/etc/revision

I personally use `git describe --tags` for this, but that's more a
question of taste.

> That works fine for creating the file in the platform/root directory.  When
> I started to use the UBI image I noticed that file was missing from my root
> filesystem.  I see that the ubi.make script does a targetinstall to
> platform/images/working_dir and then generates the UBI image from there.
>  Which obviously does not have my revision.  How can I fix/modify my line
> above so it makes it into both the root directory and the UBI image.

What about creating the file in projectroot/etc/revision, putting a
placeholder e.g. @REVISION@ in it and using something like this in your
rule:

  @$(call install_alternative, somepackage, 0, 0, 0644, \
    /etc/revision)
  @$(call install_replace, somepackage, /etc/revision, \
    @REVISION@, $(shell git rev-pares --verify HEAD) )

Like this the file gets in the package file and should be installed in
the UBI image. We have a similar approach working in our BSP.

Greets
Alex


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2012-11-01 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 18:22 Jeff Horn
2012-11-01 20:37 ` Alexander Dahl [this message]
2012-11-02  2:33   ` Jeff Horn

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=5092DD86.1080501@lespocky.de \
    --to=post@lespocky.de \
    --cc=ptxdist@pengutronix.de \
    /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