diff options
author | Stefan Sicleru <stefan.sicleru@enea.com> | 2016-02-26 16:53:32 +0100 |
---|---|---|
committer | Martin Borg <martin.borg@enea.com> | 2016-03-01 11:45:24 +0100 |
commit | fa12bf7c997331bd4dca2f642bbbc3bdf4c490f0 (patch) | |
tree | e0a8067b94a028d6f62c88b374ce3ada5b54de37 | |
parent | 9de2779f0dc063b135ecff66d65f84b577786b49 (diff) | |
download | meta-enea-bsp-ppc-fa12bf7c997331bd4dca2f642bbbc3bdf4c490f0.tar.gz |
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 <stefan.sicleru@enea.com>
Signed-off-by: Martin Borg <martin.borg@enea.com>
-rw-r--r-- | recipes-kernel/linux/linux-qoriq-common.inc | 9 | ||||
-rw-r--r-- | 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" | |||
47 | 47 | ||
48 | require recipes-kernel/linux/pramfs-3.12.inc | 48 | require recipes-kernel/linux/pramfs-3.12.inc |
49 | 49 | ||
50 | # Freescale looks for cfg fragments within the build directory, so | ||
51 | # they must be copied there before running do_configure_prepend() | ||
52 | # task | ||
50 | do_unpack_append() { | 53 | do_unpack_append() { |
51 | import shutil | 54 | import shutil |
52 | workdir = d.getVar("WORKDIR", True) | 55 | workdir = d.getVar("WORKDIR", True) |
53 | sourcedir = d.getVar("S", True) | 56 | builddir = d.getVar("B", True) |
54 | bb.note("Copy cfg folder from workdir %s to source directory %s" % (workdir, sourcedir)) | 57 | bb.note("Copy cfg folder from workdir %s to build directory %s" % (workdir, builddir)) |
55 | src = workdir + "/cfg" | 58 | src = workdir + "/cfg" |
56 | dst = sourcedir + "/cfg" | 59 | dst = builddir + "/cfg" |
57 | try: | 60 | try: |
58 | shutil.copytree(src, dst) | 61 | shutil.copytree(src, dst) |
59 | except shutil.Error as e: | 62 | 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 @@ | |||
1 | require recipes-kernel/linux/linux-qoriq-common.inc | require recipes-kernel/linux/linux-qoriq-common.inc | |
2 | |||
3 | do_configure_prepend() { | ||
4 | # copy desired defconfig so we pick it up for the real kernel_do_configure | ||
5 | cp ${KERNEL_DEFCONFIG} ${B}/.config | ||
6 | |||
7 | # add config fragments | ||
8 | for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do | ||
9 | if [ -f "${WORKDIR}/${deltacfg}" ]; then | ||
10 | ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} | ||
11 | elif [ -f "${S}/arch/powerpc/configs/${deltacfg}" ]; then | ||
12 | ${S}/scripts/kconfig/merge_config.sh -m .config \ | ||
13 | ${S}/arch/powerpc/configs/${deltacfg} | ||
14 | fi | ||
15 | done | ||
16 | |||
17 | #add git revision to the local version | ||
18 | if [ "${SCMVERSION}" = "y" ]; then | ||
19 | # append sdk version if SDK_VERSION is defined | ||
20 | sdkversion='' | ||
21 | if [ -n "${SDK_VERSION}" ]; then | ||
22 | sdkversion="-${SDK_VERSION}" | ||
23 | fi | ||
24 | head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null` | ||
25 | printf "%s%s%s" $sdkversion +g $head > ${B}/.scmversion | ||
26 | fi | ||
27 | } | ||