From 6682c77520965dd7f0ab1ce92f32d57181d04462 Mon Sep 17 00:00:00 2001 From: Andrei Varvara Date: Fri, 4 Dec 2015 16:21:44 +0100 Subject: linux-qoriq-common.inc: Fix config fragment path for linux-qoriq The Freescale linux-qoriq.inc is expecting that cfg folder is present in the source directory. Our recipes regarding cfg copies the cfg folder in the working directory. A patch was made to the Freescale's original recipe to look for cfg patches inside workdir, but this was not accepted by Freescale. A new fix was proposed that basically copies the cfg folder from the working directory to source directory where original FSL recipe expects to find it. This way we do not have to modify the original FSL recipe. In order to implement this fix python code that copies the cfg folder from working directory to source directory has been added in the do_unpack task. Signed-off-by: Andrei Varvara Signed-off-by: George Nita --- recipes-kernel/linux/linux-qoriq-common.inc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/recipes-kernel/linux/linux-qoriq-common.inc b/recipes-kernel/linux/linux-qoriq-common.inc index 9d51b1e..c5430c8 100644 --- a/recipes-kernel/linux/linux-qoriq-common.inc +++ b/recipes-kernel/linux/linux-qoriq-common.inc @@ -38,3 +38,18 @@ DELTA_KERNEL_DEFCONFIG += " ${ENEA_KERNEL_FRAGMENTS} \ " require recipes-kernel/linux/pramfs-3.12.inc + +do_unpack_append() { + import shutil + workdir = d.getVar("WORKDIR", True) + sourcedir = d.getVar("S", True) + print "Copy cfg folder from workdir %s to source directory %s" % (workdir, sourcedir) + src = workdir + "/cfg" + dst = sourcedir + "/cfg" + try: + shutil.copytree(src, dst) + except shutil.Error as e: + print "Directory not copied. Error: %s" % e + except OSError as e: + print "Directory not copied. Error: %s" % e +} -- cgit v1.2.3-54-g00ecf