public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] Stripping down Perl install
@ 2011-03-18 11:41 Ed W
  2011-03-18 13:53 ` Arkadi Shishlov
  0 siblings, 1 reply; 3+ messages in thread
From: Ed W @ 2011-03-18 11:41 UTC (permalink / raw
  To: gentoo-embedded

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-18 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 11:41 [gentoo-embedded] Stripping down Perl install Ed W
2011-03-18 13:53 ` Arkadi Shishlov
2011-03-18 14:43   ` Ed W

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox