From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Jack <jackrubby2010@gmail.com>
Cc: yocto@yoctoproject.org
Subject: Re: How can I remove packages from rootfs file ?
Date: Sun, 26 May 2013 12:41:22 +0100 [thread overview]
Message-ID: <5394411.Nd6qyTtVKA@helios> (raw)
In-Reply-To: <loom.20130525T145157-762@post.gmane.org>
On Saturday 25 May 2013 13:58:46 Jack wrote:
> I maked a fsl-image-minaml rootfs file and customized it with adding
> particular packages. For example, I added
> IMAGE_INSTALL_append_pn-fsl-image-minimal = " task-core-ssh-openssh
> task-core-nfs-server" in local.conf file. The problem is that, the rootfs
> file has 6-7 MB capacity but this capacity of file is very high and not
> acceptable to me. So how can I remove some packages from rootfs file that I
> do not want ?
There are several different aspects to answering this question.
The list of packages to be installed is composed of several things - the list
of packages specified in IMAGE_INSTALL, packages brought in by IMAGE_FEATURES,
and packages brought in to satisfy dependencies of either of the first two.
One way to analyse the contents of your image is to enable buildhistory [1]
which gives you the full list of installed packages, installed packages by
size, as well as graphs (.dot) that will show you the dependency relationships
between the packages. These dot graphs can be viewed by converting them to
images using the "dot" command (from graphviz) or using a viewer such as xdot
[2].
Once you've analysed things at this level, you may find there are dependency
relationships that can't easily be broken, or some packages that are overly
large. At this point you will need to start looking at changing the build
configuraton of the packages in question - disabling optional functionalty,
removing optional dependencies etc. (usually this would be done by changing
DISTRO_FEATURES, modifying the kernel configuration, changing PACKAGECONFIG
options for individual recipes, or if those aren't available modifying
EXTRA_OECONF). How far you want to go with this depends on how much you want
to optimise the size of your image.
If you do find you need to go down the latter path, I'd recommend checking out
Darren Hart's presentation "Tuning Embedded Linux - When Less is More" [3].
> For example, remove packages like ar, arping, basename, telnet, beep, .....
Note that whilst some of these may be from packages you can remove, many of
them may be functionality provided by busybox, i.e. where the command is just
a symlink to the busybox binary. You can modify the busybox build-time
configuration to disable these, but bear in mind that disabling them
usually only saves you a few kB. For some applications that may be a useful
saving, of course.
HTH.
Cheers,
Paul
[1] http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#maintaining-build-output-quality
[2] https://github.com/jrfonseca/xdot.py
[3] Slides: http://elinux.org/images/2/2b/Elce11_hart.pdf
Video: http://www.youtube.com/watch?v=WHLvI8j31vk
--
Paul Eggleton
Intel Open Source Technology Centre
next prev parent reply other threads:[~2013-05-26 11:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 13:58 How can I remove packages from rootfs file ? Jack
2013-05-26 6:31 ` Jack
2013-05-26 11:41 ` Paul Eggleton [this message]
2013-05-27 7:03 ` Nicolas Dechesne
2013-05-28 13:49 ` Jack
2013-05-28 14:14 ` Nicolas Dechesne
2013-05-27 14:56 ` Jack
2013-05-27 18:33 ` Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5394411.Nd6qyTtVKA@helios \
--to=paul.eggleton@linux.intel.com \
--cc=jackrubby2010@gmail.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.