[Aboriginal] Playing with other toolchains.
Rob Landley
rob at landley.net
Sun Jul 31 09:42:34 PDT 2011
A lot of projects seem to use the prebuilt binary toolchain from the
Code Sourcery first quarter 2009 armv7 release, so let's download that:
http://www.codesourcery.com/sgpp/lite/arm/portal/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
Next extract it and plug it into the build using the appropriate names:
cd aboriginal
tar xvjf ~/arm-2009q1*.tar.bz2
mkdir -p build/cross-compiler-armv7l/bin
for i in $(ls arm-2009q1/bin)
do
RENAME="$(echo $i | sed 's/arm-none-linux-gnueabi/armv7l/')"
ln -s ../../../arm-2009q1/bin/$i \
build/cross-compiler-armv7l/bin/$RENAME
done
ln -s armv7l-gcc build/cross-compiler-armv7l/bin/armv7l-cc
Now let's slap together a quick and dirty config, changing the kernel's
V6 symbol for a V7 symbol:
sed "s/V6/V7/" sources/targets/armv6l > sources/targets/armv7l
And let's try the build, using the existing toolchain:
./host-tools.sh
./simple-root-filesystem.sh armv7l
Alright, let's try...
qemu-arm build/simple-root-filesystem-armv7l/bin/ash
Woot, we get a shell. Exit out of that, second question: would it work
dynamically linked? (Remember, busybox static by default...)
readelf -a build/simple-root-filesystem-armv7l/bin/hello-dynamic | \
grep interpreter
And it says:
[Requesting program interpreter: /lib/ld-linux.so.3]
So:
ls build/simple-root-filesystem-armv7l/lib/ld-linux.so.3
Well it's there. Unfortunately, qemu-arm's -L is too fiddly to expect
much out of, and the -chroot option comes and goes (I submitted the
patch years ago, it was in there for a while, but I think you have to
enable it or soemthing). So let's package it up for the muchy less
crappy system emulator:
./root-image.sh armv7l
./linux-kernel.sh armv7l
./system-image.sh armv7l
And the kernel build explodes. At a guess, my versatile patch isn't
doing armv7 properly. (Possibly I didn't bother to forward port that
since I had no way of building it.)
I need to grab a better linux-config.
Anybody else feel like playing with this?
Rob
More information about the Aboriginal
mailing list