Skip to content

Instantly share code, notes, and snippets.

@franzflasch
Last active November 2, 2018 08:09
Show Gist options
  • Save franzflasch/41fa08b92f6eb31f70e322ded9874ec6 to your computer and use it in GitHub Desktop.
Save franzflasch/41fa08b92f6eb31f70e322ded9874ec6 to your computer and use it in GitHub Desktop.

1. Prepare prerequisites:

apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev libpython-dev python-pip python-capstone virtualenv

2. Build qemu-riscv:

cd ..
git clone https://github.com/riscv/riscv-qemu.git
cd riscv-qemu
./configure --target-list=riscv64-softmmu,riscv32-softmmu
make -j8
sudo make install

3. Run qemu with hello world example:

./qemu-system-riscv32 -nographic -machine sifive_e -kernel rem_riscv_test/risc-v_hifive1/deploy/riscv-hello_nohash/riscv-hello.elf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment