mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] UBIFS generation question
@ 2012-11-01 18:22 Jeff Horn
  2012-11-01 20:37 ` Alexander Dahl
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Horn @ 2012-11-01 18:22 UTC (permalink / raw)
  To: ptxdist


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

Hi,

I currently add the git commit to my BSP by adding this to a custom overlay
rule.

echo $(shell git rev-parse --verify HEAD) > $(ROOTDIR)/etc/revision

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.

I'm on ptxdist-2011.07.0

Thanks in advance,
Jeff

[-- Attachment #1.2: Type: text/html, Size: 790 bytes --]

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

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] UBIFS generation question
  2012-11-01 18:22 [ptxdist] UBIFS generation question Jeff Horn
@ 2012-11-01 20:37 ` Alexander Dahl
  2012-11-02  2:33   ` Jeff Horn
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Dahl @ 2012-11-01 20:37 UTC (permalink / raw)
  To: ptxdist


[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] UBIFS generation question
  2012-11-01 20:37 ` Alexander Dahl
@ 2012-11-02  2:33   ` Jeff Horn
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Horn @ 2012-11-02  2:33 UTC (permalink / raw)
  To: ptxdist


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

Thanks Alex,

I have it all working now.

Jeff


On Thu, Nov 1, 2012 at 1:37 PM, Alexander Dahl <post@lespocky.de> wrote:

> 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
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
>

[-- Attachment #1.2: Type: text/html, Size: 1922 bytes --]

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

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-02  2:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-01 18:22 [ptxdist] UBIFS generation question Jeff Horn
2012-11-01 20:37 ` Alexander Dahl
2012-11-02  2:33   ` Jeff Horn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox