If qemu-arm fails mysteriously, try to run it under strace. It might tell you if it look 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")
echo $aptdata
url=$(echo "$aptdata" | sed -e "s/^'\([^']*\)'.*$/\1/")
file=$(echo "$aptdata" | sed -e "s/^'[^']*' \([^ ]*\).*$/\1/")
echo $url
echo $file
curl "$url" > "$file"
done
This script assume your first apt source is a Debian archive that include 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 libreadline4 pari-gp
cd ..
for pkg in debs/*; do \
echo "Extracting $pkg..."; dpkg-deb -x $pkg ARM; done
To access libraries in ARM/usr/X11R6/lib, you need to change your
LD_LIBRARY_PATH variable:
export LD_LIBRARY_PATH=/scratch/qemu/ARM/usr/X11R6/lib
Now, you can try
qemu-arm -L /scratch/qemu/ARM ARM/usr/bin/gp
GP/PARI CALCULATOR Version 2.1.6 (released)
arm running linux (C portable kernel) 32-bit version
As a comparaison of performance, debussy.debian.org runs the PARI/GP benchmark in 17246ms. A Athlon 1800+ running qemu-arm run the benchmark in 14730ms. The native binary run in 1340ms.
Using qemu syscall emulation with Debian.
version 0.0, 1 mars 2005ballombe@debian.org