1 |
On Thursday 07 October 2004 12:37 pm, Ned Ludd wrote: |
2 |
> On Thu, 2004-10-07 at 12:08, Marius Schäfer wrote: |
3 |
> > On Wednesday 06 October 2004 01:09, Ned Ludd wrote: |
4 |
> > > On Mon, 2004-10-04 at 23:33, Chris White wrote: |
5 |
> > > > All, |
6 |
> > > > |
7 |
> > > > Maybe I've just not seen this, but what sort of footprint does |
8 |
> > > > portage leave on embedded systems with low cpu/ram? |
9 |
> > > |
10 |
> > > I think what your asking about here is what we are starting to coin as |
11 |
> > > a gentoo-lite system. A lot of people are gaining an interest in this. |
12 |
> > > Running gentoo with portage on crappy old hardware. Or they just want |
13 |
> > > the performance boast and lower memory usage. For a system like this |
14 |
> > > I'd think you would want atleast a P75 with atleast 32M of of ram. |
15 |
> > > Portage is not so big. But python itself is a beast. |
16 |
> > > |
17 |
> > > In one experiment I've managed to get pythons runtime down to about 2 |
18 |
> > > Megs of HD space. And in another experiment with the portage tree |
19 |
> > > itself |
20 |
> > |
21 |
> > How did you do that? I would be interessted very much because of an other |
22 |
> > project of mine. |
23 |
> |
24 |
> compile with -Os |
25 |
> delete the crap modules that you will never need. |
26 |
> test/lib-tk/curses and a few others that you don't really need. |
27 |
> rm all the .pyo/.pyc files. |
28 |
> export PYTHON_DONTCOMPILE=1 ; so they never get compiled again. This is |
29 |
> gentoo patch only. Naturally it wont be as fast cuz your using non |
30 |
> bytecoded versions. |
31 |
> kill off the /usr/include/python2.*/*.h files |
32 |
> About 2M of fat can be kill to nuking the config dir |
33 |
> /usr/lib/python2.*/config/ |
34 |
> |
35 |
> |
36 |
> If I were you and your developing an app that needs python I'd do |
37 |
> something like this. |
38 |
> |
39 |
> strace -eopen -o python-foo.txt |
40 |
> cat python-foo.txt | grep -v "No such file or directory" | grep python |
41 |
> |
42 |
> |cut -d \" -f 2 | grep -v pyo$ | grep -v pyc$ |
43 |
> |
44 |
> Oh and if you wanted to make it nicer you could patch python itself to |
45 |
> read compressed .py files using gzopen/gzread or the likes. Or make your |
46 |
> /usr/lib/python2.* a compressed read-only file which you mount in a |
47 |
> loopback. Probably get the whole mess to <=1M that way. |
48 |
> |
49 |
> -good luck. |
50 |
> |
51 |
> > Thanks |
52 |
> > Marius |
53 |
> > |
54 |
> > > I managed to get it down to 14 Megs with the use of squashfs and |
55 |
> > > excluding a few things from the tree which I know are not needed to do |
56 |
> > > emerge system. But a full portage-rsync tree compressed was about 17 |
57 |
> > > Megs |
58 |
> > > |
59 |
> > > Now if we are talking embedded systems in the way I like to think of |
60 |
> > > them (ie firmware) then the min requirements are about 4M of Ram and 3M |
61 |
> > > of flash space using a semi default setup, give or take depending on |
62 |
> > > the device your building for. |
63 |
> > > |
64 |
> > > > I ask this mainly |
65 |
> > > > because it's a Good Thing To Know (tm) considering the last LWE |
66 |
> > > > conference was full of people asking about using Gentoo for embedded |
67 |
> > > > devices. |
68 |
> > > |
69 |
> > > portage needs work and a fair bit of it. |
70 |
> > > Other than myself and mike more people need to propose ideas to the |
71 |
> > > portage team to make things more flexible. |
72 |
> > > |
73 |
> > > > Something like higher end Palms may be able to dish it out, |
74 |
> > > > but what happens when you get to lower end palms or even cell phones? |
75 |
> > > |
76 |
> > > What about them? |
77 |
> > > Most cell phones are ARM based. |
78 |
> > > Mike Frysinger is currently working on generic uclibc arm little endian |
79 |
> > > stages. When he has those complete (and most of the bugs worked out) |
80 |
> > > I'll start on generic uclibc arm big endian stages. When I have those |
81 |
> > > complete and I'm happy with it I'm going to ship the device off to OSU |
82 |
> > > so we can continue to support the arch from a (le||be) perspective. The |
83 |
> > > unit I will be developing with is a nslu2 that was a donation to the |
84 |
> > > gentoo embedded project thanks to the guys over at the nslu2-linux |
85 |
> > > project (http://www.nslu2-linux.org/) who had a fund raiser in order to |
86 |
> > > get me one. They ended up getting 9x the amount in donations needed to |
87 |
> > > send me a unit and were able to send them to a number of other embedded |
88 |
> > > projects. |
89 |
> > > |
90 |
> > > Unfortunately there are a few drawbacks to our embedded support right |
91 |
> > > now. |
92 |
> > > 1) Lack of skilled (wo)manpower. |
93 |
> > > 2) Lack of proper cross-toolchain handling by portage. So everything is |
94 |
> > > considered native-* vs cross-* (this means you must use the same host |
95 |
> > > arch as your target arch) or use a binfmt_elf kernel module to emulate |
96 |
> > > your target arch. |
97 |
> > > 3) package management for embedded devices. (no all devices are |
98 |
> > > read-only) |
99 |
> > > - ipkg format seems ideal here but I/we have not enough input from the |
100 |
> > > community to tell what will be ideal in the long run. |
101 |
> > > |
102 |
> > > If anybody that has a decent level of cross compiling experience and |
103 |
> > > thinks that they would be interested in gentoo supporting better |
104 |
> > > cross-* support please contact me. (seriously motivated people only) |
105 |
> > > |
106 |
> > > > Thanks ahead of time for any/all comments and hold on (*ChrisWhite |
107 |
> > > > prepares fireproof suit)... and flames. |
108 |
> > > |
109 |
> > > hrmm flames.. none right now but as soon as I can think of something or |
110 |
> > > get a blowtorch I'll be sure to direct it your way. |
111 |
|
112 |
-- |
113 |
gentoo-embedded@g.o mailing list |