Utils: Add a new Version module
authorJuan Gutierrez <jgutierrez@ti.com>
Thu, 12 Jul 2012 01:25:07 +0000 (20:25 -0500)
committerSuman Anna <s-anna@ti.com>
Tue, 14 Aug 2012 02:56:12 +0000 (21:56 -0500)
commit00b10a51ae3264e603432ea3dd819df1b9ad8f24
tree7604c9c72baef9a57043cd4b0eb805e9a6f67336
parentf9661e349930dae55c006d8829bbba6d0f09c24a
Utils: Add a new Version module

A new module, Version, is added to retrieve and present the
version and tools information associated with the ELF base
images. The information is retrieved during link phase and
stored in a non-loadable section named ".version".

The version information comprises of the git tag, branch and
top most commit information (only when the image is built
from source code stored on a git repository).

The information is retrieved automatically when the module
is included in the base-image configuration file.
    var Version = xdc.useModule('ti.utils.Version');

The version information can be read using the standard ELF
utility, as
    readelf -p .version <base_image>

The version information can also be completely overridden by
the user to add his own generated details.
  Eg:
    Version.custom = "My custom version";

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
src/.gitignore
src/ti/utils/Version.c [new file with mode: 0644]
src/ti/utils/Version.xdc [new file with mode: 0644]
src/ti/utils/Version.xdt [new file with mode: 0644]
src/ti/utils/Version.xs [new file with mode: 0644]
src/ti/utils/package.bld [new file with mode: 0644]
src/ti/utils/package.xdc [new file with mode: 0644]
src/ti/utils/package.xs [new file with mode: 0644]