arm-linux: factored some stuff out of arm-linux-qemu.sh