Skip to content

Building QEMU for ARC

Cupertino Miranda edited this page Nov 18, 2020 · 4 revisions
  1. Install the prerequisite host packages.

  2. Clone the repo:

# master branch
git clone https://github.com/foss-for-synopsys-dwc-arc-processors/qemu.git

# a particular remote branch
git clone --single-branch --branch REMOTE_BRANCH_NAME https://github.com/foss-for-synopsys-dwc-arc-processors/qemu.git
  1. Configure QEMU for ARC:
./configure --target-list=arc-softmmu                \ # arc target
            --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
            --extra-cflags='-O0 -g3 -save-temps=obj' \ # for developers
            --disable-pie                              # needed for older GCCs (like CentOS 7)
  1. Build and install:
make
make install
  1. Run the test-suite:
cd tests/tcg/arc && make check
  1. Set the following shell variables:
export QEMU_HOME=/PATH/TO/INSTALL/QEMU
export PATH=/PATH/TO/INSTALL/QEMU/bin:$PATH

Or better, use the following module environment:

#%Module1.0########################################################################
##
## ARC qemu module file
##

set ModulesVersion      "work"

proc ModulesHelp {} {
   global version

   puts stderr "   This module loads the ARC qemu"
   puts stderr "   located in qemu/install"
   puts stderr "   Version $version"
   puts stderr ""
}

module-whatis         "qemu"

set qemuinstall        /PATH/TO/INSTALL/QEMU

setenv       QEMU_HOME         $qemuinstall
prepend-path PATH              $qemuinstall/bin
Clone this wiki locally