From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mx1.pokylinux.org (Postfix) with ESMTP id 7B4E24C80A7B for ; Thu, 21 Apr 2011 22:10:12 -0500 (CDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id p3M3ABYe000785 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 21 Apr 2011 20:10:11 -0700 (PDT) Received: from [128.224.163.157] (128.224.163.157) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Thu, 21 Apr 2011 20:10:11 -0700 Message-ID: <4DB0F192.6020809@windriver.com> Date: Fri, 22 Apr 2011 11:10:10 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Hatle, Mark" X-Originating-IP: [128.224.163.157] Cc: poky@yoctoproject.org Subject: About minimal image X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 03:10:12 -0000 X-Groupsio-MsgNum: 5482 Content-Type: multipart/mixed; boundary="------------060803050705070503050108" --------------060803050705070503050108 Content-Type: multipart/alternative; boundary="------------060109090705030306070604" --------------060109090705030306070604 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Hi Mark, I have read your mail about minimal image posted on Feb 19 on this mail list. We try to reduce image size by what your provided: 1. eglic configurability 2. using mklibs Right now after migrate eglic configurability to my local yocto branch, and I only enable 4 options ("locale-code nsswitch rtld-debug posix-clang-wchar ", pls. check in attachment) of eglibc to make compile pass. When after create minimal image, the rootfs (tar.bz2) is still about 3.4M, same size as without configure eglibc. Could you give me some directions what should we do next step? We also hope some information about how to use mklibs to reduce packages and image size? Thanks and Regards, Kai --------------060109090705030306070604 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi Mark,

I have read your mail about minimal image posted on Feb 19 on this mail list.  We try to reduce image size by what your provided:
  1. eglic configurability
  2. using mklibs
Right now after migrate eglic configurability to my local yocto branch, and I only enable 4 options ("locale-code nsswitch rtld-debug posix-clang-wchar ", pls. check in attachment) of eglibc to make compile pass.

When after create minimal image, the rootfs (tar.bz2) is still about 3.4M, same size as without configure eglibc.

Could you give me some directions what should we do next step? We also hope some information about how to use mklibs to reduce packages and image size?

Thanks and Regards,
Kai
--------------060109090705030306070604-- --------------060803050705070503050108 Content-Type: text/x-patch; name="0001-eglibc-migrate-configurability-from-oe.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-eglibc-migrate-configurability-from-oe.patch" >From 410f884c4bd0b2037d1df22ccdcd0bfb3c54ffdc Mon Sep 17 00:00:00 2001 From: Kang Kai Date: Thu, 21 Apr 2011 15:23:27 +0800 Subject: [PATCH] eglibc: migrate configurability from oe migrate configurability from oe, try to shrink minimal image size Signed-off-by: Kang Kai --- meta/recipes-core/eglibc/eglibc-options.inc | 51 +++++++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc.inc | 14 +++++++ 2 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc new file mode 100644 index 0000000..0af0aab --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-options.inc @@ -0,0 +1,51 @@ +def eglibc_cfg(feature, features, tokens, cnf ): + if type(tokens) == type(""): + tokens = [tokens] + if type(features) == type([]) and feature in features: + cnf.extend([token + ' = y' for token in tokens]) + else: + cnf.extend([token + ' = n' for token in tokens]) + +# Map distro features to eglibc options settings +def features_to_eglibc_settings(d): + cnf = ([]) + distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split() + eglibc_cfg('ipv6', distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf) + eglibc_cfg('backtrace', distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf) + eglibc_cfg('big-macros', distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf) + eglibc_cfg('bsd', distro_features, 'OPTION_EGLIBC_BSD', cnf) + eglibc_cfg('cxx-tests', distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf) + eglibc_cfg('catgets', distro_features, 'OPTION_EGLIBC_CATGETS', cnf) + eglibc_cfg('charsets', distro_features, 'OPTION_EGLIBC_CHARSETS', cnf) + eglibc_cfg('crypt', distro_features, 'OPTION_EGLIBC_CRYPT', cnf) + eglibc_cfg('crypt-ufc', distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf) + eglibc_cfg('db-aliases', distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf) + eglibc_cfg('envz', distro_features, 'OPTION_EGLIBC_ENVZ', cnf) + eglibc_cfg('fcvt', distro_features, 'OPTION_EGLIBC_FCVT', cnf) + eglibc_cfg('fmtmsg', distro_features, 'OPTION_EGLIBC_FMTMSG', cnf) + eglibc_cfg('fstab', distro_features, 'OPTION_EGLIBC_FSTAB', cnf) + eglibc_cfg('ftraverse', distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf) + eglibc_cfg('getlogin', distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf) + eglibc_cfg('idn', distro_features, 'OPTION_EGLIBC_IDN', cnf) + eglibc_cfg('inet', distro_features, 'OPTION_EGLIBC_INET', cnf) + eglibc_cfg('inet-anl', distro_features, 'OPTION_EGLIBC_INET_ANL', cnf) + eglibc_cfg('libm', distro_features, 'OPTION_EGLIBC_LIBM', cnf) + eglibc_cfg('libm-big', distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf) + eglibc_cfg('locales', distro_features, 'OPTION_EGLIBC_LOCALES', cnf) + eglibc_cfg('locale-code', distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf) + eglibc_cfg('memusage', distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf) + eglibc_cfg('nis', distro_features, 'OPTION_EGLIBC_NIS', cnf) + eglibc_cfg('nsswitch', distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf) + eglibc_cfg('rcmd', distro_features, 'OPTION_EGLIBC_RCMD', cnf) + eglibc_cfg('rtld-debug', distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf) + eglibc_cfg('spawn', distro_features, 'OPTION_EGLIBC_SPAWN', cnf) + eglibc_cfg('streams', distro_features, 'OPTION_EGLIBC_STREAMS', cnf) + eglibc_cfg('sunrpc', distro_features, 'OPTION_EGLIBC_SUNRPC', cnf) + eglibc_cfg('utmp', distro_features, 'OPTION_EGLIBC_UTMP', cnf) + eglibc_cfg('utmpx', distro_features, 'OPTION_EGLIBC_UTMPX', cnf) + eglibc_cfg('wordexp', distro_features, 'OPTION_EGLIBC_WORDEXP', cnf) + eglibc_cfg('posix-clang-wchar', distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf) + eglibc_cfg('posix-regexp', distro_features, 'OPTION_POSIX_REGEXP', cnf) + eglibc_cfg('posix-regexp-glibc', distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf) + eglibc_cfg('posix-wchar-io', distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf) + return "\n".join(cnf) diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc index 8314cb1..d5016bf 100644 --- a/meta/recipes-core/eglibc/eglibc.inc +++ b/meta/recipes-core/eglibc/eglibc.inc @@ -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" @@ -37,3 +38,16 @@ INHIBIT_DEFAULT_DEPS = "1" ARM_INSTRUCTION_SET = "arm" PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" + + +DISTRO_FEATURES_EGLIBC = "locale-code nsswitch rtld-debug posix-clang-wchar " +#DISTRO_FEATURES_EGLIBC = "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \ +# crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \ +# getlogin idn inet inet-anl libm libm-big locales locale-code \ +# memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \ +# utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc posix-wchar-io \ +# " +OE_FEATURES := "${@features_to_eglibc_settings(d)}" +do_configure_prepend() { + echo '${OE_FEATURES}' > ${B}/option-groups.config +} -- 1.7.1 --------------060803050705070503050108-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mx1.pokylinux.org (Postfix) with ESMTP id 75F8E4C804D4 for ; Mon, 25 Apr 2011 20:33:29 -0500 (CDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id p3Q1XSYu024366 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 25 Apr 2011 18:33:28 -0700 (PDT) Received: from [128.224.163.157] (128.224.163.157) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Mon, 25 Apr 2011 18:33:27 -0700 Message-ID: <4DB620F5.3010709@windriver.com> Date: Tue, 26 Apr 2011 09:33:41 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Hatle, Mark" References: <4DB0F192.6020809@windriver.com> In-Reply-To: <4DB0F192.6020809@windriver.com> X-Originating-IP: [128.224.163.157] Cc: poky@yoctoproject.org Subject: About minimal image X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 01:33:29 -0000 X-Groupsio-MsgNum: 5540 Content-Type: multipart/mixed; boundary="------------040403020208060004050908" --------------040403020208060004050908 Content-Type: multipart/alternative; boundary="------------030602060300020100010908" --------------030602060300020100010908 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Hi Mark, I have read your mail about minimal image posted on Feb 19 on this mail list. We try to reduce image size by what your said: 1. eglic configurability 2. using mklibs Right now after migrate eglic configurability to my local yocto branch, and I only enable 4 options ("locale-code nsswitch rtld-debug posix-clang-wchar ", pls. check in attachment) of eglibc just to make compile pass. When after create minimal image, the rootfs (tar.bz2) is still about 3.4M, same size as without adding configurability to eglibc. Could you give me some directions what should we do in next step? We also hope some information about how to use mklibs to reduce packages and image size? Thanks and Regards, Kai --------------030602060300020100010908 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit  Hi Mark,

I have read your mail about minimal image posted on Feb 19 on this mail list.  We try to reduce image size by what your said:

  1. eglic configurability
  2. using mklibs

Right now after migrate eglic configurability to my local yocto branch, and I only enable 4 options ("locale-code nsswitch rtld-debug posix-clang-wchar ", pls. check in attachment) of eglibc just to make compile pass.

When after create minimal image, the rootfs (tar.bz2) is still about 3.4M, same size as without adding  configurability to eglibc.

Could you give me some directions what should we do in next step? We also hope some information about how to use mklibs to reduce packages and image size?

Thanks and Regards,
Kai

--------------030602060300020100010908-- --------------040403020208060004050908 Content-Type: text/x-patch; name="0001-eglibc-migrate-configurability-from-oe.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-eglibc-migrate-configurability-from-oe.patch" >From 410f884c4bd0b2037d1df22ccdcd0bfb3c54ffdc Mon Sep 17 00:00:00 2001 From: Kang Kai Date: Thu, 21 Apr 2011 15:23:27 +0800 Subject: [PATCH] eglibc: migrate configurability from oe migrate configurability from oe, try to shrink minimal image size Signed-off-by: Kang Kai --- meta/recipes-core/eglibc/eglibc-options.inc | 51 +++++++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc.inc | 14 +++++++ 2 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-options.inc diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc new file mode 100644 index 0000000..0af0aab --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-options.inc @@ -0,0 +1,51 @@ +def eglibc_cfg(feature, features, tokens, cnf ): + if type(tokens) == type(""): + tokens = [tokens] + if type(features) == type([]) and feature in features: + cnf.extend([token + ' = y' for token in tokens]) + else: + cnf.extend([token + ' = n' for token in tokens]) + +# Map distro features to eglibc options settings +def features_to_eglibc_settings(d): + cnf = ([]) + distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split() + eglibc_cfg('ipv6', distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf) + eglibc_cfg('backtrace', distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf) + eglibc_cfg('big-macros', distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf) + eglibc_cfg('bsd', distro_features, 'OPTION_EGLIBC_BSD', cnf) + eglibc_cfg('cxx-tests', distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf) + eglibc_cfg('catgets', distro_features, 'OPTION_EGLIBC_CATGETS', cnf) + eglibc_cfg('charsets', distro_features, 'OPTION_EGLIBC_CHARSETS', cnf) + eglibc_cfg('crypt', distro_features, 'OPTION_EGLIBC_CRYPT', cnf) + eglibc_cfg('crypt-ufc', distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf) + eglibc_cfg('db-aliases', distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf) + eglibc_cfg('envz', distro_features, 'OPTION_EGLIBC_ENVZ', cnf) + eglibc_cfg('fcvt', distro_features, 'OPTION_EGLIBC_FCVT', cnf) + eglibc_cfg('fmtmsg', distro_features, 'OPTION_EGLIBC_FMTMSG', cnf) + eglibc_cfg('fstab', distro_features, 'OPTION_EGLIBC_FSTAB', cnf) + eglibc_cfg('ftraverse', distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf) + eglibc_cfg('getlogin', distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf) + eglibc_cfg('idn', distro_features, 'OPTION_EGLIBC_IDN', cnf) + eglibc_cfg('inet', distro_features, 'OPTION_EGLIBC_INET', cnf) + eglibc_cfg('inet-anl', distro_features, 'OPTION_EGLIBC_INET_ANL', cnf) + eglibc_cfg('libm', distro_features, 'OPTION_EGLIBC_LIBM', cnf) + eglibc_cfg('libm-big', distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf) + eglibc_cfg('locales', distro_features, 'OPTION_EGLIBC_LOCALES', cnf) + eglibc_cfg('locale-code', distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf) + eglibc_cfg('memusage', distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf) + eglibc_cfg('nis', distro_features, 'OPTION_EGLIBC_NIS', cnf) + eglibc_cfg('nsswitch', distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf) + eglibc_cfg('rcmd', distro_features, 'OPTION_EGLIBC_RCMD', cnf) + eglibc_cfg('rtld-debug', distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf) + eglibc_cfg('spawn', distro_features, 'OPTION_EGLIBC_SPAWN', cnf) + eglibc_cfg('streams', distro_features, 'OPTION_EGLIBC_STREAMS', cnf) + eglibc_cfg('sunrpc', distro_features, 'OPTION_EGLIBC_SUNRPC', cnf) + eglibc_cfg('utmp', distro_features, 'OPTION_EGLIBC_UTMP', cnf) + eglibc_cfg('utmpx', distro_features, 'OPTION_EGLIBC_UTMPX', cnf) + eglibc_cfg('wordexp', distro_features, 'OPTION_EGLIBC_WORDEXP', cnf) + eglibc_cfg('posix-clang-wchar', distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf) + eglibc_cfg('posix-regexp', distro_features, 'OPTION_POSIX_REGEXP', cnf) + eglibc_cfg('posix-regexp-glibc', distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf) + eglibc_cfg('posix-wchar-io', distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf) + return "\n".join(cnf) diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc index 8314cb1..d5016bf 100644 --- a/meta/recipes-core/eglibc/eglibc.inc +++ b/meta/recipes-core/eglibc/eglibc.inc @@ -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" @@ -37,3 +38,16 @@ INHIBIT_DEFAULT_DEPS = "1" ARM_INSTRUCTION_SET = "arm" PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" + + +DISTRO_FEATURES_EGLIBC = "locale-code nsswitch rtld-debug posix-clang-wchar " +#DISTRO_FEATURES_EGLIBC = "ipv6 backtrace big-macros bsd cxx-tests catgets charsets \ +# crypt crypt-ufc db-aliases envz fcvt fmtmsg fstab ftraverse \ +# getlogin idn inet inet-anl libm libm-big locales locale-code \ +# memusage nis nsswitch rcmd rtld-debug spawn streams sunrpc utmp \ +# utmpx wordexp posix-clang-wchar posix-regexp posix-regexp-glibc posix-wchar-io \ +# " +OE_FEATURES := "${@features_to_eglibc_settings(d)}" +do_configure_prepend() { + echo '${OE_FEATURES}' > ${B}/option-groups.config +} -- 1.7.1 --------------040403020208060004050908-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mx1.pokylinux.org (Postfix) with ESMTP id 045E84C804FF for ; Tue, 26 Apr 2011 00:39:51 -0500 (CDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id p3Q5dp7e024510 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 25 Apr 2011 22:39:51 -0700 (PDT) Received: from [128.224.163.157] (128.224.163.157) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Mon, 25 Apr 2011 22:39:50 -0700 Message-ID: <4DB65AB6.4040208@windriver.com> Date: Tue, 26 Apr 2011 13:40:06 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Hatle, Mark" References: <4DB0F192.6020809@windriver.com> <4DB620F5.3010709@windriver.com> In-Reply-To: <4DB620F5.3010709@windriver.com> X-Originating-IP: [128.224.163.157] Cc: poky@yoctoproject.org Subject: Re: About minimal image X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 05:39:52 -0000 Content-Type: multipart/alternative; boundary="------------060505090105050102030403" --------------060505090105050102030403 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Hi Mark, > I have read your mail about minimal image posted on Feb 19 on this > mail list. We try to reduce image size by what your said: > > 1. eglic configurability > 2. using mklibs > > > Right now after migrate eglic configurability to my local yocto > branch, and I only enable 4 options ("locale-code nsswitch rtld-debug > posix-clang-wchar ", pls. check in attachment) of eglibc just to make > compile pass. > > When after create minimal image, the rootfs (tar.bz2) is still about > 3.4M, same size as without adding configurability to eglibc. > > Could you give me some directions what should we do in next step? We > also hope some information about how to use mklibs to reduce packages > and image size? After open MKLIBS_OPTIMIZED_IMAGES ?= "core-image-minimal" in local.conf, the minimal image decrease from 3.4M to 3.1M, after extraction is 8.1M( vs. 8.4M before using mklibs). It looks like not so efficient as we expected. Should I try to reduce busybox size at same time?Such as remove some not so usually used commands by configurations? Any suggestion or guild will be appreciate! Thanks and Regards, Kai > > > _______________________________________________ > poky mailing list > poky@yoctoproject.org > https://lists.yoctoproject.org/listinfo/poky --------------060505090105050102030403 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi Mark,

I have read your mail about minimal image posted on Feb 19 on this mail list.  We try to reduce image size by what your said:

  1. eglic configurability
  2. using mklibs

Right now after migrate eglic configurability to my local yocto branch, and I only enable 4 options ("locale-code nsswitch rtld-debug posix-clang-wchar ", pls. check in attachment) of eglibc just to make compile pass.

When after create minimal image, the rootfs (tar.bz2) is still about 3.4M, same size as without adding  configurability to eglibc.

Could you give me some directions what should we do in next step? We also hope some information about how to use mklibs to reduce packages and image size?
After open MKLIBS_OPTIMIZED_IMAGES ?= "core-image-minimal" in local.conf, the minimal image decrease from 3.4M to 3.1M, after extraction is 8.1M( vs. 8.4M before using mklibs). It looks like not so efficient as we expected.

Should I try to reduce busybox size at same time?Such as remove some not so usually used commands by configurations?

Any suggestion or guild will be appreciate!

Thanks and Regards,
Kai

_______________________________________________ poky mailing list poky@yoctoproject.org https://lists.yoctoproject.org/listinfo/poky

--------------060505090105050102030403-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mx1.pokylinux.org (Postfix) with ESMTP id 1E8824C80332 for ; Tue, 26 Apr 2011 12:41:32 -0500 (CDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id p3QHfVxM004479 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 26 Apr 2011 10:41:31 -0700 (PDT) Received: from Macintosh-5.local (172.25.36.228) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.1.255.0; Tue, 26 Apr 2011 10:41:31 -0700 Message-ID: <4DB703CA.1000803@windriver.com> Date: Tue, 26 Apr 2011 12:41:30 -0500 From: Mark Hatle Organization: Wind River Systems User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Kang Kai References: <4DB0F192.6020809@windriver.com> <4DB620F5.3010709@windriver.com> <4DB65AB6.4040208@windriver.com> In-Reply-To: <4DB65AB6.4040208@windriver.com> Cc: poky@yoctoproject.org Subject: Re: About minimal image X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 17:41:32 -0000 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 4/26/11 12:40 AM, Kang Kai wrote: > Hi Mark, > Apologies for the late response. I've been out of the office... >> I have read your mail about minimal image posted on Feb 19 on this mail list. >> We try to reduce image size by what your said: >> >> 1. eglic configurability eglibc configuration should affect the size of things greatly... >> 2. using mklibs >> >> >> Right now after migrate eglic configurability to my local yocto branch, and I >> only enable 4 options ("locale-code nsswitch rtld-debug posix-clang-wchar ", >> pls. check in attachment) of eglibc just to make compile pass. locale-code, nsswitch and any of the "wchar" options add a significant amount of space to the eglibc environment. (I don't know what rtld-debug does, so I don't know how to quantify it's effects on the rootfs size.) If disabling any of these items causes a failure when building eglibc itself, we need to fix these issues and/or report them upstream. >> When after create minimal image, the rootfs (tar.bz2) is still about 3.4M, >> same size as without adding configurability to eglibc. >> You need to look at the files on the image, not the overall size of the image. Figure out where the larger items are any why they are there. This should help explain what is making the "optimized" minimal so big. >> Could you give me some directions what should we do in next step? We also hope >> some information about how to use mklibs to reduce packages and image size? > After open MKLIBS_OPTIMIZED_IMAGES ?= "core-image-minimal" in local.conf, the > minimal image decrease from 3.4M to 3.1M, after extraction is 8.1M( vs. 8.4M > before using mklibs). It looks like not so efficient as we expected. mklibs relinks the libc binary to remove objects that were not used. While the eglibc configuration simply disables various features in order to save space. The two are complementary.. but the more features you disable, the less mklibs will save. > Should I try to reduce busybox size at same time?Such as remove some not so > usually used commands by configurations? I suspect that the size and configuration of busybox is also affecting which items you need to have enabled within the eglibc configuration -- and which items mklibs is determining are needed. > Any suggestion or guild will be appreciate! I would suggest that you evaluate busybox and see if there are any components you can disable there as well -- while leaving the system somewhat functional. The biggest problem with any of these "smallest system" exercises is that you need to have a target of functionality so that you can make the proper decisions. If the target is current configuration -- then likely we're about at a minimum already.. however if the target is to boot into a shell, we can disable a lot of busybox and simply enable the dash capabilities -- or even one of the lesser non-POSIX shells. --Mark > Thanks and Regards, > Kai >> >> >> _______________________________________________ >> poky mailing list >> poky@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/poky > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mx1.pokylinux.org (Postfix) with ESMTP id D403F4C803D6 for ; Tue, 26 Apr 2011 20:55:19 -0500 (CDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id p3R1tJ9i029241 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 26 Apr 2011 18:55:19 -0700 (PDT) Received: from [128.224.163.157] (128.224.163.157) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Tue, 26 Apr 2011 18:55:18 -0700 Message-ID: <4DB777A3.5080901@windriver.com> Date: Wed, 27 Apr 2011 09:55:47 +0800 From: Kang Kai User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Mark Hatle References: <4DB0F192.6020809@windriver.com> <4DB620F5.3010709@windriver.com> <4DB65AB6.4040208@windriver.com> <4DB703CA.1000803@windriver.com> In-Reply-To: <4DB703CA.1000803@windriver.com> X-Originating-IP: [128.224.163.157] Cc: poky@yoctoproject.org Subject: Re: About minimal image X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 01:55:20 -0000 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Hi Mark, > On 4/26/11 12:40 AM, Kang Kai wrote: >> Hi Mark, >> > Apologies for the late response. I've been out of the office... > >>> I have read your mail about minimal image posted on Feb 19 on this mail list. >>> We try to reduce image size by what your said: >>> >>> 1. eglic configurability > eglibc configuration should affect the size of things greatly... > >>> 2. using mklibs >>> >>> >>> Right now after migrate eglic configurability to my local yocto branch, and I >>> only enable 4 options ("locale-code nsswitch rtld-debug posix-clang-wchar ", >>> pls. check in attachment) of eglibc just to make compile pass. > locale-code, nsswitch and any of the "wchar" options add a significant amount of > space to the eglibc environment. (I don't know what rtld-debug does, so I don't > know how to quantify it's effects on the rootfs size.) > > If disabling any of these items causes a failure when building eglibc itself, we > need to fix these issues and/or report them upstream. I'll take that as the direction is right, disable all configurable options to reduce the image size. :) And I will try to figure out why disable these 4 options will cause eglibc build failure. >>> When after create minimal image, the rootfs (tar.bz2) is still about 3.4M, >>> same size as without adding configurability to eglibc. >>> > You need to look at the files on the image, not the overall size of the image. > Figure out where the larger items are any why they are there. This should help > explain what is making the "optimized" minimal so big. ok, I'll do it. >>> Could you give me some directions what should we do in next step? We also hope >>> some information about how to use mklibs to reduce packages and image size? >> After open MKLIBS_OPTIMIZED_IMAGES ?= "core-image-minimal" in local.conf, the >> minimal image decrease from 3.4M to 3.1M, after extraction is 8.1M( vs. 8.4M >> before using mklibs). It looks like not so efficient as we expected. > mklibs relinks the libc binary to remove objects that were not used. While the > eglibc configuration simply disables various features in order to save space. > The two are complementary.. but the more features you disable, the less mklibs > will save. > >> Should I try to reduce busybox size at same time?Such as remove some not so >> usually used commands by configurations? > I suspect that the size and configuration of busybox is also affecting which > items you need to have enabled within the eglibc configuration -- and which > items mklibs is determining are needed. > >> Any suggestion or guild will be appreciate! > I would suggest that you evaluate busybox and see if there are any components > you can disable there as well -- while leaving the system somewhat functional. > > The biggest problem with any of these "smallest system" exercises is that you > need to have a target of functionality so that you can make the proper > decisions. If the target is current configuration -- then likely we're about at > a minimum already.. however if the target is to boot into a shell, we can > disable a lot of busybox and simply enable the dash capabilities -- or even one > of the lesser non-POSIX shells. I will ask Saul and Richard for more detailed requirements. Thank you very much! Regards, Kai