
solar at gentoo
Mar 17, 2011, 6:31 PM
Post #8 of 8
(823 views)
Permalink
|
On Tue, 2011-03-15 at 20:59 +0000, Ed W wrote: > On 08/03/2011 03:46, solar wrote: > > On Mon, 2011-03-07 at 14:50 +0100, Martin Gysel wrote: > >> Hi there > >> > >> I'm looking for a 'good' INSTALL_MASK file/definition to use with my > >> embedded system. As the flash on the boards is rather small I only want > >> to have the really required files on it. > >> Can anyone share his INSTALL_MASK? > > > > > > For a read-only compat flash based system and ~10 or so pkgs. I've used > > *.a *.o *.la /usr/include *.pc *.pyc *.pyo *.example *.sample > > > > Clearly you can nail it down abit more for your own needs. But for mine > > that was fairly good to grab the majorituy of the bloat. > > OK, here's my current mask. Note this is for a run only system, I build > the image elsewhere so no portage stuff required on the final image (I > do something like build the root, then strip that down a little further > by rsync'ing to the final target) > > > export INSTALL_MASK="usr/include/ usr/portage usr/share/doc > usr/share/gtk-doc usr/share/info usr/share/man var/cache/ var/db/pkg > var/lib/gentoo var/lib/portage *.a *.o .keep_* *.la *.pc *.pyc *.pyo > *.example *.sample" > > > Additionally I am playing with this for installing perl: > > 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" > > I then strip a bunch of comments out of some perl files: > sed -i -e 's/^#.*//' -e '/^$/d' > ${TARGET}/usr/lib/perl5/5.12.2/unicore/lib/*/*.pl > > > and finally build the target with something like: > > rsync -aH --progress --delete --delete-excluded \ > --exclude 'usr/portage/*' \ > --exclude 'var/db/pkg' \ > --exclude 'var/cache/*' \ > --exclude 'var/lib/portage' \ > --exclude 'var/lib/gentoo' \ > ${ROOT}/ ${TARGET} > > > Using squashfs + aufs2 (stackable squashfs so I can add more stuff > later) that gets me a fairly decent base installation including routing, > wireless, shorewall, perl and some more, in under 10MB Spiffy. You can reduce that command line some more by simply using *.h *.la is mostly safe, but there can be a gotcha with it when a program links with ltdl. -- solar <solar [at] gentoo> Gentoo Linux
|