]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-imx.inc: Use the new fsl-kernel-localversion class
authorOtavio Salvador <otavio@ossystems.com.br>
Mon, 1 Sep 2014 14:20:31 +0000 (11:20 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 1 Sep 2014 15:18:36 +0000 (12:18 -0300)
This uses the new class for LOCALVERSION handling, dropping the old
code. The local version is set for '+imx' by default but can be
overriden by users of this .inc file.

Change-Id: Ib571e17c250473b923b31837954942ca5bacb61b
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-kernel/linux/linux-imx.inc

index 47566b08c8f5d5c4c677cc15174aca391838a25a..dd4540e6d676757b013647d3a9983959c022e07a 100644 (file)
@@ -4,7 +4,7 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-inherit kernel
+inherit kernel fsl-kernel-localversion
 
 # Put a local version until we have a true SRCREV to point to
 LOCALVERSION ?= "+yocto"
@@ -19,29 +19,3 @@ S = "${WORKDIR}/git"
 # We need to pass it as param since kernel might support more then one
 # machine, with different entry points
 KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
-
-kernel_conf_variable() {
-       CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
-       if test "$2" = "n"
-       then
-               echo "# CONFIG_$1 is not set" >> ${S}/.config
-       else
-               echo "CONFIG_$1=$2" >> ${S}/.config
-       fi
-}
-
-do_configure_prepend() {
-       echo "" > ${S}/.config
-       CONF_SED_SCRIPT=""
-
-       kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
-       kernel_conf_variable LOCALVERSION_AUTO y
-
-       sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config'
-
-       if [ "${SCMVERSION}" = "y" ]; then
-               # Add GIT revision to the local version
-               head=`git rev-parse --verify --short HEAD 2> /dev/null`
-               printf "%s%s" +g $head > ${S}/.scmversion
-       fi
-}