Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Repository information during build
@ 2015-01-11 20:29 Thomas Ruschival
  2015-01-11 21:05 ` Bernd Kuhls
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Ruschival @ 2015-01-11 20:29 UTC (permalink / raw)
  To: buildroot

In a cmake project I use a git and some cmake-macros to extract the current
commit hash of the source code and generate a C file with the information.
This way the executable can print out with the revision.

Using Buildroot this aproach fails rather obviously. (Buildroot clones the
repository, checks out the requested branch/tag/commit and generates a
tarball without the git information which is used for build)

I extended the CMakeLists of the project, The git-revision can be also
passed as definition (cmake -DGIT_COMMIT_HASH=12345 ....) and cmake only
uses git to get the commit hash if it is not defined.

Is there a canonical way to access the git revision of a package in the
package.mk file to pass it to the build of the package?

I.e. how do I find out the revision of the "master" branch Buildroot used
to create the tarball?

Thanks in advance & Best regards
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150111/06770916/attachment.html>

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

end of thread, other threads:[~2015-01-12  8:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-11 20:29 [Buildroot] Repository information during build Thomas Ruschival
2015-01-11 21:05 ` Bernd Kuhls
2015-01-11 22:17   ` Thomas Ruschival
2015-01-12  8:17     ` Jeremy Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox