* Revision file in images
@ 2012-10-12 15:42 Marc Ferland
2012-10-12 21:51 ` Saul Wold
2012-10-15 6:01 ` Anders Darander
0 siblings, 2 replies; 6+ messages in thread
From: Marc Ferland @ 2012-10-12 15:42 UTC (permalink / raw)
To: yocto
Hi,
Is a revision file populated in the images produced by the build process?
Something listing the revisions of the different layers used. Just like
the "OE Build Configuration" summary.
I'd like to easily identify what a target system currently runs.
Regards,
Marc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Revision file in images
2012-10-12 15:42 Revision file in images Marc Ferland
@ 2012-10-12 21:51 ` Saul Wold
2012-10-15 6:01 ` Anders Darander
1 sibling, 0 replies; 6+ messages in thread
From: Saul Wold @ 2012-10-12 21:51 UTC (permalink / raw)
To: Marc Ferland; +Cc: yocto
On 10/12/2012 08:42 AM, Marc Ferland wrote:
> Hi,
>
> Is a revision file populated in the images produced by the build process?
> Something listing the revisions of the different layers used. Just like
> the "OE Build Configuration" summary.
>
That level of detail no.
> I'd like to easily identify what a target system currently runs.
>
You can identify it based on the /etc/issue file, which contains the
information that you might have set in DISTRO_NAME and DISTRO_VERSION in
your distro.
For example from poky.conf
DISTRO_NAME = "Poky 8.0 (Yocto Project 1.3 Reference Distro)"
DISTRO_VERSION = "1.3+snapshot-${DATE}"
oe-core alone does not se any default name, but version as follows:
DISTRO_VERSION ??= "oe-core.0"
These go into the issue file via the base_files recipe.
Sau!
> Regards,
>
> Marc
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Revision file in images
2012-10-12 15:42 Revision file in images Marc Ferland
2012-10-12 21:51 ` Saul Wold
@ 2012-10-15 6:01 ` Anders Darander
2012-10-15 18:55 ` Marc Ferland
1 sibling, 1 reply; 6+ messages in thread
From: Anders Darander @ 2012-10-15 6:01 UTC (permalink / raw)
To: yocto
* Marc Ferland <ferlandm@sonatest.com> [121012 17:40]:
> Hi,
> Is a revision file populated in the images produced by the build process?
> Something listing the revisions of the different layers used. Just like
> the "OE Build Configuration" summary.
As Saul wrote, I don't know any way of getting this info.
> I'd like to easily identify what a target system currently runs.
In my own project, I'm using something like:
IMAGE_PREPROCESS_COMMAND += "rootfs_update_timestamp ;\
git describe --dirty --long --always
>${IMAGE_ROOTFS}/etc/build ;\
"
This doesn't explicitly put the SHA1's of the included layers into the
rootfs, but it does put my the most recent tag from my top-layer,
together with the number of commits after that tag, and an abreviated version
of the current commits SHA1 into the file /etc/build. This will give me
all info I need.
Cheers,
Anders
> Regards,
> Marc
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
--
Anders Darander
ChargeStorm AB / eStorm AB
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Revision file in images
2012-10-15 6:01 ` Anders Darander
@ 2012-10-15 18:55 ` Marc Ferland
2012-10-15 19:28 ` Paul Eggleton
2012-10-16 5:50 ` Anders Darander
0 siblings, 2 replies; 6+ messages in thread
From: Marc Ferland @ 2012-10-15 18:55 UTC (permalink / raw)
To: yocto
Anders Darander <anders@chargestorm.se> writes:
> * Marc Ferland <ferlandm@sonatest.com> [121012 17:40]:
>
>> Hi,
>
>> Is a revision file populated in the images produced by the build process?
>> Something listing the revisions of the different layers used. Just like
>> the "OE Build Configuration" summary.
>
> As Saul wrote, I don't know any way of getting this info.
>
>
>> I'd like to easily identify what a target system currently runs.
>
> In my own project, I'm using something like:
>
>
> IMAGE_PREPROCESS_COMMAND += "rootfs_update_timestamp ;\
> git describe --dirty --long --always
>>${IMAGE_ROOTFS}/etc/build ;\
> "
>
> This doesn't explicitly put the SHA1's of the included layers into the
> rootfs, but it does put my the most recent tag from my top-layer,
> together with the number of commits after that tag, and an abreviated version
> of the current commits SHA1 into the file /etc/build. This will give me
> all info I need.
>
FYI, I was able to put the SHA1 of each meta data layer by doing:
def print_layers_version(d):
layertext = "Configured metadata layers:\n%s\n" % '\n'.join(get_layers_branch_rev(d))
return layertext
IMAGE_PREPROCESS_COMMAND += "echo "${@print_layers_version(d)}" > /
${IMAGE_ROOTFS}/etc/build; "
Marc
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Revision file in images
2012-10-15 18:55 ` Marc Ferland
@ 2012-10-15 19:28 ` Paul Eggleton
2012-10-16 5:50 ` Anders Darander
1 sibling, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-10-15 19:28 UTC (permalink / raw)
To: Marc Ferland; +Cc: yocto
On Monday 15 October 2012 14:55:28 Marc Ferland wrote:
> Anders Darander <anders@chargestorm.se> writes:
> > * Marc Ferland <ferlandm@sonatest.com> [121012 17:40]:
> >> Hi,
> >>
> >> Is a revision file populated in the images produced by the build process?
> >> Something listing the revisions of the different layers used. Just like
> >> the "OE Build Configuration" summary.
> >
> > As Saul wrote, I don't know any way of getting this info.
> >
> >> I'd like to easily identify what a target system currently runs.
> >
> > In my own project, I'm using something like:
> >
> >
> > IMAGE_PREPROCESS_COMMAND += "rootfs_update_timestamp ;\
> >
> > git describe --dirty --long --always
> >>
> >>${IMAGE_ROOTFS}/etc/build ;\
> >>
> > "
> >
> > This doesn't explicitly put the SHA1's of the included layers into the
> > rootfs, but it does put my the most recent tag from my top-layer,
> > together with the number of commits after that tag, and an abreviated
> > version of the current commits SHA1 into the file /etc/build. This will
> > give me all info I need.
>
> FYI, I was able to put the SHA1 of each meta data layer by doing:
>
> def print_layers_version(d):
> layertext = "Configured metadata layers:\n%s\n" %
> '\n'.join(get_layers_branch_rev(d)) return layertext
>
> IMAGE_PREPROCESS_COMMAND += "echo "${@print_layers_version(d)}" > /
> ${IMAGE_ROOTFS}/etc/build; "
I was going to say earlier I'm planning on adding something like this to OE-
Core for 1.4.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Revision file in images
2012-10-15 18:55 ` Marc Ferland
2012-10-15 19:28 ` Paul Eggleton
@ 2012-10-16 5:50 ` Anders Darander
1 sibling, 0 replies; 6+ messages in thread
From: Anders Darander @ 2012-10-16 5:50 UTC (permalink / raw)
To: yocto
* Marc Ferland <ferlandm@sonatest.com> [121015 20:56]:
> FYI, I was able to put the SHA1 of each meta data layer by doing:
> def print_layers_version(d):
> layertext = "Configured metadata layers:\n%s\n" % '\n'.join(get_layers_branch_rev(d))
> return layertext
> IMAGE_PREPROCESS_COMMAND += "echo "${@print_layers_version(d)}" > /
> ${IMAGE_ROOTFS}/etc/build; "
Ah, nice solution!
That might be something to add to my own /etc/build. You can never get
too much info if some issues turn up...
/Anders
--
Anders Darander
ChargeStorm AB / eStorm AB
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-16 5:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12 15:42 Revision file in images Marc Ferland
2012-10-12 21:51 ` Saul Wold
2012-10-15 6:01 ` Anders Darander
2012-10-15 18:55 ` Marc Ferland
2012-10-15 19:28 ` Paul Eggleton
2012-10-16 5:50 ` Anders Darander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.