Skip to contentSkip to conversation

meta-skeleton: Add busybox config fragment example

PATCH Superseded Saul Wold 6 participants 11 messages Aug 13, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH v2 2/2 meta-skeleton: Add busybox config fragment example

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.

v2: fixed FILESEXTRAPATHS

---
 meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
 meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
 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
meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +1 -0
new file mode 100644
index 0000000..42c6730
@@ -0,0 +1 @@
+CONFIG_RFKILL=n
meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend new file +5 -0
new file mode 100644
index 0000000..641f04a4
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+	    file://no_rfkill.cfg \
+           "
Signature · 1 line
1.8.1.4
#1 lore raw

How will this know which files exactly to disregard in the busybox include file (".inc")?

Could you please give that to the commit message as explanation?

Quoted 48 lines · Saul Wold

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.

v2: fixed FILESEXTRAPATHS

---
 meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
 meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
 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

meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +1 -0
new file mode 100644
index 0000000..42c6730
@@ -0,0 +1 @@
+CONFIG_RFKILL=n
meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend new file +5 -1
new file mode 100644
index 0000000..641f04a4
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+           file://no_rfkill.cfg \
+           "
--

1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

s/which files/which lines/

Quoted 58 lines · Laszlo Papp

How will this know which files exactly to disregard in the busybox include file (".inc")?

Could you please give that to the commit message as explanation?

Quoted 48 lines · Saul Wold

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.

v2: fixed FILESEXTRAPATHS

---
 meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
 meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
 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

meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +1 -0
new file mode 100644
index 0000000..42c6730
@@ -0,0 +1 @@
+CONFIG_RFKILL=n
meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend new file +5 -1
new file mode 100644
index 0000000..641f04a4
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+           file://no_rfkill.cfg \
+           "
--

1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#7 lore raw
In reply to Saul Wold
Quoted 24 lines · Saul Wold

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.

v2: fixed FILESEXTRAPATHS

---
  meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
  meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
  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

meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +0 -0
new file mode 100644
index 0000000..42c6730

meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg line 1

Quoted 1 line
meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +1 -0
@@ -0,0 +1 @@
+CONFIG_RFKILL=n

Should be "# CONFIG_RFKILL is not set", I believe the =n will work, but it doesn't following the kconfig conventions.

--Mark

Quoted 12 lines
meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend new file +5 -0
new file mode 100644
index 0000000..641f04a4
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+	    file://no_rfkill.cfg \
+           "
#3 lore raw
In reply to Laszlo Papp
Quoted 1 line · Laszlo Papp

s/which files/which lines/

The kernel configuration mechanism has a tool that will combine the original configuration, and any listed configuration fragments (.cfg files). It will combine these, and then filter them in such a way that last-in wins.

See the Yocto Project Linux Kernel Development manual, section 2.2.3:

http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration

--Mark

Quoted 70 lines

On Tue, Aug 13, 2013 at 6:23 PM, Laszlo Papp <[email protected] <mailto:[email protected]>> wrote:

    How will this know which files exactly to disregard in the busybox include
    file (".inc")?

    Could you please give that to the commit message as explanation?


    On Tue, Aug 13, 2013 at 6:11 PM, Saul Wold <[email protected]
    <mailto:[email protected]>> 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.

        v2: fixed FILESEXTRAPATHS

        Signed-off-by: Saul Wold <[email protected] <mailto:[email protected]>>
        ---
          meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
          meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
          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=n
        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,5 @@
        +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
        +
        +SRC_URI += " \
        +           file://no_rfkill.cfg \
        +           "
        --
        1.8.1.4

        _______________________________________________
        Openembedded-core mailing list
        [email protected]
        <mailto:[email protected]>
        http://lists.openembedded.org/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw
In reply to Mark Hatle
Quoted 19 lines · Mark Hatle
Quoted 18 lines · Saul Wold

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.

v2: fixed FILESEXTRAPATHS

---
  meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
  meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
  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

Quoted 10 lines

meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg line 1

Quoted 7 lines
meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +1 -0
new file mode 100644
index 0000000..42c6730
@@ -0,0 +1 @@
+CONFIG_RFKILL=n

Should be "# CONFIG_RFKILL is not set", I believe the =n will work, but it doesn't following the kconfig conventions.

Seconded. Or Thirded since I responded to V1 similarly. :-)

Quoted 20 lines

--Mark

meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend line 5

Quoted 12 lines
meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend new file +5 -0
new file mode 100644
index 0000000..641f04a4
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+	    file://no_rfkill.cfg \
+           "

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#4 lore raw
In reply to Mark Hatle
Quoted 10 lines · Mark Hatle
Quoted 2 lines · Laszlo Papp

s/which files/which lines/

The kernel configuration mechanism has a tool that will combine the original configuration, and any listed configuration fragments (.cfg files). It will combine these, and then filter them in such a way that last-in wins.

Quoted 4 lines

See the Yocto Project Linux Kernel Development manual, section 2.2.3:

http://www.yoctoproject.org/**docs/current/kernel-dev/**
kernel-dev.html#changing-the-**configuration<http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration>

Could you please clarify how that is related to my question? What I wanna understand is: I set something in the config as I wish, and then the bitbake file is getting chopped respectively like with "ifdef/elif" etc in C/C++, but this time inside the python script defined in the bitbake file.

I am well aware of that you can customize the defconfig, but my question was about the python function.

author
#9 lore raw
In reply to Mark Hatle
Quoted 21 lines · Mark Hatle
Quoted 20 lines · Saul Wold

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.

v2: fixed FILESEXTRAPATHS

---
  meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
  meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
  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

Quoted 12 lines

meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg line 1

Quoted 8 lines
meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +1 -0
new file mode 100644
index 0000000..42c6730
@@ -0,0 +1 @@
+CONFIG_RFKILL=n

Should be "# CONFIG_RFKILL is not set", I believe the =n will work, but it doesn't following the kconfig conventions.

Yup, the commented out version works also, I will update the patch (v3), with

Quoted 23 lines

--Mark

Quoted 9 lines

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

meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend line 5

Quoted 5 lines
meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend new file +5 -0
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+        file://no_rfkill.cfg \
+           "

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw
In reply to Laszlo Papp
Quoted 14 lines · Laszlo Papp

On Tue, Aug 13, 2013 at 6:33 PM, Mark Hatle <[email protected] <mailto:[email protected]>> wrote:

On 8/13/13 12:23 PM, Laszlo Papp wrote:

s/which files/which lines/

The kernel configuration mechanism has a tool that will combine the original configuration, and any listed configuration fragments (.cfg files). It will combine these, and then filter them in such a way that last-in wins.

See the Yocto Project Linux Kernel Development manual, section 2.2.3:

Quoted 8 lines

http://www.yoctoproject.org/__docs/current/kernel-dev/__kernel-dev.html#changing-the-__configuration
<http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration>

Could you please clarify how that is related to my question? What I wanna understand is: I set something in the config as I wish, and then the bitbake file is getting chopped respectively like with "ifdef/elif" etc in C/C++, but this time inside the python script defined in the bitbake file.

You asked: How will this know which lines exactly to disregard in the busybox include file (".inc")?

My answer is that, according to the quoted documentation, the tooling, as described in the above URL, does this as a last-in processing, based on the filename(s) of the SRC_URI components.

Quoted 2 lines

I am well aware of that you can customize the defconfig, but my question was about the python function.

Specifically for the busybox package, the python fragement "find_cfgs(d):" located in the busybox.inc file finds the .cfg files, and collects them into a list. They are then processed by the 'merge_config.sh' script that is called as part of the do_configure task.

I believe the merge_config script is provided as part of the linux-libc-headers or linux-yocto package, but I may be incorrect on that.

--Mark

#6 lore raw
Quoted 46 lines · Mark Hatle
Quoted 24 lines · Laszlo Papp

On Tue, Aug 13, 2013 at 6:33 PM, Mark Hatle <[email protected] <mailto:[email protected]>> wrote:

On 8/13/13 12:23 PM, Laszlo Papp wrote:

s/which files/which lines/

The kernel configuration mechanism has a tool that will combine the
original
configuration, and any listed configuration fragments (.cfg files).
It will
combine these, and then filter them in such a way that last-in wins.

See the Yocto Project Linux Kernel Development manual, section 2.2.3:

http://www.yoctoproject.org/__docs/current/kernel-dev/__kernel-dev.html#changing-the-__configuration

<http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#changing-the-configuration>

Quoted 6 lines

Could you please clarify how that is related to my question? What I wanna understand is: I set something in the config as I wish, and then the bitbake
file is getting chopped respectively like with "ifdef/elif" etc in C/C++, but
this time inside the python script defined in the bitbake file.

You asked: How will this know which lines exactly to disregard in the busybox include file (".inc")?

My answer is that, according to the quoted documentation, the tooling, as described in the above URL, does this as a last-in processing, based on the filename(s) of the SRC_URI components.

Quoted 3 lines

I am well aware of that you can customize the defconfig, but my question was
about the python function.

Quoted 7 lines

Specifically for the busybox package, the python fragement "find_cfgs(d):" located in the busybox.inc file finds the .cfg files, and collects them into a list. They are then processed by the 'merge_config.sh' script that is called as part of the do_configure task.

I believe the merge_config script is provided as part of the linux-libc-headers or linux-yocto package, but I may be incorrect on that.

close, it's from the kern-tools package, but it is an upstream kernel script. We use it from kern-tools to avoid fetching the kernel to use it for busybox.

Bruce

Quoted 7 lines

--Mark

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#10 lore raw
In reply to Saul Wold
Quoted 9 lines · Saul Wold

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.

v2: fixed FILESEXTRAPATHS

This should be bellow --- line or it ends in the commit log.

Quoted 33 lines
---
 meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg   | 1 +
 meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend | 5 +++++
 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
meta-skeleton/recipes-core/busybox/busybox/no_rfkill.cfg new file +1 -0
new file mode 100644
index 0000000..42c6730
@@ -0,0 +1 @@
+CONFIG_RFKILL=n
meta-skeleton/recipes-core/busybox/busybox_1.21.1.bbappend new file +5 -1
new file mode 100644
index 0000000..641f04a4
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+           file://no_rfkill.cfg \
+           "
--

1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750