Gentoo Archives: gentoo-embedded

From: solar <solar@g.o>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] Suggestion for INSTALL_MASK
Date: Fri, 18 Mar 2011 02:04:44
Message-Id: 1300411894.5453.3.camel@here
In Reply to: Re: [gentoo-embedded] Suggestion for INSTALL_MASK by Ed W
1 On Tue, 2011-03-15 at 20:59 +0000, Ed W wrote:
2 > On 08/03/2011 03:46, solar wrote:
3 > > On Mon, 2011-03-07 at 14:50 +0100, Martin Gysel wrote:
4 > >> Hi there
5 > >>
6 > >> I'm looking for a 'good' INSTALL_MASK file/definition to use with my
7 > >> embedded system. As the flash on the boards is rather small I only want
8 > >> to have the really required files on it.
9 > >> Can anyone share his INSTALL_MASK?
10 >
11 >
12 > >
13 > > For a read-only compat flash based system and ~10 or so pkgs. I've used
14 > > *.a *.o *.la /usr/include *.pc *.pyc *.pyo *.example *.sample
15 > >
16 > > Clearly you can nail it down abit more for your own needs. But for mine
17 > > that was fairly good to grab the majorituy of the bloat.
18 >
19 > OK, here's my current mask. Note this is for a run only system, I build
20 > the image elsewhere so no portage stuff required on the final image (I
21 > do something like build the root, then strip that down a little further
22 > by rsync'ing to the final target)
23 >
24 >
25 > export INSTALL_MASK="usr/include/ usr/portage usr/share/doc
26 > usr/share/gtk-doc usr/share/info usr/share/man var/cache/ var/db/pkg
27 > var/lib/gentoo var/lib/portage *.a *.o .keep_* *.la *.pc *.pyc *.pyo
28 > *.example *.sample"
29 >
30 >
31 > Additionally I am playing with this for installing perl:
32 >
33 > export INSTALL_MASK="${INSTALL_MASK} */usr/lib/perl5/*.h
34 > usr/lib/perl5/5.*/ExtUtils/ usr/lib/perl5/5.*/CPAN/
35 > usr/lib/perl5/5.*/CPANPLUS/ usr/lib/perl5/5.*/*-linux-*/auto/Encode/JP
36 > usr/lib/perl5/5.*/*-linux-*/auto/Encode/KR
37 > usr/lib/perl5/5.*/*-linux-*/auto/Encode/CN
38 > usr/lib/perl5/5.*/*-linux-*/auto/Encode/TW
39 > usr/lib/perl5/5.*/*-linux-*/Devel/
40 > usr/lib/perl5/5.*/*-linux-*/auto/Devel/
41 > usr/lib/perl5/5.*/Module/CoreList.pm usr/lib/perl5/5.*/Module/Build*
42 > usr/lib/perl5/5.*/perl5db.pl usr/lib
43 > /perl5/5.*/[Pp]od usr/lib/perl5/5.*/unicore/mktables
44 > usr/lib/perl5/5.*/unicore/TestProp.pl */usr/lib/perl5/5.*/unicore/*.txt
45 > */usr/lib/perl5/*.pod"
46 >
47 > I then strip a bunch of comments out of some perl files:
48 > sed -i -e 's/^#.*//' -e '/^$/d'
49 > ${TARGET}/usr/lib/perl5/5.12.2/unicore/lib/*/*.pl
50 >
51 >
52 > and finally build the target with something like:
53 >
54 > rsync -aH --progress --delete --delete-excluded \
55 > --exclude 'usr/portage/*' \
56 > --exclude 'var/db/pkg' \
57 > --exclude 'var/cache/*' \
58 > --exclude 'var/lib/portage' \
59 > --exclude 'var/lib/gentoo' \
60 > ${ROOT}/ ${TARGET}
61 >
62 >
63 > Using squashfs + aufs2 (stackable squashfs so I can add more stuff
64 > later) that gets me a fairly decent base installation including routing,
65 > wireless, shorewall, perl and some more, in under 10MB
66
67
68 Spiffy. You can reduce that command line some more by simply using *.h
69
70 *.la is mostly safe, but there can be a gotcha with it when a program
71 links with ltdl.
72
73
74 --
75 solar <solar@g.o>
76 Gentoo Linux