Skip to contentSkip to conversation

eglibc: migrate configurability from oe V5

PATCH In review Kang Kai 3 participants 10 messages Jun 13, 2011

lore
Share & tools
lore

Kang Kai

author
#0 lore raw

cover eglibc: migrate configurability from oe V5

From: Kang Kai <[email protected]>

Hi Saul,

This update only add file local.conf.sample.extended, not source it any more.

Using DISTRO_FEATURES_LIBC to manage eglibc configurable options suggested by Koen and Martin, and set DISTRO_FEATURES_LIBC in default-distrovars.inc to enable all eglibc configurable options by default to make current compilation succeed.

Regards,

The following changes since commit 7f34cd1eb2a459709006ae985a14decd4d2152e6:

tzcode: Update to 2011g (2011-06-06 15:58:42 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/distro
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/distro

Kang Kai (2):
bitbake: add local.conf.sample.extended
eglibc: migrate configurability from oe

 meta-yocto/conf/local.conf.sample.extended      |   12 ++++
 meta/conf/distro/include/default-distrovars.inc |    9 +++-
 meta/recipes-core/eglibc/eglibc-options.inc     |   62 +++++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc             |    6 ++
 4 files changed, 88 insertions(+), 1 deletions(-)
 create mode 100644 meta-yocto/conf/local.conf.sample.extended
 create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc
Signature · 1 line
1.7.5.1.300.gc565c
author
#1 lore raw

PATCH 1/2 bitbake: add local.conf.sample.extended

From: Kang Kai <[email protected]>

Add a new configuration file local.conf.sample.extended, and more advanced settings what user can configure could put in this file.

---
 meta-yocto/conf/local.conf.sample.extended |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
 create mode 100644 meta-yocto/conf/local.conf.sample.extended
meta-yocto/conf/local.conf.sample.extended new file +12 -0
new file mode 100644
index 0000000..277ee2a
@@ -0,0 +1,12 @@
+# eglibc configurability is used to reduce minimal images's size.
+# the all supported eglibc options are listed in DISTRO_FEATURES_LIBC
+# and disabled by default. Uncomment and copy the DISTRO_FEATURES_LIBC
+# and DISTRO_FEATURES definitions to local.conf to enable the options.
+#DISTRO_FEATURES_LIBC = "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+#               libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+#               libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+#               libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+#               libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+#               libc-posix-wchar-io"
+
+#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
Signature · 1 line
1.7.5.1.300.gc565c
author
#2 lore raw

PATCH 2/2 eglibc: migrate configurability from oe

In reply to Kang Kai

From: Kang Kai <[email protected]>

Migrate configurability from oe, try to shrink minimal image size

All eglibc configuration options are included in conf/distro/include/default-distrovars.inc. Define DISTRO_FEATURES_LIBC and DISTRO_FEATURES in local.conf with the same way in local.conf.sample.extended to enable those options.

---
 meta/conf/distro/include/default-distrovars.inc |    9 +++-
 meta/recipes-core/eglibc/eglibc-options.inc     |   62 +++++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc.inc             |    6 ++
 3 files changed, 76 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc
meta/conf/distro/include/default-distrovars.inc +8 -1
index 4b68a0a..2cde46c 100644
@@ -10,7 +10,14 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY ?= "0"
 
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+					libc-posix-wchar-io"
+
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
 
 IMAGE_FEATURES ?= ""
 
meta/recipes-core/eglibc/eglibc-options.inc new file +62 -0

62 lines not on this page · raw message

meta/recipes-core/eglibc/eglibc.inc +6 -0
index 46ffa82..616f1af 100644
@@ -28,6 +28,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
 inherit autotools
+require eglibc-options.inc
 
 LEAD_SONAME = "libc.so"
 
@@ -43,3 +44,8 @@ EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
 PARALLEL_MAKE = ""
 
 PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
+
+OE_FEATURES = "${@features_to_eglibc_settings(d)}"
+do_configure_prepend() {
+	echo '${OE_FEATURES}' > ${B}/option-groups.config
+}
Signature · 1 line
1.7.5.1.300.gc565c
#3 lore raw

Re: [PATCH 2/2] eglibc: migrate configurability from oe

meta/conf/distro/include/default-distrovars.inc LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB" · line 20

Quoted 9 lines · Kang Kai
meta/conf/distro/include/default-distrovars.inc +8 -1
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+					libc-posix-wchar-io"
+
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"

Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?

p.

author
#4 lore raw

Re: [PATCH 2/2] eglibc: migrate configurability from oe

Quoted 11 lines · Phil Blundell

meta/conf/distro/include/default-distrovars.inc LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB" · line 20

Quoted 9 lines · Kang Kai
meta/conf/distro/include/default-distrovars.inc +8 -1
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+					libc-posix-wchar-io"
+
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"

Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?

Because eglibc has a feature libc-ipv6, and DISTRO_FEATURES has a ipv6 already. It is not needed to import a new feature name on the same things, so use original ipv6. And eglibc still needs provide this option, then put it in DISTRO_FEATURES_LIBC.

Quoted 2 lines

p.

Regards,
Kai

Quoted 5 lines

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

#5 lore raw

Re: [PATCH 2/2] eglibc: migrate configurability from oe

Quoted 13 lines · Kang Kai
Quoted 11 lines · Phil Blundell

meta/conf/distro/include/default-distrovars.inc LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB" · line 20

Quoted 9 lines · Kang Kai
meta/conf/distro/include/default-distrovars.inc +8 -1
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+					libc-posix-wchar-io"
+
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"

Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?

Quoted 4 lines

Because eglibc has a feature libc-ipv6, and DISTRO_FEATURES has a ipv6 already. It is not needed to import a new feature name on the same things, so use original ipv6. And eglibc still needs provide this option, then put it in DISTRO_FEATURES_LIBC.

I'm not quite sure I understood what you wrote above. But I think what I was asking was, why doesn't eglibc just look at the existing ipv6 DISTRO_FEATURE?

p.

author
#6 lore raw

Re: [PATCH 2/2] eglibc: migrate configurability from oe

Quoted 13 lines · Phil Blundell
Quoted 12 lines · Kang Kai
Quoted 11 lines · Phil Blundell

meta/conf/distro/include/default-distrovars.inc LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB" · line 20

Quoted 9 lines · Kang Kai
meta/conf/distro/include/default-distrovars.inc +8 -1
-DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci"
+DISTRO_FEATURES_LIBC ?= "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+					libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
+					libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+					libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+					libc-posix-wchar-io"
+
+DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"

Why is ipv6 in DISTRO_FEATURES_LIBC rather than DISTRO_FEATURES?

Quoted 7 lines
Quoted 4 lines

Because eglibc has a feature libc-ipv6, and DISTRO_FEATURES has a ipv6 already. It is not needed to import a new feature name on the same things, so use original ipv6. And eglibc still needs provide this option, then put it in DISTRO_FEATURES_LIBC.

I'm not quite sure I understood what you wrote above. But I think what I was asking was, why doesn't eglibc just look at the existing ipv6 DISTRO_FEATURE?

It seems DISTRO_FEATURE doesn't want to enable ipv6 by default, but eglibc needs supports it.

Quoted 8 lines

p.

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

#7 lore raw

Re: [PATCH 2/2] eglibc: migrate configurability from oe

Quoted 2 lines · Kang Kai

It seems DISTRO_FEATURE doesn't want to enable ipv6 by default, but eglibc needs supports it.

That doesn't seem like it can be right. Why would you want ipv6 in eglibc if your DISTRO isn't using it?

The whole point of DISTRO_FEATURES is that it's meant to give you a coherent set of system-wide options.

FWIW, I think ipv6 should probably be set on in default-distrovar's DISTRO_FEATURES, but I guess some higher authority would need to make that decision.

p.

#8 lore raw

Re: [PATCH 2/2] eglibc: migrate configurability from oe

Quoted 7 lines · Phil Blundell
Quoted 2 lines · Kang Kai

It seems DISTRO_FEATURE doesn't want to enable ipv6 by default, but eglibc needs supports it.

That doesn't seem like it can be right.  Why would you want ipv6 in eglibc if your DISTRO isn't using it?

Quoted 8 lines

The whole point of DISTRO_FEATURES is that it's meant to give you a coherent set of system-wide options.

FWIW, I think ipv6 should probably be set on in default-distrovar's DISTRO_FEATURES, but I guess some higher authority would need to make that decision.

p.

I see your point

but ipv6 as DISTRO_FEATURES_LIBC ends in DISTRO_FEATURES as well DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
so I'm fine with ipv6 in DISTRO_FEATURES_LIBC

this way I can expect *libc to be tweaked by DISTRO_FEATURES_LIBC only and the rest of image by whole DISTRO_FEATURES (including libc-* flags and ipv6 from DISTRO_FEATURES_LIBC)

Regards,

#9 lore raw

Re: [PATCH 2/2] eglibc: migrate configurability from oe

Quoted 10 lines · Martin Jansa
Quoted 3 lines · Phil Blundell

FWIW, I think ipv6 should probably be set on in default-distrovar's DISTRO_FEATURES, but I guess some higher authority would need to make that decision.

I see your point

but ipv6 as DISTRO_FEATURES_LIBC ends in DISTRO_FEATURES as well DISTRO_FEATURES ?= "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"

Oh, so it does. So the effect of this is that we will end up with ipv6 on in DISTRO_FEATURES anyway. I guess I would consider this a good result, if perhaps for the wrong reasons :-)

p.