Overview
The xPack QEMU RISC-V can be installed automatically, via xpm
(the
recommended method), or manually, by downloading and unpacking one of the
portable archives.
Easy install
The easiest way to install QEMU is by using the binary xPack, available as
@xpack-dev-tools/qemu-riscv
from the npmjs.com
registry.
Prerequisites
The only requirement is a recent
xpm
, which is a portable
Node.js command line application. To install it,
follow the instructions from the
xpm install page.
Install
With xpm available, installing the latest version of the package is quite easy:
cd my-project
xpm init # Only at first use.
xpm install @xpack-dev-tools/qemu-riscv@latest --verbose
This command will always install the latest available version,
in the global xPacks store, which is a platform dependent folder
(check the output of the xpm
command for the actual folder used on
your platform).
XPACKS_STORE_FOLDER
environment variable; for more details please check the
xpm folders page.
.content
. On some platforms
this might be hidden for normal browsing, and require
separate options (like ls -A
) or, in file browsers, to enable
settings like Show Hidden Files.xPacks aware tools, like the Eclipse Embedded CDT plug-ins automatically identify binaries installed with xpm and provide a convenient method to manage paths.
@xpack-dev-tools
scope was
added to GNU MCU Eclipse plug-ins with v4.6.1 in 2019-09-23; update
older versions or configure the path manually.Uninstall
To remove the links from the current project:
cd my-project
xpm uninstall @xpack-dev-tools/qemu-riscv
To completely remove the package from the central xPacks store:
xpm uninstall --global @xpack-dev-tools/qemu-riscv --verbose
Manual install
For all platforms, the xPack QEMU RISC-V binaries are released as portable archives that can be installed in any location.
The archives can be downloaded from the GitHub Releases pages.
Download
The Windows versions of xPack QEMU RISC-V are packed as ZIP files. Download the latest version named like:
xpack-qemu-riscv-7.0.0--win32-x64.zip
process.platform
and process.arch
.
The win32
part is confusing, but we have to live with it.Unpack
To manually install the xPack QEMU RISC-V,
unpack the archive and copy it into the
%USERPROFILE%\AppData\Roaming\xPacks\qemu-riscv
(for example C:\Users\ilg\AppData\Roaming\xPacks\qemu-riscv
) folder;
according to Microsoft, AppData\Roaming
is the recommended location for
installing user specific packages.
@xpack-dev-tools
) to group different tools,
and .content
to store the unpacked archive.Test
To check if the manually installed QEMU starts, use something like:
C:\>%USERPROFILE%\AppData\Roaming\xPacks\qemu-riscv\xpack-qemu-riscv-7.0.0-\bin\qemu-system-riscv32.exe" --version
xPack QEMU emulator version 7.0.0 (v7.0.0-xpack)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
Drivers
For usual RISC-V emulation, there are no special drivers required.
Download
The macOS versions of xPack QEMU RISC-V
are packed as .tar.gz
archives.
Download the latest version named like:
xpack-qemu-riscv-7.0.0--darwin-x64.tar.gz
xpack-qemu-riscv-7.0.0--darwin-arm64.tar.gz
Unpack
To manually install the xPack QEMU RISC-V,
unpack the archive and move it to
~/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-
:
mkdir -p ~/.local/xPacks/qemu-riscv
cd ~/.local/xPacks/qemu-riscv
tar xvf ~/Downloads/xpack-qemu-riscv-7.0.0--darwin-x64.tar.gz
chmod -R -w xpack-qemu-riscv-7.0.0-
The result is a structure like:
$ tree -L 2 /Users/ilg/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-
/Users/ilg/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-/
├── README.md
├── bin
│ ├── qemu-system-riscv32
│ └── qemu-system-riscv64
├── distro-info
│ ├── CHANGELOG.md
│ ├── licenses
│ ├── patches
│ └── scripts
├── include
│ └── qemu-plugin.h
├── libexec
│ ├── libcrypto.1.1.dylib
│ ├── libffi.8.dylib
│ ├── libgio-2.0.0.dylib
│ ├── libglib-2.0.0.dylib
│ ├── libgmodule-2.0.0.dylib
│ ├── libgobject-2.0.0.dylib
│ ├── libiconv.2.dylib
│ ├── libintl.8.dylib
│ ├── libjpeg.9.dylib
│ ├── liblzo2.2.dylib
│ ├── libncursesw.6.dylib
│ ├── libnettle.8.4.dylib
│ ├── libnettle.8.dylib -> libnettle.8.4.dylib
│ ├── libpixman-1.0.40.0.dylib
│ ├── libpixman-1.0.dylib -> libpixman-1.0.40.0.dylib
│ ├── libpng16.16.dylib
│ ├── libssh.4.8.7.dylib
│ ├── libssh.4.dylib -> libssh.4.8.7.dylib
│ ├── libusb-1.0.0.dylib
│ ├── libvdeplug.3.dylib
│ ├── libz.1.2.12.dylib
│ ├── libz.1.dylib -> libz.1.2.12.dylib
│ ├── libzstd.1.5.2.dylib
│ └── libzstd.1.dylib -> libzstd.1.5.2.dylib
└── share
├── applications
├── icons
└── qemu
11 directories, 29 files
Test
To check if the manually installed QEMU starts, use something like:
$ ~/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-/bin/qemu-system-riscv32 --version
xPack QEMU emulator version 7.0.0 (v7.0.0-xpack)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
Download
The GNU/Linux versions of xPack QEMU RISC-V
are packed as .tar.gz
archives.
Download the latest version named like:
xpack-qemu-riscv-7.0.0--linux-x64.tar.gz
xpack-qemu-riscv-7.0.0--linux-arm.tar.gz
xpack-qemu-riscv-7.0.0--linux-arm64.tar.gz
As the name implies, these are GNU/Linux tar.gz
archives; they were build on
Ubuntu, but can be executed on most recent GNU/Linux distributions.
Unpack
To manually install the xPack QEMU RISC-V,
unpack the archive and move it to
~/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-
:
mkdir -p ~/.local/xPacks/qemu-riscv
cd ~/.local/xPacks/qemu-riscv
tar xvf ~/Downloads/xpack-qemu-riscv-7.0.0--linux-x64.tar.gz
chmod -R -w xpack-qemu-riscv-7.0.0-
@xpack-dev-tools
) to group different tools,
and .content
to store the unpacked archive.The result is a structure like:
$ tree -L 2 '/home/ilg/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-'
/home/ilg/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-/
├── bin
│ ├── qemu-system-riscv32
│ └── qemu-system-riscv64
├── distro-info
│ ├── CHANGELOG.md
│ ├── licenses
│ ├── patches
│ └── scripts
├── include
│ └── qemu-plugin.h
├── libexec
│ ├── libatomic.so.1 -> libatomic.so.1.2.0
│ ├── libatomic.so.1.2.0
│ ├── libcrypto.so.1.1
│ ├── libffi.so.8 -> libffi.so.8.1.0
│ ├── libffi.so.8.1.0
│ ├── libgcc_s.so.1
│ ├── libgio-2.0.so.0 -> libgio-2.0.so.0.5600.4
│ ├── libgio-2.0.so.0.5600.4
│ ├── libglib-2.0.so.0 -> libglib-2.0.so.0.5600.4
│ ├── libglib-2.0.so.0.5600.4
│ ├── libgmodule-2.0.so.0 -> libgmodule-2.0.so.0.5600.4
│ ├── libgmodule-2.0.so.0.5600.4
│ ├── libgobject-2.0.so.0 -> libgobject-2.0.so.0.5600.4
│ ├── libgobject-2.0.so.0.5600.4
│ ├── libiconv.so.2 -> libiconv.so.2.6.1
│ ├── libiconv.so.2.6.1
│ ├── libjpeg.so.9 -> libjpeg.so.9.5.0
│ ├── libjpeg.so.9.5.0
│ ├── liblzo2.so.2 -> liblzo2.so.2.0.0
│ ├── liblzo2.so.2.0.0
│ ├── libncursesw.so.6 -> libncursesw.so.6.3
│ ├── libncursesw.so.6.3
│ ├── libnettle.so.8 -> libnettle.so.8.4
│ ├── libnettle.so.8.4
│ ├── libpixman-1.so.0 -> libpixman-1.so.0.40.0
│ ├── libpixman-1.so.0.40.0
│ ├── libpng16.so.16 -> libpng16.so.16.37.0
│ ├── libpng16.so.16.37.0
│ ├── libresolv-2.27.so
│ ├── libresolv.so.2 -> libresolv-2.27.so
│ ├── libSDL2-2.0.so.0 -> libSDL2-2.0.so.0.22.0
│ ├── libSDL2-2.0.so.0.22.0
│ ├── libSDL2_image-2.0.so.0 -> libSDL2_image-2.0.so.0.2.3
│ ├── libSDL2_image-2.0.so.0.2.3
│ ├── libssh.so.4 -> libssh.so.4.8.7
│ ├── libssh.so.4.8.7
│ ├── libssp.so.0 -> libssp.so.0.0.0
│ ├── libssp.so.0.0.0
│ ├── libusb-1.0.so.0 -> libusb-1.0.so.0.3.0
│ ├── libusb-1.0.so.0.3.0
│ ├── libvdeplug.so.3 -> libvdeplug.so.3.0.1
│ ├── libvdeplug.so.3.0.1
│ ├── libz.so.1 -> libz.so.1.2.12
│ ├── libz.so.1.2.12
│ ├── libzstd.so.1 -> libzstd.so.1.5.2
│ └── libzstd.so.1.5.2
├── README.md
└── share
├── applications
├── icons
└── qemu
11 directories, 51 files
Test
To check if the manually installed QEMU starts, use something like:
$ ~/.local/xPacks/qemu-riscv/xpack-qemu-riscv-7.0.0-/bin/qemu-system-riscv32 --version
xPack QEMU emulator version 7.0.0 (v7.0.0-xpack)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
UDEV & Drivers
For usual RISC-V emulation, there are no special UDEV definitions or drivers required.