Patchwork [2/2,v3] meta-skeleton: Add busybox config fragment example

login
register
mail settings
Submitter Saul Wold
Date Aug. 13, 2013, 6:01 p.m.
Message ID <1376416910-21399-1-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/55563/
State Accepted
Commit 57662d4f813d5795cac1529633db80a09efdb089
Headers show

Comments

Saul Wold - Aug. 13, 2013, 6:01 p.m.
This shows an example of the config fragment support that
both the linux-yocto and busybox recipes use. This example
is specific to busybox.

By adding busybox CONFIG options into a .cfg file and then
adding that .cfg file to SRC_URI the merge_config.sh script will
correctly handle these CONFIG options during the do_configure task.
The merge_config.sh script uses a last-in wins method.

For more details about this, see the Kernel Development Manual Section 2.2.3
http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration

v2: fixed FILESEXTRAPATHS
v3: Fixed kconfig line and added comments

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
 meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 12 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
 create mode 100644 meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend
Darren Hart - Aug. 13, 2013, 9:08 p.m.
On Tue, 2013-08-13 at 11:01 -0700, Saul Wold wrote:
> This shows an example of the config fragment support that
> both the linux-yocto and busybox recipes use. This example
> is specific to busybox.
> 
> By adding busybox CONFIG options into a .cfg file and then
> adding that .cfg file to SRC_URI the merge_config.sh script will
> correctly handle these CONFIG options during the do_configure task.
> The merge_config.sh script uses a last-in wins method.
> 
> For more details about this, see the Kernel Development Manual Section 2.2.3
> http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration
> 
> v2: fixed FILESEXTRAPATHS
> v3: Fixed kconfig line and added comments
> 
> Signed-off-by: Saul Wold <sgw@linux.intel.com>

Acked-by: Darren Hart <dvhart@linux.intel.com>

> ---
>  meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
>  meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 12 +++++
>  2 files changed, 6 insertions(+)
>  create mode 100644 meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
>  create mode 100644 meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend
> 
> diff --git a/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
> new file mode 100644
> index 0000000..42c6730
> --- /dev/null
> +++ b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
> @@ -0,0 +1 @@
> +# CONFIG_RFKILL is not set
> diff --git a/meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend b/meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend
> new file mode 100644
> index 0000000..641f04a4
> --- /dev/null
> +++ b/meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend
> @@ -0,0 +1,12 @@
> +# Example use of configuration fragments for busybox, which uses the same
> +# mechanism as the linux-yocto kernel recipe.
> +#
> +# The entries here will override any entries in the base busybox recipe
> +#
> +# More details can be found in the Kernel Dev Manual
> +# http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration
> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> +
> +SRC_URI += " \
> +	    file://no_rfkill.cfg \
> +           "

Patch

diff --git a/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
new file mode 100644
index 0000000..42c6730
--- /dev/null
+++ b/meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg
@@ -0,0 +1 @@ 
+# CONFIG_RFKILL is not set
diff --git a/meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend b/meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend
new file mode 100644
index 0000000..641f04a4
--- /dev/null
+++ b/meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend
@@ -0,0 +1,12 @@ 
+# Example use of configuration fragments for busybox, which uses the same
+# mechanism as the linux-yocto kernel recipe.
+#
+# The entries here will override any entries in the base busybox recipe
+#
+# More details can be found in the Kernel Dev Manual
+# http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+	    file://no_rfkill.cfg \
+           "