Skip to content

cargo xtest doesn't work under WSL1 with native QEMU #57

@vlovich

Description

@vlovich
  1. Install QEMU natively on Windows
  2. Under WSL setup cargo
  3. In ~/bin/qemu-system-x86_64 put exec /mnt/c/Program\ Files/qemu/qemu-system-x86_64.exe "$@" and make the file executable
  4. run cargo xrun
  5. run cargo xtest

The xrun command works because it provides a relative path to the target to run to qemu. However xtest fails because it provides an absolute path which native QEMU doesn't understand. Passing a relative path just like xrun does should fix the issue.

Running: `qemu-system-x86_64 -drive format=raw,file=/mnt/c/projects/blog_os/target/x86_64-blog_os/debug/deps/bootimage-blog_os-f9b6181f9decdfac.bin -device isa-debug-exit,iobase=0xf4,iosize=0x04 -serial stdio -display none`
C:\Program Files\qemu\qemu-system-x86_64.exe: -drive format=raw,file=/mnt/c/projects/blog_os/target/x86_64-blog_os/debug/deps/bootimage-blog_os-f9b6181f9decdfac.bin: Could not open '/mnt/c/open/blog_os/target/x86_64-blog_os/debug/deps/bootimage-blog_os-f9b6181f9decdfac.bin': The system cannot find the path specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions