All of lore.kernel.org
 help / color / mirror / Atom feed
* Layer versions at runtime
@ 2017-10-12  9:05 Alan Martinovic
  2017-10-12  9:11 ` Ayoub Zaki
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Martinovic @ 2017-10-12  9:05 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

I've noticed that bitbake prints the git commit versions of the layers when
the build starts.

meta-python       = "HEAD:b40116cf457b88a2db14b86fda9627fb34d56ae6"
meta-mender-core  = "HEAD:c3b1b465ce3a27fc7b03a6b7ef596348835cff57"
meta-go           = "HEAD:514b2a80a2a4235687e92fb28328bb3e7c2d6c74"

Does this information find it's way into the rootfs?
If not, any suggestions on how to achieve this?

The goal is to have this info available while the image is running.

Be Well,
Alan

[-- Attachment #2: Type: text/html, Size: 703 bytes --]

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

* Re: Layer versions at runtime
  2017-10-12  9:05 Layer versions at runtime Alan Martinovic
@ 2017-10-12  9:11 ` Ayoub Zaki
  2017-10-12 14:19   ` Philip Balister
  0 siblings, 1 reply; 3+ messages in thread
From: Ayoub Zaki @ 2017-10-12  9:11 UTC (permalink / raw)
  To: yocto

Hi,

That's easy to do :


do_install_append () {

     for layer in ${BBLAYERS}; do
         cd $layer
         echo -n "$(basename $layer) = "  >> ${D}${sysconfdir}/gitinfo
         git rev-parse HEAD >> ${D}${sysconfdir}/gitinfo
     done
}


add it in a recipe or add it to os-release.bbappend


On 12.10.2017 11:05, Alan Martinovic wrote:
> I've noticed that bitbake prints the git commit versions of the layers 
> when the build starts.
>
> meta-python       = "HEAD:b40116cf457b88a2db14b86fda9627fb34d56ae6"
> meta-mender-core  = "HEAD:c3b1b465ce3a27fc7b03a6b7ef596348835cff57"
> meta-go           = "HEAD:514b2a80a2a4235687e92fb28328bb3e7c2d6c74"
>
> Does this information find it's way into the rootfs?
> If not, any suggestions on how to achieve this?
>
> The goal is to have this info available while the image is running.
>
> Be Well,
> Alan
>
>

-- 
Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Tel.     : +4971415074546
Mobile   : +4917662901545
Email    : ayoub.zaki@embexus.com
Homepage : https://embexus.com



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

* Re: Layer versions at runtime
  2017-10-12  9:11 ` Ayoub Zaki
@ 2017-10-12 14:19   ` Philip Balister
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Balister @ 2017-10-12 14:19 UTC (permalink / raw)
  To: Ayoub Zaki, yocto

Or better yet use
http://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-manual.html#ref-classes-image-buildinfo

to get:

-----------------------
Build Configuration:  |
-----------------------
DISTRO = nodistro
DISTRO_VERSION = nodistro.0
-----------------------
Layer Revisions:      |
-----------------------
meta              = master:8ca61a5464743ff85b6d26886112750d6ddd13e0
meta-xilinx       = master:74a0d90e52cca346d05a69bbd628c6ec9e49fbcb
meta-oe           = master:5c9a4a08844c215ebd6f2146f50de753b8e7ecef
meta-networking   = master:5c9a4a08844c215ebd6f2146f50de753b8e7ecef
meta-filesystems  = master:5c9a4a08844c215ebd6f2146f50de753b8e7ecef
meta-python       = master:5c9a4a08844c215ebd6f2146f50de753b8e7ecef
meta-multimedia   = master:5c9a4a08844c215ebd6f2146f50de753b8e7ecef
meta-sdr          = qt5-test:dacc304b01eac7448ec1ebf0b3d0eab761c41a26 --
modified
meta-qt5          = master:2c3ef00f53683fbdce5b390950b49b67da85d3a1
meta-qcom         = master:bae28268a9387bb842ab7bbe8200b98c1210604c
meta-raspberrypi  = master:9d84186870a6f9bde44575690105b9bb5e44ca24

Philip

On 10/12/2017 05:11 AM, Ayoub Zaki wrote:
> Hi,
> 
> That's easy to do :
> 
> 
> do_install_append () {
> 
>     for layer in ${BBLAYERS}; do
>         cd $layer
>         echo -n "$(basename $layer) = "  >> ${D}${sysconfdir}/gitinfo
>         git rev-parse HEAD >> ${D}${sysconfdir}/gitinfo
>     done
> }
> 
> 
> add it in a recipe or add it to os-release.bbappend
> 
> 
> On 12.10.2017 11:05, Alan Martinovic wrote:
>> I've noticed that bitbake prints the git commit versions of the layers
>> when the build starts.
>>
>> meta-python       = "HEAD:b40116cf457b88a2db14b86fda9627fb34d56ae6"
>> meta-mender-core  = "HEAD:c3b1b465ce3a27fc7b03a6b7ef596348835cff57"
>> meta-go           = "HEAD:514b2a80a2a4235687e92fb28328bb3e7c2d6c74"
>>
>> Does this information find it's way into the rootfs?
>> If not, any suggestions on how to achieve this?
>>
>> The goal is to have this info available while the image is running.
>>
>> Be Well,
>> Alan
>>
>>
> 


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

end of thread, other threads:[~2017-10-12 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-12  9:05 Layer versions at runtime Alan Martinovic
2017-10-12  9:11 ` Ayoub Zaki
2017-10-12 14:19   ` Philip Balister

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.