Anders Darander <and...@chargestorm.se> writes: > * Marc Ferland <ferla...@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 _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto