[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] Issue with qemu chroot and musl
From: |
Peter Maydell |
Subject: |
Re: [Qemu-discuss] Issue with qemu chroot and musl |
Date: |
Thu, 18 Sep 2014 12:39:50 -0700 |
On 18 September 2014 12:14, Dave Flogeras <address@hidden> wrote:
> I have used aboriginal linux (http://landley.net/aboriginal/) 1.2.8 to
> create a musl based root filesystem with the following command:
>
> MUSL=1 ./build.sh armv6l
>
> After this I set up binfmt to call a qemu-arm (which I have build
> statically via Gentoo portage). If I chroot into the root-filesystem
> I can work with it, but I notice that I am being peppered with "qemu:
> Unsupported syscall: 346".
>
>
> This does not happen when I qemu+chroot into other arm roots (albeit
> glibc or uClibc based). I have boiled it down the to simplest C
> program to reproduce the warning:
>
> #include <sys/epoll.h>
> int main() { epoll_wait( 0,0,0,0 ); }
ARM syscall 346 is epoll_pwait. It looks like we have the support
for this in QEMU but didn't turn it on for ARM for some reason.
Try changing the line in linux-user/arm/syscall_nr.h from
/* 346 for epoll_pwait */
to
#define TARGET_NR_epoll_pwait (346)
and rebuilding QEMU.
Since epoll_pwait is a fairly new syscall, you'll find that
(a) older glibc/etc won't use it, which is why your other
chroots don't emit warnings
(b) newer glibc will have a fallback code path for when the
syscall fails ENOSYS, which is why your new chroot works
OK apart from printing the warning messages
Anyway, if you can test the suggested fix above and let me
know if it works, I'll submit a patch to qemu-devel for it.
thanks
-- PMM