Package: qemu-user-static
Version: 1:2.8+dfsg-6
Severity: normal
When /usr/bin/qemu-arm-static is run by default it emulates armv7l. I want to
emulate armv5tel so I need to set QEMU_CPU=pxa250 before running
/usr/bin/qemu-arm-static. This is OK when I want to run a single process
or chroot shell. But when I want to have a full environment running with
systemd-nspawn and ssh to it things don't work.
I wrote the following wrapper to /usr/bin/qemu-arm-static as a hack to work
around this, but it is annoying to deploy. It would be much easier if
/usr/bin/qemu-arm-static would read /etc/qemu/arm.conf or something to get
configuration for such things.
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
if(setenv("QEMU_CPU", "pxa250", 1))
{
printf("Can't set $QEMU_CPU\n");
return 1;
}
execv("/usr/bin/qemu-arm-static.orig", argv);
printf("Can't execute \"%s\" because of qemu failure\n", argv[0]);
return 1;
}
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
qemu-user-static depends on no packages.
Versions of packages qemu-user-static recommends:
ii binfmt-support 2.1.7-1
Versions of packages qemu-user-static suggests:
ii sudo 1.8.20p2-1
-- no debconf information