1 |
Tomasz Chmielewski wrote: |
2 |
|
3 |
>> Duplicating...you mean like the work openwrt has already done? |
4 |
> |
5 |
> Either openwrt or gentoo-mips folks. |
6 |
> It seems to me that there is a chance that gentoo-mips will have more |
7 |
> apps ported than openwrt (which doesn't really have many applications |
8 |
> ported). |
9 |
|
10 |
There's little "porting" to be honest. At most, porting simply entails |
11 |
recompiling the target application so it links with the shared libs (or static, |
12 |
if that's your preference) of the target architecture. Sometimes, porting |
13 |
involves writing new code, as some apps are arch-specific and don't port easily |
14 |
(ltrace, for example). |
15 |
|
16 |
Gentoo simply facilitates easier porting in a sense because of the nature of the |
17 |
distribution (source-based). If you discover an app needs a patch or a decent |
18 |
re-write, it's easy to plug the patch into the ebuild to have it added before |
19 |
the app is compiled. That said though, cross-compiling on Gentoo is still |
20 |
somewhat incomplete. We've got mechanisms in-place that can theoretically allow |
21 |
one to cross-compile an entire userland just about, but it's wholly untested and |
22 |
there's little real documentation on how it all works yet. Really only for |
23 |
people who have a solid grasp of the dark, voodoo-like nature of cross compiling. |
24 |
|
25 |
|
26 |
>> Theoretically, our mipsel uclibc stages would let you do that, except |
27 |
>> that apparently qemu for mips still has problems with userland programs. |
28 |
> |
29 |
> Have you read qemu 0.8.0 changelog? It was released a couple of days ago. |
30 |
> |
31 |
> - MIPS and MIPSel User Linux emulation |
32 |
|
33 |
Qemu may allow running of userland programs, but it's still an emulator at |
34 |
heart. It's buggy, slower than Windows Millennium on a P75, and only, as geoman |
35 |
states, emulates a specific CPU. I don't doubt Qemu will get better over time, |
36 |
but it's not an application we in the Gentoo/MIPS project will look at seriously |
37 |
for a decent time to come. |
38 |
|
39 |
|
40 |
>> That and I don't think qemu is particularly fast. |
41 |
> |
42 |
> Whatever slow it is, it will be faster than trying to compile anything |
43 |
> natively on these tiny routers :) |
44 |
|
45 |
Thou hath not tryeth to compileth glibc upon a RaQ2 of Cobalt, have thee? :) |
46 |
|
47 |
Granted you can jack the RAM in a cobalt to a decent size for it to suck down |
48 |
behemoths like glibc, assuming you got an emulator to work, the emulator would |
49 |
likely be slower than a RaQ2, and probably slower than native compiles. The |
50 |
only upside is being able to feed the emulated environment more RAM. |
51 |
|
52 |
|
53 |
> So, this means, that if I build a whole gentoo-mips under qemu - sounds |
54 |
> easy, doesn't it? :), with mipsel uclibc stages/-march=mips32, almost |
55 |
> each and every binary copied from such a system should run on these tiny |
56 |
> routers? |
57 |
|
58 |
You've got the right idea on paper, but actual implementation will probably |
59 |
reveal the difficulties involved. Not every app is going to port cleanly or |
60 |
probably even operate properly. |
61 |
|
62 |
|
63 |
> I'm quite new to other architectures than x86. |
64 |
|
65 |
We generally discourage people who are new to non-x86 from venturing off into |
66 |
experiments like this initially. The experiment can sometimes be overwhelming, |
67 |
anf frustration eventually kills off any motivation to complete it. Our usual |
68 |
suggestion is to get yourself a cheap SGI Box, like an Indy or an O2, play with |
69 |
it for a few months and learn how MIPS works, then you'll have an idea of how |
70 |
stuff works in comparison to their more inefficient x86 cousins. Other archs, |
71 |
like Sparc, work well too as non-x86 playtoys. Then the original task can |
72 |
sometimes be easier (but not always). |
73 |
|
74 |
|
75 |
|
76 |
--Kumba |
77 |
|
78 |
-- |
79 |
Gentoo/MIPS Team Lead |
80 |
Gentoo Foundation Board of Trustees |
81 |
|
82 |
"Such is oft the course of deeds that move the wheels of the world: small hands |
83 |
do them because they must, while the eyes of the great are elsewhere." --Elrond |
84 |
-- |
85 |
gentoo-mips@g.o mailing list |