Skip to contentSkip to conversation

setup-defconfig.inc: implement config fragments by using in-kernel script

PATCH In review Denys Dmytriyenko 2 participants 4 messages Apr 25, 2014 – May 1, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 setup-defconfig.inc: implement config fragments by using in-kernel script

From: Denys Dmytriyenko <[email protected]>

* Use in-kernel merge_config.sh script and KERNEL_CONFIG_FRAGMENTS list
* Move copying provided defconfig from own task to do_configure() for atomicity
* Don't use curly brackets for shell variables to avoid conflict with Bitbake

---
v2 - Use recipe variable to list config fragments instead of file

 recipes-kernel/linux/setup-defconfig.inc | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
recipes-kernel/linux/setup-defconfig.inc +15 -11
index ed3bce2..4277f26 100644
@@ -5,28 +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 [ ! -z "$config" ]
     then
-        oe_runmake ${config}
+        oe_runmake $config
     else
         yes '' | oe_runmake oldconfig
     fi
+
+    # check for fragments
+    if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
+    then
+        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
+        yes '' | oe_runmake oldconfig
+    fi
 }
Signature · 1 line
1.9.2
#1 lore raw

PATCH v2 2/2 linux-ti-staging: add baseport, connectivity, ipc and systest config fragments

From: Denys Dmytriyenko <[email protected]>

---
v2 - Use .cfg extension for config fragment files to match linux-yocto

 recipes-kernel/linux/linux-ti-staging/baseport.cfg   |  8 ++++++++
 .../linux/linux-ti-staging/connectivity.cfg          | 14 ++++++++++++++
 recipes-kernel/linux/linux-ti-staging/ipc.cfg        | 18 ++++++++++++++++++
 recipes-kernel/linux/linux-ti-staging/systest.cfg    | 20 ++++++++++++++++++++
 recipes-kernel/linux/linux-ti-staging_3.12.bb        |  8 +++++++-
 5 files changed, 67 insertions(+), 1 deletion(-)
 create mode 100644 recipes-kernel/linux/linux-ti-staging/baseport.cfg
 create mode 100644 recipes-kernel/linux/linux-ti-staging/connectivity.cfg
 create mode 100644 recipes-kernel/linux/linux-ti-staging/ipc.cfg
 create mode 100644 recipes-kernel/linux/linux-ti-staging/systest.cfg
recipes-kernel/linux/linux-ti-staging/baseport.cfg new file +8 -0
new file mode 100644
index 0000000..8dc24af
@@ -0,0 +1,8 @@
+##################################################
+# Baseport Config Options
+##################################################
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_DEV_OMAP_AES=y
+CONFIG_CRYPTO_DEV_OMAP_SHAM=y
+CONFIG_CRYPTO_TEST=m
+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=n
recipes-kernel/linux/linux-ti-staging/connectivity.cfg new file +14 -0
new file mode 100644
index 0000000..bf18dae
@@ -0,0 +1,14 @@
+##################################################
+# Connectivity Configs
+##################################################
+CONFIG_MTD_NAND_OMAP_BCH=y
+CONFIG_MTD_TESTS=m
+CONFIG_SPI_SPIDEV=y
+CONFIG_USB_TEST=m
+CONFIG_USB_ACM=y
+CONFIG_USB_SERIAL_PL2303=y
+CONFIG_USB_PRINTER=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_RNDIS=y
+CONFIG_USB_G_MULTI_CDC=y
recipes-kernel/linux/linux-ti-staging/ipc.cfg new file +18 -0
new file mode 100644
index 0000000..645dfdf
@@ -0,0 +1,18 @@
+##################################################
+# IPC config options
+##################################################
+CONFIG_IOMMU_API=y
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_OF_IOMMU=y
+CONFIG_OMAP_IOMMU=y
+CONFIG_OMAP_IOVMM=y
+CONFIG_OMAP_IOMMU_DEBUG=y
+CONFIG_VIRTIO=m
+CONFIG_RPMSG=m
+CONFIG_RPMSG_RPC=m
+CONFIG_REMOTEPROC=m
+CONFIG_OMAP_REMOTEPROC=m
+CONFIG_OMAP_REMOTEPROC_IPU=y
+CONFIG_OMAP_REMOTEPROC_DSP=y
+CONFIG_OMAP_REMOTEPROC_IPU1=y
+CONFIG_OMAP_REMOTEPROC_DSP2=y
recipes-kernel/linux/linux-ti-staging/systest.cfg new file +20 -0
new file mode 100644
index 0000000..e21602f
@@ -0,0 +1,20 @@
+##################################################
+# Systest config options
+##################################################
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEVKMEM=y
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=400
+CONFIG_DEBUG_KMEMLEAK_TEST=n
+CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=n
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_PM_DEBUG=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_USB_DEBUG=y
+CONFIG_SND_DEBUG=y
+CONFIG_RTC_DEBUG=y
recipes-kernel/linux/linux-ti-staging_3.12.bb +7 -1
index 96be621..32d5d92 100644
@@ -40,11 +40,17 @@ SRCREV = "f0d4672333685697320f4907d5b4d3919121c299"
 PV = "3.12.17"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}"
 PR = "${MACHINE_KERNEL_PR}"
 
+KERNEL_CONFIG_FRAGMENTS = "baseport.cfg connectivity.cfg ipc.cfg systest.cfg"
+
 SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \
            file://defconfig \
+           file://baseport.cfg \
+           file://connectivity.cfg \
+           file://ipc.cfg \
+           file://systest.cfg \
           "
 
 # Disable SMP in defconfig on single-core platforms to reduce overhead
Signature · 1 line
1.9.2
Reviewed-by on v2 1/2
#3 lore raw
In reply to Denys Dmytriyenko
Quoted 92 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Denys Dmytriyenko
Sent: Friday, April 25, 2014 4:41 PM
To: [email protected]
Subject: [meta-ti] [PATCH v2 1/2] setup-defconfig.inc: implement config fragments by using in-kernel script

From: Denys Dmytriyenko <[email protected]>

* Use in-kernel merge_config.sh script and KERNEL_CONFIG_FRAGMENTS list
* Move copying provided defconfig from own task to do_configure() for atomicity
* Don't use curly brackets for shell variables to avoid conflict with Bitbake

---
v2 - Use recipe variable to list config fragments instead of file

recipes-kernel/linux/setup-defconfig.inc | 26 +++++++++++++++----
-------

1 file changed, 15 insertions(+), 11 deletions(-)
recipes- renamed from recipes-kernel/linux/setup-defconfig.inc +0 -0

kernel/linux/setup-defconfig.inc
index ed3bce2..4277f26 100644

recipes-kernel/linux/setup-defconfig.inc +0 -0
@@ -5,28 +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

recipes-kernel/linux/setup-defconfig.inc +0 -3
-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

recipes-kernel/linux/setup-defconfig.inc +0 -4
-    # 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
recipes-kernel/linux/setup-defconfig.inc +1 -1
-#      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

recipes-kernel/linux/setup-defconfig.inc +3 -0
+    # 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`

recipes-kernel/linux/setup-defconfig.inc +7 -2
-    if [ "x${config}" != "x" ]
+    if [ ! -z "$config" ]
    then
-        oe_runmake ${config}
+        oe_runmake $config
    else
        yes '' | oe_runmake oldconfig
    fi
+
+    # check for fragments
+    if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
+    then
+        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -

m -r -O ${S} ${S}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )

recipes-kernel/linux/setup-defconfig.inc +2 -0
+        yes '' | oe_runmake oldconfig
+    fi

}
--
1.9.2

--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] linux-ti-staging: add baseport, connectivity, ipc and systest config fragments

In reply to Denys Dmytriyenko
Quoted 160 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Denys Dmytriyenko
Sent: Friday, April 25, 2014 4:41 PM
To: [email protected]
Subject: [meta-ti] [PATCH v2 2/2] linux-ti-staging: add baseport, connectivity, ipc and systest config fragments

From: Denys Dmytriyenko <[email protected]>

---
v2 - Use .cfg extension for config fragment files to match linux- yocto

recipes-kernel/linux/linux-ti-staging/baseport.cfg | 8
++++++++
.../linux/linux-ti-staging/connectivity.cfg | 14
++++++++++++++
recipes-kernel/linux/linux-ti-staging/ipc.cfg | 18
++++++++++++++++++
recipes-kernel/linux/linux-ti-staging/systest.cfg | 20
++++++++++++++++++++
recipes-kernel/linux/linux-ti-staging_3.12.bb | 8
+++++++-

5 files changed, 67 insertions(+), 1 deletion(-)

create mode 100644 recipes-kernel/linux/linux-ti- staging/baseport.cfg
create mode 100644 recipes-kernel/linux/linux-ti- staging/connectivity.cfg
create mode 100644 recipes-kernel/linux/linux-ti-staging/ipc.cfg create mode 100644 recipes-kernel/linux/linux-ti- staging/systest.cfg

recipes-kernel/linux/linux-ti-staging/baseport.cfg new file +8 -0
new file mode 100644
index 0000000..8dc24af
@@ -0,0 +1,8 @@
+##################################################
+# Baseport Config Options
+##################################################
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_DEV_OMAP_AES=y
+CONFIG_CRYPTO_DEV_OMAP_SHAM=y
+CONFIG_CRYPTO_TEST=m
+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=n
(quoted diff) +0 -0

staging/connectivity.cfg b/recipes-kernel/linux/linux-ti- staging/connectivity.cfg
new file mode 100644
index 0000000..bf18dae

recipes-kernel/linux/linux-ti-staging/connectivity.cfg new file +14 -0
@@ -0,0 +1,14 @@
+##################################################
+# Connectivity Configs
+##################################################
+CONFIG_MTD_NAND_OMAP_BCH=y
+CONFIG_MTD_TESTS=m
+CONFIG_SPI_SPIDEV=y
+CONFIG_USB_TEST=m
+CONFIG_USB_ACM=y
+CONFIG_USB_SERIAL_PL2303=y
+CONFIG_USB_PRINTER=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_RNDIS=y
+CONFIG_USB_G_MULTI_CDC=y
recipes-kernel/linux/linux-ti-staging/ipc.cfg new file +18 -0
new file mode 100644
index 0000000..645dfdf
@@ -0,0 +1,18 @@
+##################################################
+# IPC config options
+##################################################
+CONFIG_IOMMU_API=y
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_OF_IOMMU=y
+CONFIG_OMAP_IOMMU=y
+CONFIG_OMAP_IOVMM=y
+CONFIG_OMAP_IOMMU_DEBUG=y
+CONFIG_VIRTIO=m
+CONFIG_RPMSG=m
+CONFIG_RPMSG_RPC=m
+CONFIG_REMOTEPROC=m
+CONFIG_OMAP_REMOTEPROC=m
+CONFIG_OMAP_REMOTEPROC_IPU=y
+CONFIG_OMAP_REMOTEPROC_DSP=y
+CONFIG_OMAP_REMOTEPROC_IPU1=y
+CONFIG_OMAP_REMOTEPROC_DSP2=y
recipes-kernel/linux/linux-ti-staging/systest.cfg new file +20 -0
new file mode 100644
index 0000000..e21602f
@@ -0,0 +1,20 @@
+##################################################
+# Systest config options
+##################################################
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEVKMEM=y
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=400
+CONFIG_DEBUG_KMEMLEAK_TEST=n
+CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=n
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_PM_DEBUG=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_USB_DEBUG=y
+CONFIG_SND_DEBUG=y
+CONFIG_RTC_DEBUG=y
recipes-kernel/linux/linux-ti-staging_3.12.bb +0 -0
index 96be621..32d5d92 100644
@@ -40,11 +40,17 @@ SRCREV =

"f0d4672333685697320f4907d5b4d3919121c299"
PV = "3.12.17"

# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild

recipes-kernel/linux/linux-ti-staging_3.12.bb +1 -1
-MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}"

PR = "${MACHINE_KERNEL_PR}"

+KERNEL_CONFIG_FRAGMENTS = "baseport.cfg connectivity.cfg ipc.cfg systest.cfg"
+
SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-

kernel.git;protocol=git;branch=${BRANCH} \
           file://defconfig \
recipes-kernel/linux/linux-ti-staging_3.12.bb +4 -0
+           file://baseport.cfg \
+           file://connectivity.cfg \
+           file://ipc.cfg \
+           file://systest.cfg \
          "

# Disable SMP in defconfig on single-core platforms to reduce overhead
--
1.9.2

--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti