-
Notifications
You must be signed in to change notification settings - Fork 0
Building QEMU
BrunoASMauricio edited this page Jul 12, 2023
·
13 revisions
(From https://github.com/foss-for-synopsys-dwc-arc-processors/qemu/wiki/Building-QEMU-for-ARC and https://github.com/foss-for-synopsys-dwc-arc-processors/qemu/wiki/QEMU-and-Zephyr)
On different GNU/Linux distributions, some packages are needed. I list them here, but for a recent one consult the original prerequisite packages page.
sudo pacman -S git cmake ninja gperf ccache dfu-util dtc wget \
python-pip python-setuptools python-wheel xz file makesudo dnf group install "Development Tools" "C Development Tools and Libraries"
dnf install git cmake ninja-build gperf ccache dfu-util dtc wget \
python3-pip xz file glibc-devel.i686 libstdc++-devel.i686sudo apt-get install --no-install-recommends git cmake ninja-build gperf \
ccache dfu-util device-tree-compiler wget \
python3-pip python3-setuptools python3-wheel \
xz-utils file make gcc gcc-multilibsudo xbps-install git cmake ninja gperf ccache dfu-util dtc wget \
python3-pip python3-setuptools python3-wheel xz \
file makeClone the repo into your source folder with git clone https://github.com/foss-for-synopsys-dwc-arc-processors/qemu.git
In a separate build folder, configure QEMU. A common configuration follows:
./configure --target-list=arc-softmmu,arc64-softmmu,arc-linux-user,arc64-linux-user \ # QEMU ARC targets
--prefix=/PATH/TO/INSTALL/QEMU \ # where you want it installed
--enable-debug \ # for developers
--enable-debug-tcg \ # for developers
--enable-trace-backends=simple \ # for developers
--disable-plugins \ # for developers
--disable-werror \ # in case QEMU emits unexpected warnings
--disable-pie # needed for older GCCs (like CentOS 7)To enable TCG testing, the arc-elf32-gcc and arc64-elf-gcc compilers must be available during configuration, and the following two arguments added to the command above
--cross-cc-arc=arc-elf32-gcc --cross-cc-arc64=arc64-elf-gccmake
make installmake clean-tcg
make build-tcg
make check-tcg