All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 1/2] setup-defconfig.inc: implement config fragments by using in-kernel script
@ 2014-04-14  3:50 Denys Dmytriyenko
  2014-04-14  3:50 ` [RFC][PATCH 2/2] linux-ti-staging: add baseport, connectivity, ipc and systest config fragments Denys Dmytriyenko
  2014-04-14 12:01 ` [RFC][PATCH 1/2] setup-defconfig.inc: implement config fragments by using in-kernel script Maupin, Chase
  0 siblings, 2 replies; 7+ messages in thread
From: Denys Dmytriyenko @ 2014-04-14  3:50 UTC (permalink / raw)
  To: meta-ti

From: Denys Dmytriyenko <denys@ti.com>

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 recipes-kernel/linux/setup-defconfig.inc | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc
index ed3bce2..d6e5557 100644
--- a/recipes-kernel/linux/setup-defconfig.inc
+++ b/recipes-kernel/linux/setup-defconfig.inc
@@ -5,27 +5,32 @@ KERNEL_LOCALVERSION ?= ""
 # Check the defconfig file and see if it points to an in kernel
 # defconfig that should be used, or if it is a complete config file
 
-addtask setup_defconfig before do_configure after do_patch
-do_setup_defconfig() {
-    # Always copy the defconfig file to .config to keep consistency
-    # between the case where there is a real config and the in kernel
-    # tree config
-    cp ${WORKDIR}/defconfig ${S}/.config
-}
-
 # define our own do_configure that will:
 #   1. Check the .config file and see if string use-kernel-config= is present
 #   2. If the use-kernel-config string is present parse out the config to use
-#      and run make ${config}
+#      and run make $config
 #   3. else run yes '' | oe_runmake oldconfig like the default do_configure
 #      does
 do_configure() {
+    # Always copy the defconfig file to .config to keep consistency
+    # between the case where there is a real config and the in kernel
+    # tree config
+    cp ${WORKDIR}/defconfig ${S}/.config
+
     echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
     echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
     config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2`
-    if [ "x${config}" != "x" ]
+    if [ "x$config" != "x" ]
     then
-        oe_runmake ${config}
+        # check for fragments
+        fragments=`cat ${S}/.config | grep config-fragment | cut -d= -f2`
+        oe_runmake $config
+        if [ "x$fragments" != "x" ]
+        then
+            fragnames=`basename -a $fragments`
+            ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config $fragnames 1>&2 )
+            yes '' | oe_runmake oldconfig
+        fi
     else
         yes '' | oe_runmake oldconfig
     fi
-- 
1.9.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-14 16:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14  3:50 [RFC][PATCH 1/2] setup-defconfig.inc: implement config fragments by using in-kernel script Denys Dmytriyenko
2014-04-14  3:50 ` [RFC][PATCH 2/2] linux-ti-staging: add baseport, connectivity, ipc and systest config fragments Denys Dmytriyenko
2014-04-14  4:22   ` Khem Raj
2014-04-14 13:54     ` Denys Dmytriyenko
2014-04-14 16:52       ` Khem Raj
2014-04-14 12:01 ` [RFC][PATCH 1/2] setup-defconfig.inc: implement config fragments by using in-kernel script Maupin, Chase
2014-04-14 13:59   ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.