The Following 4 Users Say Thank You to Joorin For This Useful Post: | ||
|
2010-04-21
, 21:43
|
|
Posts: 1,665 |
Thanked: 1,649 times |
Joined on Jun 2008
@ Praha, Czech Republic
|
#2
|
The Following User Says Thank You to Andre Klapper For This Useful Post: | ||
|
2010-04-21
, 21:52
|
|
Posts: 1,296 |
Thanked: 1,773 times |
Joined on Aug 2009
@ Budapest, Hungary
|
#3
|
The Following User Says Thank You to Venemo For This Useful Post: | ||
|
2010-04-21
, 22:00
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#4
|
This is very nice.
However, why did you bother?
Doesn't MADDE work with Fedora?
|
2010-04-22
, 06:46
|
Posts: 62 |
Thanked: 97 times |
Joined on Dec 2009
@ Finland, Kerava
|
#5
|
The Following 2 Users Say Thank You to rontti For This Useful Post: | ||
|
2010-04-28
, 06:50
|
|
Posts: 122 |
Thanked: 135 times |
Joined on Dec 2009
@ Helsinki
|
#6
|
|
2010-04-28
, 07:34
|
Posts: 62 |
Thanked: 97 times |
Joined on Dec 2009
@ Finland, Kerava
|
#7
|
The Following User Says Thank You to rontti For This Useful Post: | ||
The result is a working toolchain with an x86 compiler that generates ARM code. Since this set-up is not for the faint of heart, I won't go into all the details since I butchered some of the Debian package mechanics just to get things to work, but I hope someone might find this interesting and experiment without feeling the need to use something just because you're told to.
The base of everything is the rootstrap that's available for download. There is an x86 and an ARM version and I installed them on my Fedora machine and my N900 respectively. Just from this you can chroot to it and play around with a working compiler.
The rootstrap is very basic and leaves you with a /.dev directory thats empty so you need to at least create /dev/null.
Now I need the contents of /lib and /usr/lib from my N900 to be able to link my applications and this is just a matter or copying from the device to my machine. The headers needed to compile are easily installed using apt-get.
Finally, the trickiest part, is to get the toolchain with its compiler and linker to work inside the chroot:ed haven. I tinkered a bit, got some suggestions from people and ended up with these variables in my Makefile:
I'm sure I've overlooked some important step but this is how I remember it. Most things are solved either with Google, the nice people in #maemo-devel or just being curious.