<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 2011年06月09日 23:20, Mark Hatle wrote:
<blockquote cite="mid:4DF0E4A8.1000608@windriver.com" type="cite">
<pre wrap="">On 6/9/11 5:57 AM, Kang Kai wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Mark,
I am focus on eglibc itself compilation with disabling all the
configurable options, right now eglibc can be compiled with disable all
the configurable options.
But when I build core-image-minimal in a clear new directory, some
packages build failed and they need eglibc supports, such as
</pre>
</blockquote>
<pre wrap="">
core-image-minimal is simply to large of an image to see some of the advantages
of the eglibc configuration. Realistically the advantages come on single
application or small (busybox + single application) systems.
</pre>
<blockquote type="cite">
<pre wrap="">gcc-runtime depends on libc-libm
</pre>
</blockquote>
<pre wrap="">
The above looks like a bug to me and should be investigated.. (a bug in gcc that
is..)
</pre>
<blockquote type="cite">
<pre wrap="">ncurse depends on libc-posix-wchar-io libc-posix-clang-wchar
</pre>
</blockquote>
<pre wrap="">
ncurses can be configured WITHOUT wide character support, the needs to be done
with any of the wchar options disabled in eglibc.
</pre>
<blockquote type="cite">
<pre wrap="">openssl depends on libc-inet libc-nsswitch
</pre>
</blockquote>
<pre wrap="">
I'm not sure why openssl needs either inet or nsswitch. inet perhaps if it
tries to make certain socket calls, but libc-nsswitch should never be required
outside of eglibc. This is likely a configuration issue in openssl -- or a bug
in eglibc.
</pre>
<blockquote type="cite">
<pre wrap="">gettext depends on libc-spawn libc-locale-code
libc-getlogin libc-utmp
...
</pre>
</blockquote>
<pre wrap="">
Once we introduce gettext (beyond simply it's m4 macros) we're no longer in
"small" system territory. gettext and many others really want some of the
larger system capabilities as they are designed for multilingual systems.
</pre>
<blockquote type="cite">
<pre wrap="">After enable those options, the image size only decrease from 9.6M to
9.4M(qemux86). And the dependencies on eglibc is hard to break,
something like libcrypt getlogin(function) can't be breaken.
Could you give me some directions what should I do with eglibc
configurability?
</pre>
</blockquote>
<pre wrap="">
My suggest is to start with a new custom configuration. (ignore the gcc-runtime
for right now and enable libm.) The goal of this configuration is a small,
local system -- without network connectivity.
Walk through the core-image-minimal, and you'll see:
IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
Looking at task-core-boot:
RDEPENDS_task-core-boot = "\
base-files \
base-passwd \
busybox \
initscripts \
${@base_contains("MACHINE_FEATURES", "keyboard", "keymaps", "", d)} \
modutils-initscripts \
netbase \
sysvinit \
tinylogin \
udev \
${VIRTUAL-RUNTIME_update-alternatives} \
${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
RRECOMMENDS_task-core-boot = "\
${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
>From the above, I'm pretty sure that "netbase" will require a lot of networking
components, specifically adding things like libc-inet. So avoid netbase.
It's possible that keyboard/keymaps may cause additional stuff to come in due to
locale requirements.. so I'd dump those as well..
sysvinit may also introduce some additional items -- so if it causes problems,
remove it and switch to the init located within busybox.
update-alternatives is what included gettext -- so this might need some
enhancement to avoid gettext as a requirement. So I'd suggest skipping it.
(Note without it, it's likely busybox, tinylogin may not get setup properly...)
udev is quite complex and drags in a number of components -- so drop that..
Leaving:
base-files \
base-passwd \
busybox \
initscripts \
modutils-initscripts \
sysvinit \
tinylogin
</pre>
</blockquote>
<br>
Hi Mark,<br>
<br>
According this list, expand with their run time depency(show in the
attachment minimal-image-runtime-dependies.png) , and the list is: <br>
<br>
<pre wrap=""> base-files \
base-passwd \
busybox \
busybox-syslog \
busybox-udhcpc \
initscripts \
makedevs \
modutils-initscripts \
sysvinit \
sysvinit-pidof \
sysvinit-inittab \
tinylogin</pre>
<br>
When only enable eglibc libm, busybox, sysvinit and tinylogin can't
be compiled.<br>
<br>
busybox depends on <br>
<ul>
<li>libc-crypt <br>
</li>
<li>libc-getlogin</li>
<li>libc-inet <br>
</li>
<li>libc-posix-regexp</li>
</ul>
I wonder that maybe libc-crypt can NOT be disabled? Other 3 options
can be disabled by closing some busybox feature and builtin
commands.<br>
<br>
sysvinit depends on <br>
<ul>
<li>libc-inet </li>
<li>libc-sunrpc</li>
<li>libc-crypt </li>
</ul>
I don't how to resolve them, so as you said, remove it and use
busybox init instead.<br>
<br>
tinylogin depends on
<ul>
<li>libc-crypt </li>
<li>libc-utmp</li>
<li>libc-getlogin<br>
</li>
</ul>
I am trapped here, and could you give me some more help here,
please?<br>
<br>
The picture named eglibc-options-deps-for-minimal-image.png in
attachment is the packages depends on every eglibc option that
required by other packages.<br>
<br>
There are some other dependencies cause problems.<br>
linux-yocto requires elfutils python and perl. <br>
<br>
elfutils requires gettext and gettext depends on:<br>
<ul>
<li>libc-locale-code</li>
<li>libc-spawn</li>
<li>libc-getlogin</li>
</ul>
python requires ncurses and openssl. <br>
<ul>
<li>ncurses could be update bb file to choose support wchar or
not.</li>
<li>openssl depends on:</li>
<ul>
<li>libc-inet</li>
<li>libc-nsswitch<br>
</li>
</ul>
</ul>
<br>
perl depends on:<br>
<ul>
<li>libc-crypt </li>
<li>libc-fcvt</li>
<li>libc-inet</li>
<li>libc-utmp</li>
</ul>
<br>
How to remove these dependencies? One way is to remove the
"elfutils python perl" from linux-yocto depencies, and the other is
to disable related features of these packages, and I wonder this is
too hard to finish.<br>
<br>
Thanks a lot.<br>
<br>
Regards,<br>
Kai<br>
<br>
<br>
<br>
<br>
<br>
<blockquote cite="mid:4DF0E4A8.1000608@windriver.com" type="cite">
<pre wrap="">
First see if you can compile the above with a minimal eglibc configuration. If
not I can help you work through those issues.. If you can, you SHOULD see a
fairly dramatic decrease in size.
--Mark
</pre>
<blockquote type="cite">
<pre wrap="">Thanks a lot!
I made a mistake that try eglibc configurability in a directory which
has build core-image-minimal, so the packages which depend on eglibc
didn't rebuild, and I didn't find the dependency before. I am sorry!
Regards,
Kai
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>