[yocto] [meta-yocto][PATCH] poky-tiny: Use musl for default system C library

Khem Raj raj.khem at gmail.com
Sat Dec 19 16:05:17 PST 2015


poky-tiny is reference for smallest footprint distro that can be
generated using yocto project infrastructure. Therefore switch to using
musl which gives the smallest footprint with a lot of extra stretching
for adding new package if needed, core-image-minimal for qemux86 comes
out to be 716K ( rootfs only ), boot tested on qemux86/poky-tiny

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta-yocto/conf/distro/poky-tiny.conf | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/meta-yocto/conf/distro/poky-tiny.conf b/meta-yocto/conf/distro/poky-tiny.conf
index b0227de..de3a441 100644
--- a/meta-yocto/conf/distro/poky-tiny.conf
+++ b/meta-yocto/conf/distro/poky-tiny.conf
@@ -25,12 +25,12 @@
 # [ ] Define linux-yocto-tiny configs for all supported BSPs
 # [ ] Drop ldconfig from the installation
 # [ ] Modify the runqemu scripts to work with ext2 parameter:
-#     runqemu qemux86 qemuparams="-nographic" bootparams="console=ttyS0,115200 root=0800" 
+#     runqemu qemux86 qemuparams="-nographic" bootparams="console=ttyS0,115200 root=0800"
 # [ ] Modify busybox to allow for DISTRO_FEATURES-like confiruration
 
 require conf/distro/poky.conf
 DISTRO = "poky-tiny"
-
+TCLIBC = "musl"
 # FIXME: consider adding a new "tiny" feature
 #DISTRO_FEATURES_append = " tiny"
 
@@ -57,27 +57,11 @@ ENABLE_WIDEC_class-native = "true"
 # eglibc->bash->gettext->libc-posix-clang-wchar dependency.
 USE_NLS="no"
 
-# Reconfigure eglibc for a smaller installation
-# Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
-DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
-
-# Required for "who"
-DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-utmpx libc-getlogin"
-DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
-DISTRO_FEATURES_LIBC_NET = "libc-inet libc-nis"
-
-DISTRO_FEATURES_LIBC = "${DISTRO_FEATURES_LIBC_TINY} \
-                        ${DISTRO_FEATURES_LIBC_MINIMAL} \
-                        ${DISTRO_FEATURES_LIBC_REGEX} \
-                        ${DISTRO_FEATURES_LIBC_NET} \
-                       "
-
 # Comment out any of the lines below to disable them in the build
 # DISTRO_FEATURES options:
 # alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci
 DISTRO_FEATURES_TINY = "pci"
-DISTRO_FEATURES_NET = "ipv4"
+DISTRO_FEATURES_NET = "ipv4 ipv6"
 DISTRO_FEATURES_USB = "usbhost"
 #DISTRO_FEATURES_USBGADGET = "usbgadget"
 #DISTRO_FEATURES_WIFI = "wifi"
@@ -87,13 +71,14 @@ DISTRO_FEATURES = "${DISTRO_FEATURES_TINY} \
                    ${DISTRO_FEATURES_USB} \
                    ${DISTRO_FEATURES_USBGADGET} \
                    ${DISTRO_FEATURES_WIFI} \
-                   ${DISTRO_FEATURES_LIBC} \
                   "
 
 # Enable LFS - see bug YOCTO #5865
 DISTRO_FEATURES_append_libc-uclibc = " largefile"
+DISTRO_FEATURES_append_libc-musl = " largefile"
 
 DISTRO_FEATURES_class-native = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
+DISTRO_FEATURES_class-nativesdk = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
 
 # Use tmpdevfs and the busybox runtime services
 VIRTUAL-RUNTIME_dev_manager = ""
-- 
2.6.4




More information about the yocto mailing list