Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM emulation on x86_64 via QEMU fails #159

Open
crescent-scroll opened this issue Sep 27, 2016 · 1 comment
Open

ARM emulation on x86_64 via QEMU fails #159

crescent-scroll opened this issue Sep 27, 2016 · 1 comment

Comments

@crescent-scroll
Copy link

Invoking JUNEST_HOME=~/.junest-arm junest -a arm -- uname -m as suggested in the README yields

Installing JuNest...
The default mirror URL is https://mirrors.kernel.org/archlinux/$repo/os/$arch.
Remember to refresh the package databases from the server:
    pacman -Syy
JuNest installed successfully
Emulating JuNest via QEMU...
Unable to reserve 0xf7000000 bytes of virtual address space for use as guest address space (check your virtual memory ulimit setting or reserve less using -R option)
Unable to reserve 0xf7000000 bytes of virtual address space for use as guest address space (check your virtual memory ulimit setting or reserve less using -R option)
Error: Check if the junest arguments are correct and if the kernel is too old use the option junest -p "-k 3.10"

uname -a outputs
Linux Lydia 4.5.0-0.bpo.2-amd64 #1 SMP Debian 4.5.4-1~bpo8+1 (2016-05-13) x86_64 GNU/Linux

Any suggestions? Thanks!

@crescent-scroll
Copy link
Author

crescent-scroll commented Oct 2, 2016

After some experimenting with proot the problem appears to be related to the qemu-arm-static binary from the qemu-user-static-2.6-3 Archlinux package only. Other binaries from the same package seem to work fine, for instance AArch64 emulation on x86_64:

$ ./proot -R archlinux-aarch64 -q ./qemu-aarch64-static uname -a
Linux Lydia 4.5.0-0.bpo.2-amd64 #1 SMP Debian 4.5.4-1~bpo8+1 (2016-05-13) aarch64 GNU/Linux

To get things working on ARMv7h the qemu-arm-static binary from this random OpenSuse package can be used:

$ ./proot -R archlinux-armv7h -q ./qemu-arm-static uname -a
Linux Lydia 4.5.0-0.bpo.2-amd64 #1 SMP Debian 4.5.4-1~bpo8+1 (2016-05-13) armv7l GNU/Linux

Update: Apparently the best workaround is to export QEMU_RESERVED_VA=0xf700000 before invoking qemu-arm-static, though it's still a mystery why qemu-aarch64-static can do what qemu-arm-static can't.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant