If qemu-arm fails mysteriously, try to run it under strace. It might tell you if it looks for a file in the wrong place.
Note that qemu-arm will not run scripts. This is not really a limitation since script have a hard-coded path to the interpretor which will point to the native version.
Current qemu really does not like symlink to directories in the directory pointed by -L.
If you want to install more packages, you can download them with this variant of debget (that I will call debget-arm).
#!/bin/bash -e
for pkgspec in $*; do
version=$(apt-get -q2 -s --reinstall install "$pkgspec" | grep ^Inst | sed -ne '$s/^.*\[\(.*\)\].*$/\1/p')
echo "($pkgspec -> $version)"
aptdata=$(apt-get -q2 --print-uris --reinstall install "$pkgspec" | tail -1|sed -e "s/_i386\.deb/_arm\.deb/g")
url=$(echo "$aptdata" | sed -e "s/^'\([^']*\)'.*$/\1/")
file=$(echo "$aptdata" | sed -e "s/^'[^']*' \([^ ]*\).*$/\1/")
curl "$url" > "$file"
done
This script assumes your first apt source is a Debian archive that includes the arm architecture and the packages are in sync on arm. As an example I will try to get pari-gp running: I run
mkdir debs; cd debs;
../debget-arm libpari1 libx11-6 libxau6 libxdmcp6 libreadline5 pari-gp
cd ..
for pkg in debs/*.deb; do \
echo "Extracting $pkg..."; dpkg-deb -x $pkg ARM; done
Now, you can try
qemu-arm -L /scratch/qemu/ARM/ ARM/usr/bin/gp
Reading GPRC: /home/bill/.gprc ...Done.
GP/PARI CALCULATOR Version 2.1.7 (released)
arm running linux (C portable kernel) 32-bit version
(readline v5.0 enabled, extended help available)
As a comparaison of performance, debussy.debian.org runs the PARI/GP benchmark in 17246ms. An Athlon 1800+ running qemu-arm run the benchmark in 13186ms. The native binary run in 1070ms.
Using qemu syscall emulation with Debian.
version 0.2, 20 avril 2006ballombe@debian.org