Skip to contentSkip to conversation

u-boot: Fix out-of-tree builds

PATCH In review Gary Thomas 2 participants 2 messages Aug 20, 2016 – Aug 22, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot: Fix out-of-tree builds

Recent changes to the main u-boot recipe builds in a separate tree which broke the segment of this code that attempts to find the GIT revision (not in correct directory). This patch adjusts that by forcing the git command to run in the correct location.

---
 classes/fsl-u-boot-localversion.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/fsl-u-boot-localversion.bbclass +1 -1
index f7e0971..69a0fd4 100644
@@ -17,7 +17,7 @@ UBOOT_LOCALVERSION = "${LOCALVERSION}"
 do_compile_prepend() {
 	if [ "${SCMVERSION}" = "y" ]; then
 		# Add GIT revision to the local version
-		head=`git rev-parse --verify --short HEAD 2> /dev/null`
+		head=`cd ${S};git rev-parse --verify --short HEAD 2> /dev/null`
 		printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${S}/.scmversion
 		printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${B}/.scmversion
     else
Signature · 1 line
2.7.4
#1 lore raw
Quoted 6 lines · Gary Thomas

Recent changes to the main u-boot recipe builds in a separate tree which broke the segment of this code that attempts to find the GIT revision (not in correct directory). This patch adjusts that by forcing the git command to run in the correct location.

I merged the patch I did on Friday to fix; I saw you did the same change after I had it merged, sorry for that.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750