From 40ff873194c3a8fc9ed0960b2296a43fed1e095d Mon Sep 17 00:00:00 2001 From: Charles Ellis Date: Mon, 25 Mar 2019 13:14:16 -0700 Subject: [PATCH 1/4] QEMU tracer uses version 3.1.0 QEMU now uses Capstone for its disassembly output, so that dependency has been added as well. --- docker/Dockerfile | 2 +- install.sh | 2 +- tracers/qemu_build.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b72d289c24..1727a8fc59 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get -y install build-essential gcc-multilib g++-multilib lib32z1 git curl python python-virtualenv python-dev # qemu deps -RUN apt-get -y install pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev +RUN apt-get -y install pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev libcapstone-dev WORKDIR /qira diff --git a/install.sh b/install.sh index 8d1a313f86..79b0d28c9b 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ # install system deps if [ $(which apt-get) ]; then echo "installing deps for ubuntu" - sudo apt-get -y install git curl python python-virtualenv python-dev build-essential pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev + sudo apt-get -y install git curl python python-virtualenv python-dev build-essential pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev libcapstone-dev else echo "*** You'll need to install Ubuntu or get a working build env for qemu and python yourself ***" fi diff --git a/tracers/qemu_build.sh b/tracers/qemu_build.sh index 4f5e030d32..ca4fc05801 100755 --- a/tracers/qemu_build.sh +++ b/tracers/qemu_build.sh @@ -2,10 +2,10 @@ if [ ! -d qemu/qemu ]; then cd qemu - git clone https://github.com/geohot/qemu.git --depth 1 --branch qira + git clone https://github.com/geohot/qemu.git --depth 1 --branch v3.1.0-qira cd .. fi cd qemu/qemu -./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --cpu=unknown --python=python +./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --enable-capstone --cpu=unknown --python=python make -j$(getconf _NPROCESSORS_ONLN) From 9024bb0d5d6b847648f5e75f0ea116c447a5c930 Mon Sep 17 00:00:00 2001 From: Charles Ellis Date: Mon, 25 Mar 2019 13:20:33 -0700 Subject: [PATCH 2/4] QEMU requires known CPU arch for user-mode --- tracers/qemu_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracers/qemu_build.sh b/tracers/qemu_build.sh index ca4fc05801..b4b0681a79 100755 --- a/tracers/qemu_build.sh +++ b/tracers/qemu_build.sh @@ -7,5 +7,5 @@ if [ ! -d qemu/qemu ]; then fi cd qemu/qemu -./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --enable-capstone --cpu=unknown --python=python +./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --enable-capstone --python=python make -j$(getconf _NPROCESSORS_ONLN) From 1a14014ec174c671dd12e4fb1170c7cd5571f762 Mon Sep 17 00:00:00 2001 From: Charles Ellis Date: Mon, 25 Mar 2019 15:21:28 -0700 Subject: [PATCH 3/4] Use Ubuntu 16.04 for Travis CI QEMU version 3.1.0 requires Capstone for disassembly and Ubuntu 14.04 does not have the libcapstone-dev package. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5078e36da0..7561e02f77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +dist: xenial + sudo: true language: python From 1830d4001d77354fbf5c842e9eb2098c8190418d Mon Sep 17 00:00:00 2001 From: Charles Ellis Date: Mon, 25 Mar 2019 15:29:20 -0700 Subject: [PATCH 4/4] Qira works on Ubuntu 16.04 and 18.04 --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 7e9c1977ad..8c32a1852d 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,7 @@ ## Supported OS
-Ubuntu 14.04 and 16.04 supported out of the box.
-18.04 is having a problem with building QEMU
-See forked QEMU source at https://github.com/geohot/qemu/tree/qira to fix.
+Ubuntu 16.04 and 18.04 are supported out of the box.
 
 Non Linux hosts may run the rest of QIRA, but cannot run the QEMU tracer.
 Very limited support for Mac OS X and Windows natively.