From: Ed W <lists@wildgooses.com>
To: gentoo-embedded@lists.gentoo.org
Subject: [gentoo-embedded] Stripping down Perl install
Date: Fri, 18 Mar 2011 11:41:58 +0000 [thread overview]
Message-ID: <4D834506.5000605@wildgooses.com> (raw)
Hi, I'm trying to strip perl down as much as possible for a small
embedded server. The end app will just run server type applications
(and possibly a perl based web application for configuration). All
modules needed will be bundled in the build so I have removed CPAN,
debugger, headers, etc
Another design point is that I have decided that I don't need to support
locale's other than the main english, unicode (and unicode european
languages).
OK, so this is my INSTALL_MASK to install perl (ignore the line breaks)
export INSTALL_MASK="${INSTALL_MASK} */usr/lib/perl5/*.h
usr/lib/perl5/5.*/ExtUtils/
usr/lib/perl5/5.*/CPAN/
usr/lib/perl5/5.*/CPANPLUS/
usr/lib/perl5/5.*/*-linux-*/auto/Encode/JP
usr/lib/perl5/5.*/*-linux-*/auto/Encode/KR
usr/lib/perl5/5.*/*-linux-*/auto/Encode/CN
usr/lib/perl5/5.*/*-linux-*/auto/Encode/TW
usr/lib/perl5/5.*/*-linux-*/Devel/
usr/lib/perl5/5.*/*-linux-*/auto/Devel/
usr/lib/perl5/5.*/Module/CoreList.pm
usr/lib/perl5/5.*/Module/Build*
usr/lib/perl5/5.*/perl5db.pl usr/lib
/perl5/5.*/[Pp]od
usr/lib/perl5/5.*/unicore/mktables
usr/lib/perl5/5.*/unicore/TestProp.pl
*/usr/lib/perl5/5.*/unicore/*.txt
*/usr/lib/perl5/*.pod"
Afterwards I then strip a huge bunch of comments out of some perl files:
sed -i -e 's/^#.*//' -e '/^$/d' \
${TARGET}/usr/lib/perl5/5.12.2/unicore/lib/*/*.pl
Now that gets me down to some 20-30MB install size, but the squashfs
size of the same is around 4MB (vs around 10-12MB normal).
The main size reduction from here is reducing the unicode file sizes. I
have had a quick hack at this above by eliminating some of the
JP/KR/CN/TW stuff, but there is still some 10s MB that could be removed.
I think the solution is to understand how mktables works and customise
it so that it generates only the required lookup tables? Anyone got any
experience or solutions?
Any other ideas on shrinking the install further? (I'm a bit reluctant
to strip too many core modules at this stage until the final build is
decided - also most only consume a few KBs...)
Thanks
Ed W
next reply other threads:[~2011-03-18 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 11:41 Ed W [this message]
2011-03-18 13:53 ` [gentoo-embedded] Stripping down Perl install Arkadi Shishlov
2011-03-18 14:43 ` Ed W
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=4D834506.5000605@wildgooses.com \
--to=lists@wildgooses.com \
--cc=gentoo-embedded@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox