[meta-ti] Maupin, Chase : setup-defconfig: allow use of in-kernel config fragments

Arago Project git git at arago-project.org
Fri May 23 12:17:49 PDT 2014


Module: meta-ti
Branch: master
Commit: 1c87802589eb622c3fa9ea800c3c09c7bb350b82
URL:    http://arago-project.org/git/meta-ti.git?a=commit;h=1c87802589eb622c3fa9ea800c3c09c7bb350b82

Author: Maupin, Chase <chase.maupin at ti.com>
Date:   Fri May 23 02:08:32 2014 +0000

setup-defconfig: allow use of in-kernel config fragments

* Allow the use of in-kernel config fragments instead of only
  pulling config fragments from the OE meta data.
* The absolute path to the config fragment is used to allow
  pointing to different fragment locations.
* Update the linux-ti-staging_3.12 recipe which uses config
  fragments to specify the absolute path

Signed-off-by: Chase Maupin <Chase.Maupin at ti.com>
Signed-off-by: Denys Dmytriyenko <denys at ti.com>

---

 recipes-kernel/linux/linux-ti-staging_3.12.bb |    3 ++-
 recipes-kernel/linux/setup-defconfig.inc      |   24 +++++++++++++++++++++++-
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/recipes-kernel/linux/linux-ti-staging_3.12.bb b/recipes-kernel/linux/linux-ti-staging_3.12.bb
index dbb49b3..cb289c4 100644
--- a/recipes-kernel/linux/linux-ti-staging_3.12.bb
+++ b/recipes-kernel/linux/linux-ti-staging_3.12.bb
@@ -46,7 +46,8 @@ PV = "3.12.20"
 MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}"
 PR = "${MACHINE_KERNEL_PR}"
 
-KERNEL_CONFIG_FRAGMENTS = "baseport.cfg connectivity.cfg ipc.cfg"
+KERNEL_CONFIG_FRAGMENTS = "${WORKDIR}/baseport.cfg ${WORKDIR}/connectivity.cfg \
+                           ${WORKDIR}/ipc.cfg"
 
 SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \
            file://defconfig \
diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc
index 4277f26..dbfd0d4 100644
--- a/recipes-kernel/linux/setup-defconfig.inc
+++ b/recipes-kernel/linux/setup-defconfig.inc
@@ -27,9 +27,31 @@ do_configure() {
         yes '' | oe_runmake oldconfig
     fi
 
-    # check for fragments
+    # Check for kernel config fragments.  The assumption is that the config
+    # fragment will be specified with the absolute path.  For example:
+    #   * ${WORKDIR}/config1.cfg
+    #   * ${S}/config2.cfg
+    # Iterate through the list of configs and make sure that you can find
+    # each one.  If not then error out.
+    # NOTE: If you want to override a configuration that is kept in the kernel
+    #       with one from the OE meta data then you should make sure that the
+    #       OE meta data version (i.e. ${WORKDIR}/config1.cfg) is listed
+    #       after the in kernel configuration fragment.
+    # Check if any config fragments are specified.
     if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
     then
+        for f in ${KERNEL_CONFIG_FRAGMENTS}
+        do
+            # Check if the config fragment was copied into the WORKDIR from
+            # the OE meta data
+            if [ ! -e "$f" ]
+            then
+                echo "Could not find kernel config fragment $f"
+                exit 1
+            fi
+        done
+
+        # Now that all the fragments are located merge them.
         ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
         yes '' | oe_runmake oldconfig
     fi



More information about the meta-ti mailing list