Re: Layer versions at runtime

Ayoub Zaki <ayoub.zaki@...>


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

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,

Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Tel. : +4971415074546
Mobile : +4917662901545
Email : ayoub.zaki@...
Homepage :

Join to automatically receive all group messages.