From f69b21d39feca9a4d71d53980fc5c9917ba6c5ac Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 20 Dec 2014 17:11:24 -0200 Subject: fsl-kernel-localversion.bbclass: Fix building using out-of-tree Since OE-Core:df9975f4 (kernel: Fix non linux-yocto builds) the way the build of kernel is done has change. Now the source code is moved placed at STAGING_KERNEL_DIR and the build is done at ${WORKDIR}/build which is B. This patch adapts the configure task prepending to cope with those changes. Change-Id: I9ea4254ffd56e4b7201daf9a90b52756a399c0f6 Signed-off-by: Otavio Salvador --- classes/fsl-kernel-localversion.bbclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'classes') diff --git a/classes/fsl-kernel-localversion.bbclass b/classes/fsl-kernel-localversion.bbclass index bb4bdf5..6f9eb51 100644 --- a/classes/fsl-kernel-localversion.bbclass +++ b/classes/fsl-kernel-localversion.bbclass @@ -16,24 +16,24 @@ 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 + echo "# CONFIG_$1 is not set" >> ${B}/.config else - echo "CONFIG_$1=$2" >> ${S}/.config + echo "CONFIG_$1=$2" >> ${B}/.config fi } do_configure_prepend() { - echo "" > ${S}/.config + echo "" > ${B}/.config CONF_SED_SCRIPT="" kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\"" kernel_conf_variable LOCALVERSION_AUTO y - sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config' + sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.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 + head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s" +g $head > ${B}/.scmversion fi } -- cgit v1.2.3-54-g00ecf