[oe] [PATCH 2/2] busybox: configure according to {MACHINE, DISTRO}_FEATURES
Chris Larson
clarson at kergoth.com
Thu Jun 10 19:55:29 UTC 2010
On Thu, Jun 10, 2010 at 12:46 PM, Bernhard Reutner-Fischer <
rep.dot.nop at gmail.com> wrote:
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
> ---
> recipes/busybox/busybox-config.inc | 28 +++++++++++++++++++++++++
> recipes/busybox/busybox.inc | 39
> +++++++++++++++++++++++++++++++++++-
> 2 files changed, 66 insertions(+), 1 deletions(-)
> create mode 100644 recipes/busybox/busybox-config.inc
>
> diff --git a/recipes/busybox/busybox-config.inc
> b/recipes/busybox/busybox-config.inc
> new file mode 100644
> index 0000000..26ccec4
> --- /dev/null
> +++ b/recipes/busybox/busybox-config.inc
> @@ -0,0 +1,28 @@
> +# internal helper
> +def busybox_cfg(feature, features, tokens, cnf, rem):
> + if type(tokens) == type(""):
> + tokens = [tokens]
> + rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
> + if type(features) == type([]) and feature in features:
> + cnf.extend([token + '=y' for token in tokens])
> + else:
> + cnf.extend(['# ' + token + ' is not set' for token in
> tokens])
> +# Map distro and machine features to config settings
> +def features_to_busybox_settings(d):
> + cnf, rem = ([], [])
> + distro_features = bb.data.getVar('DISTRO_FEATURES', d).split()
> + machine_features = bb.data.getVar('MACHINE_FEATURES', d).split()
> + busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IPV6', cnf,
> rem)
> + busybox_cfg('largefile', distro_features, 'CONFIG_LFS', cnf, rem)
> + busybox_cfg('nls', distro_features, 'CONFIG_LOCALE_SUPPORT', cnf,
> rem)
> + busybox_cfg('ipv4', distro_features,
> 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem)
> + busybox_cfg('ipv6', distro_features,
> 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem)
>
Should this (ipv6 at least) use COMBINED_FEATURES, since it requires
kernel/machine support for it to be useful, along with distro support?
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
More information about the Openembedded-devel
mailing list