Patchwork [meta-fsl-ppc,2/2] u-boot: append sdk version into uboot version

login
register
mail settings
Submitter Ting Liu
Date July 10, 2013, 3:45 a.m.
Message ID <1373427901-17397-2-git-send-email-b28495@freescale.com>
Download mbox | patch
Permalink /patch/53421/
State Accepted
Delegated to: Zhenhua Luo
Headers show

Comments

Ting Liu - July 10, 2013, 3:45 a.m.
From: Chunrong Guo <B40290@freescale.com>

Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
 recipes-bsp/u-boot/u-boot_git.bb |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Zhenhua Luo - July 11, 2013, 8:49 a.m.
Applied, thanks. 


Best Regards,

Zhenhua


> -----Original Message-----
> From: Liu Ting-B28495
> Sent: Wednesday, July 10, 2013 11:45 AM
> To: meta-freescale@yoctoproject.org
> Cc: Luo Zhenhua-B19537; Liu Ting-B28495
> Subject: [meta-fsl-ppc][PATCH 2/2] u-boot: append sdk version into uboot
> version
> 
> From: Chunrong Guo <B40290@freescale.com>
> 
> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> ---
>  recipes-bsp/u-boot/u-boot_git.bb |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/recipes-bsp/u-boot/u-boot_git.bb b/recipes-bsp/u-boot/u-
> boot_git.bb
> index c3aa105..008e253 100644
> --- a/recipes-bsp/u-boot/u-boot_git.bb
> +++ b/recipes-bsp/u-boot/u-boot_git.bb
> @@ -39,6 +39,8 @@ EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX}
> CC="${WRAP_TARGET_PREFIX}gcc
> 
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
> 
> +UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition('
> ')[0]}"
> +
>  USRC ?= ""
>  S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}'
> 
> @@ -47,6 +49,12 @@ do_compile () {
>  	unset CFLAGS
>  	unset CPPFLAGS
> 
> +        if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
> +        then
> +            echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
> +            echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
> +        fi
> +
>  	if [ "x${UBOOT_MACHINES}" = "x" ]; then
>  		UBOOT_MACHINES=${UBOOT_MACHINE}
>  	fi
> --
> 1.7.3.4

Patch

diff --git a/recipes-bsp/u-boot/u-boot_git.bb b/recipes-bsp/u-boot/u-boot_git.bb
index c3aa105..008e253 100644
--- a/recipes-bsp/u-boot/u-boot_git.bb
+++ b/recipes-bsp/u-boot/u-boot_git.bb
@@ -39,6 +39,8 @@  EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}"
+
 USRC ?= ""
 S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}'
 
@@ -47,6 +49,12 @@  do_compile () {
 	unset CFLAGS
 	unset CPPFLAGS
 
+        if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
+        then
+            echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
+            echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
+        fi
+
 	if [ "x${UBOOT_MACHINES}" = "x" ]; then
 		UBOOT_MACHINES=${UBOOT_MACHINE}
 	fi