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