diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2012-10-02 11:50:45 -0300 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2012-10-02 15:08:38 -0300 |
| commit | cfa2a47d2016bcdf96143213cdf47a5397a898c8 (patch) | |
| tree | ebf009e0d60e5508c5cfd5d2eb27792dd8b838e7 | |
| parent | f221623b6e1394e76613b727844cbfa27ed03b14 (diff) | |
| download | meta-fsl-arm-cfa2a47d2016bcdf96143213cdf47a5397a898c8.tar.gz | |
linux-imx.inc: Add support to include GIT hash in local version
When SCMVERSION is 'y' the GIT version is include in the local version
along the value at LOCALVERSION setting.
Change-Id: I973c2d098910c88db6e26ee6006fadaa23c09204
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| -rw-r--r-- | recipes-kernel/linux/linux-imx.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/recipes-kernel/linux/linux-imx.inc b/recipes-kernel/linux/linux-imx.inc index 6909582..06a10f1 100644 --- a/recipes-kernel/linux/linux-imx.inc +++ b/recipes-kernel/linux/linux-imx.inc | |||
| @@ -5,12 +5,13 @@ DESCRIPTION = "Linux kernel for imx platforms" | |||
| 5 | LICENSE = "GPLv2" | 5 | LICENSE = "GPLv2" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
| 7 | 7 | ||
| 8 | INC_PR = "r30" | 8 | INC_PR = "r31" |
| 9 | 9 | ||
| 10 | inherit kernel | 10 | inherit kernel |
| 11 | 11 | ||
| 12 | # Put a local version until we have a true SRCREV to point to | 12 | # Put a local version until we have a true SRCREV to point to |
| 13 | LOCALVERSION ?= "+yocto-${DATE}" | 13 | LOCALVERSION ?= "+yocto" |
| 14 | SCMVERSION ?= "y" | ||
| 14 | 15 | ||
| 15 | SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git \ | 16 | SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git \ |
| 16 | file://defconfig \ | 17 | file://defconfig \ |
| @@ -36,6 +37,12 @@ do_configure_prepend() { | |||
| 36 | kernel_conf_variable LOCALVERSION_AUTO n | 37 | kernel_conf_variable LOCALVERSION_AUTO n |
| 37 | 38 | ||
| 38 | sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config' | 39 | sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config' |
| 40 | |||
| 41 | if [ "${SCMVERSION}" = "y" ]; then | ||
| 42 | # Add GIT revision to the local version | ||
| 43 | head=`git rev-parse --verify --short HEAD 2> /dev/null` | ||
| 44 | printf "%s%s" +g $head > ${S}/.scmversion | ||
| 45 | fi | ||
| 39 | } | 46 | } |
| 40 | 47 | ||
| 41 | # install nedded headers for imx-test compilation | 48 | # install nedded headers for imx-test compilation |
