From fa12bf7c997331bd4dca2f642bbbc3bdf4c490f0 Mon Sep 17 00:00:00 2001 From: Stefan Sicleru Date: Fri, 26 Feb 2016 16:53:32 +0100 Subject: kernel: copy cfg fragments to kernel's build directory There were two do_configure_prepend() methods, one within FSL's repository and another one in Enea's repository. Due to layers' priorities, the last to be executed was the one from FSL's layer. Hence .config resulted from executing do_configure_prepend() from Enea's repository was lost because both were operating on the same .config file. The issue is how FSL checks for cfg fragments. Fragments need to be within build directory instead of source directory, hence do_unpack_append() method was modified accordingly, otherwise none of the fragments would have been applied on .config. do_configure_prepend() from our repository was deleted, since it's not of much use. Signed-off-by: Stefan Sicleru Signed-off-by: Martin Borg --- recipes-kernel/linux/linux-qoriq-common.inc | 9 ++++++--- recipes-kernel/linux/linux-qoriq_3.12.bbappend | 26 -------------------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/recipes-kernel/linux/linux-qoriq-common.inc b/recipes-kernel/linux/linux-qoriq-common.inc index eca33c7..958ab03 100644 --- a/recipes-kernel/linux/linux-qoriq-common.inc +++ b/recipes-kernel/linux/linux-qoriq-common.inc @@ -47,13 +47,16 @@ KERNEL_DEVICETREE_append_p3041ds = " p3041ds-usdpaa-enea.dtb" require recipes-kernel/linux/pramfs-3.12.inc +# Freescale looks for cfg fragments within the build directory, so +# they must be copied there before running do_configure_prepend() +# task do_unpack_append() { import shutil workdir = d.getVar("WORKDIR", True) - sourcedir = d.getVar("S", True) - bb.note("Copy cfg folder from workdir %s to source directory %s" % (workdir, sourcedir)) + builddir = d.getVar("B", True) + bb.note("Copy cfg folder from workdir %s to build directory %s" % (workdir, builddir)) src = workdir + "/cfg" - dst = sourcedir + "/cfg" + dst = builddir + "/cfg" try: shutil.copytree(src, dst) except shutil.Error as e: diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bbappend b/recipes-kernel/linux/linux-qoriq_3.12.bbappend index 67afd97..f9311e9 100644 --- a/recipes-kernel/linux/linux-qoriq_3.12.bbappend +++ b/recipes-kernel/linux/linux-qoriq_3.12.bbappend @@ -1,27 +1 @@ require recipes-kernel/linux/linux-qoriq-common.inc - -do_configure_prepend() { - # copy desired defconfig so we pick it up for the real kernel_do_configure - cp ${KERNEL_DEFCONFIG} ${B}/.config - - # add config fragments - for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do - if [ -f "${WORKDIR}/${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} - elif [ -f "${S}/arch/powerpc/configs/${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config \ - ${S}/arch/powerpc/configs/${deltacfg} - fi - done - - #add git revision to the local version - if [ "${SCMVERSION}" = "y" ]; then - # append sdk version if SDK_VERSION is defined - sdkversion='' - if [ -n "${SDK_VERSION}" ]; then - sdkversion="-${SDK_VERSION}" - fi - head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null` - printf "%s%s%s" $sdkversion +g $head > ${B}/.scmversion - fi -} -- cgit v1.2.3-54-g00ecf