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

QEMU-related enhancements #1052

Merged
merged 8 commits into from
Oct 13, 2017
Merged

Conversation

zachriggle
Copy link
Member

This refactors some of the QEMU-related code, adds documentation, and adds support for discovering the default QEMU_LD_PREFIX value.

QEMU_LD_PREFIX is an environment variable that determines where qemu user-mode emulation will attempt to resolve file paths if the "real" file doesn't exist. On Ubuntu, this is e.g. /etc/qemu-binfmt/arm, which is then generally symlinked to e.g. /usr/arm-linux-gnueabihf.

Previously, we hard-coded logic to expect /etc/qemu-binfmt. Other distros use other paths, and in fact vanilla (non-Ubuntu-maintained) QEMU uses a different path.

We now detect the path appropriately by checking the environment, and extract the compiled-into-QEMU default value by running e.g. qemu-arm --help. The help message contains a lines that look like:

Defaults:
QEMU_LD_PREFIX  = /etc/qemu-binfmt/arm
QEMU_STACK_SIZE = 8388608 byte

This goes all the way back to at least qemu 2.0.0, which is probably sufficient.

@zachriggle zachriggle self-assigned this Oct 12, 2017
@zachriggle zachriggle merged commit 412d345 into Gallopsled:dev Oct 13, 2017
@TethysSvensson TethysSvensson added this to the 3.11.0 milestone Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants