From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Peter Bergin <peter@berginkonsult.se>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] busybox: move default config fragments to defconfig
Date: Wed, 29 Mar 2017 11:22:23 +0100 [thread overview]
Message-ID: <1490782943.13980.306.camel@linuxfoundation.org> (raw)
In-Reply-To: <2b16b764-38e0-4112-48b4-9e17cbe129c3@berginkonsult.se>
On Wed, 2017-03-29 at 10:16 +0200, Peter Bergin wrote:
> I agree that it is nice and encouraged to group configurations
> together and make them selectable as a group. A good example from
> busybox_1.24.1.bb is:
>
> ${@["",
> "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') ==
> 'busybox')]} \
> ${@["",
> "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') ==
> 'busybox-mdev')]} \
>
> In the example above, configuration fragments are added based on some
> configuration in your build. The configuration fragments that I
> removed with my patch was always added and in that situation I think
> it is better that they are added to the defconfig file. The situation
> now force me to do workarounds to avoid having these default
> configurations in my busybox .config.
>
> Ideas for better solutions are welcome and I hope we can find a
> solution that make it possible to provide your own busybox defconfig
> file that is only changed due to configurations in your build.
I don't think its difficult to make something which would improve
things and be configurable from other layers. How about something like:
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 6246c95..cb20207 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -15,6 +15,11 @@ SECTION = "base"
# Whether to split the suid apps into a seperate binary
BUSYBOX_SPLIT_SUID ?= "1"
+BUSYBOX_FRAGMENTS = "login-utilities"
+
+def busybox_fragment(name, d):
+ return bb.utils.contains('BUSYBOX_FRAGMENTS', name, "file://" + name + ".cfg", "", d)
+
export EXTRA_CFLAGS = "${CFLAGS}"
export EXTRA_LDFLAGS = "${LDFLAGS}"
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb
index 41fc641..a0ef17b 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -25,7 +25,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://run-ptest \
file://inetd.conf \
file://inetd \
- file://login-utilities.cfg \
+ ${@busybox_fragment("login-utilities", d)} \
file://recognize_connmand.patch \
file://busybox-cross-menuconfig.patch \
file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
Obviously I just used login-utilities as an example...
Cheers,
Richard
next prev parent reply other threads:[~2017-03-29 10:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 20:08 [PATCH] busybox: move default config fragments to defconfig Peter Bergin
2017-03-28 23:02 ` Richard Purdie
2017-03-29 8:16 ` Peter Bergin
2017-03-29 10:22 ` Richard Purdie [this message]
2017-03-29 17:19 ` Peter Bergin
2017-03-30 10:08 ` Richard Purdie
2017-03-29 10:24 ` Richard Purdie
2017-03-29 15:23 ` Andre McCurdy
2017-03-29 17:25 ` Ulrich Ölmann
2017-03-29 18:25 ` Peter Bergin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490782943.13980.306.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter@berginkonsult.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox