Hi, tl;dr Nios II linux-user seems pretty broken
Following up on some mailing list queries about the state of Nios II Thomas pointed out that buildroot could build cross-compilers for the architecture. As a quick experiment I've enabled a docker based buildroot and turned on tests/tcg for it. The results are not very encouraging as both linux-test and test-mmap fail although (impressively?) testthread passes. The test-mmap failure looks like some sort of argument mangling failure as arg6 of target_mmap looks negative/big and hence causes the mmap to fail. I tried messing with the #ifdef mangling logic in do_syscall1 but failed to get it working. The linux-test failure seems like a missing lseek system call but I have no doubt there are others given the bug reports on list. This series includes a hack to min uname which we can't really merge. This is because buildroot is focused on building system images so sets the glibc minimum kernel version to whatever it builds for the system image. I leave the problem of programatically tuning the qemu_nios2_10m50_defconfig to build a general purpose glibc to whoever wants to take this forward. As I'm not particularly interested in this architecture I don't intend to spend any more time on this. Given how broken linux-user is I suspect most users of QEMU's Nios 2 emulation use softmmu. If there is interest in fixing up linux-user then the docker and test/tcg patches can be included when the fixups are sent to the list. I would argue that any linux-user target should at the very least pass all of tests/tcg/multiarch - it's not super comprehensive but it's all we have at the moment. Perhaps we should consider deprecating the obviously less used linux-user targets? Alex Bennée (4): docker: add debian-buildroot-base docker: add buildroot-nios2-cross image linux-user/nios2: bump min uname to 4.16.0 [!HACK] tests/tcg: add nios2 architecture (NEEDS FIXES) linux-user/nios2/target_syscall.h | 2 +- tests/docker/Makefile.include | 6 ++++- .../dockerfiles/buildroot-nios2-cross.docker | 10 +++++++ .../dockerfiles/debian-buildroot-base.docker | 26 +++++++++++++++++++ tests/tcg/nios2/Makefile.include | 2 ++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tests/docker/dockerfiles/buildroot-nios2-cross.docker create mode 100644 tests/docker/dockerfiles/debian-buildroot-base.docker create mode 100644 tests/tcg/nios2/Makefile.include -- 2.17.1