Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure yocto to use the latest git commit?

I am a very lazy person. While working on a HW/SW project the software changes permanently. In this development stage, changing the commit/reversion-tags in the recipes is very nasty. I want Yocto to fetch the latest git commit. Is this possible/How to do this? My example recipe:

SUMMARY = "my test"
SECTION = "test"
LICENSE = "CLOSED"

inherit cmake
SRCREV = "f9bdbd6c631f07e427c010086c7c26a95eb2924e"

SRC_URI = "gitsm://myGit/mytest;protocol=http;branch=develop"

S = "${WORKDIR}/git/"
like image 635
Stefan Jaritz Avatar asked Jul 14 '16 09:07

Stefan Jaritz


1 Answers

Sure, set SRCREV = "${AUTOREV}".

Furthermore, you need to reference SRCPV in PV in order to automatically update the version whenever the revision of the source code changes. Here is an example:

 PV = "1.0+git${SRCPV}"

Then it'll build the latest revision each time.

like image 187
Anders Avatar answered Oct 21 '22 03:10

Anders