Skip to content

QEMU Hexagon on Windows x86‐64

quic-mathbern edited this page Apr 17, 2024 · 9 revisions

Dependencies

To run qemu-system-hexagon on Windows, you will need to install some dependencies:

  1. First download and install msys2: https://www.msys2.org/
  2. On msys2, install the dependency packages:
    pacman -S mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-glib2 \
              mingw-w64-x86_64-pixman mingw-w64-x86_64-libpng \
              mingw-w64-x86_64-gettext mingw-w64-x86_64-pcre2 \
              mingw-w64-x86_64-libiconv
  1. Set up the Windows PATH variable to include the mingw directory when looking for DLLs. You can do that easily at CMD using pathman (See the troubleshooting section bellow for an alternative):

    1. First install pathman: curl.exe -sA "MS" https://webinstall.dev/pathman | powershell
    2. Them add the two required paths:
    cmd /c "pathman add C:\msys64\mingw64\bin"
    cmd /c "pathman add C:\msys64\mingw64\lib"
    
  2. Done! You should now be able to open CMD or PowerShell and run qemu-system-hexagon.exe --help:

Troubleshooting

  • If you get the following error when trying to install the libs with pacman: error: failed to synchronize all databases (unable to lock database), it means another pacman instance is running or it was running but ended abruptly, in which case you can run rm -f /var/lib/pacman/db.lck in a msys2 shell and retry the installation.

  • If you see an error like error: failed retrieving file 'ucrt64.db' from mirror.msys2.org: SSL certificate problem: self-signed certificate in certificate chain in a company network, that is likely because your company has a custom TLS CA certificate that prevents pacman from verifying the connections. MinGW has instructions on how to fix that at: https://www.msys2.org/docs/faq/#how-can-i-make-msys2pacman-trust-my-companys-custom-tls-ca-certificate.

  • If you had any issues updating the windows PATH variable with pathman, you can also do it manually through the GUI:

    1. In the Windows Menu, search for "system variables", then click on "Edit the system environment variables"

    2. Click on "Environment Variables"

    3. At the bottom section, look for the "PATH" entry. Select it and click "edit"

    4. Add two new entries:

        C:\msys64\mingw64\bin
        C:\msys64\mingw64\lib
    
    1. Click "OK" in all the menu windows to save.
Clone this wiki locally