[OE-core] [PATCH] busybox: move default config fragments to defconfig
Richard Purdie
richard.purdie at linuxfoundation.org
Wed Mar 29 10:22:23 UTC 2017
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
More information about the Openembedded-core
mailing list