Hi Eddie,
Eddie Dawydiuk wrote:
> I'm not too familiar with Gentoo... How does Gentoo handle cross
> compiling programs that don't support cross compilation(e.g. PHP) or
> programs that have inline assembly(e.g. mpg123). Does Gentoo support the
> ARM architecture? I like the idea behind Gentoo it reminds me of the
> BSDs, although I've never used it before.
Packages that don't support cross-compilation can be quite a pain -
pkgconfig for example will usually attempt to run a variety of programs
during the configure stage, and most of them will fail if the target
arch is not binary compatible with the build arch.
What I'm suggesting is to use 'crossdev', a gentoo app, to build a cross
toolchain, for making your kernel, downloading a pre-built stage
filesystem or building your own, and then using Qemu to compile
everything else natively.
After that, a native userland can be either downloaded if it already
exists, or quite easily built, and packages can be compiled natively
using Qemu.
That's what I've done for my most recent two userlands made w/ uclibc
and glibc. If a package supports inline assembly, the cross toolchain
will automatically select the right binutils / libc / linux headers to
work with when cross-compiling under gentoo, although I think that's
fairly common for any toolchain, no?
You can also use this toolchain to build your kernel. For example, I'm
toying around with the gnueabi, and what I've done is quite straight
forward.
USE="-*" \
crossdev -v \
--kernel 2.6.21 \
--libc 2.5-r3 \
--binutils 2.17 \
--gcc 4.2.0 \
--target arm-softfloat-linux-gnueabi
and then to compile my kernel, I just say
make ARCH=arm CROSS_COMPILE=arm-softfloat-linux-gnueabi-
Gentoo does support the arm architecture, and you can check out the
entire database of packages and their stability at packages.gentoo.org.
Just looking at the site, php 5.2.2-r1, 5.1.6-r11, and 4.4.7 are all
stable with the ARM arch. The package management system, portage, makes
it quite easy to maintain a repository of patches too. Everything is
applied automatically.
> What I don't understand is, if Debian already supports the ARM
> architecture why rewrite all of their patches for a new distro. What is
> the advantage of Gentoo over Debian?
I think that the main advantage is full control. You have full control
over gcc optimizations, linking to external libs, bringing in
dependencies, applying patches, minimizing the size of the installation,
and a lot more. That's usually one of the biggest concerns for embedded
people, because of space vs. speed constraints.
That's the main advantage that gentoo has over any binary distro,
although gentoo also supports a binary package system, not just building
from source.
For example, for me to build a full userland for uclibc for the ts boards:
UCLIBC_CPU="ARM920T" \
ROOT="/sysroot" \
PORTAGE_CONFIGROOT="/sysroot" \
emerge -av uclibc
ROOT="/sysroot" \
PORTAGE_CONFIGROOT="/sysroot" \
USE="savedconfig make-symlinks" \
emerge -av busybox
If I say emerge -avb, then I get a binary package out of it too.
Just as easily, I emerge jamvm, gnu-classpath, or practically anything.
If you ever feel curious and want to try it out, download a stage3
filesystem for the ARM, set it up as accessible over NFS, and then
chroot into it with one of the boards (or using Qemu).
http://adelie.polymtl.ca/experimental/arm/embedded/stages/
Or if you feel like trying it on your linux workstation, similarly, just
download an i686 stage3 filesystem, chroot into it, and try out emerging
a few packages.
http://adelie.polymtl.ca/releases/x86/2007.0/stages/
You'll also need the portage tree too.
mkdir /usr/portage
emerge sync
In any event, finding alternate hosting shouldn't be difficult at all, I
just thought I'd pose the question first.
~/Chris
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|