update installer to warn about non linux

This commit is contained in:
George Hotz 2019-03-24 14:46:15 -07:00
parent 7fd8778155
commit 28ea233655
3 changed files with 18 additions and 12 deletions

View File

@ -1,19 +1,18 @@
FROM ubuntu:16.04
# minimal system basics
# system basics
RUN apt-get update
RUN apt-get -y install git curl python
RUN apt-get -y install build-essential git curl python python-virtualenv python-dev
# fetch qira
RUN git clone https://github.com/geohot/qira.git
RUN git clone https://github.com/geohot/qira.git --depth=1
WORKDIR /qira
# build qemu
RUN apt-get -y install build-essential 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
RUN cd tracers && ./qemu_build.sh
# install python packages and link qira
RUN apt-get -y install python python-virtualenv python-dev
RUN virtualenv venv
RUN bash -c 'source venv/bin/activate && pip install --upgrade pip'
RUN bash -c 'source venv/bin/activate && pip install --upgrade -r requirements.txt'

View File

@ -9,13 +9,20 @@ else
fi
# build qemu
if [ $(tracers/qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then
if [[ "$(uname)" == 'Linux' ]]; then
if [ $(tracers/qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then
echo "QIRA QEMU appears to run okay"
else
else
echo "building QEMU"
cd tracers
./qemu_build.sh
cd ../
fi
else
echo "QEMU user only works on Linux."
echo "While the rest of QIRA will run, you cannot run binaries."
echo "This is due to QEMU user forwarding the syscalls to the kernel."
echo "See other backends in qira/tracers, PIN may work on Windows and OS X"
fi
echo "building python venv"

View File

@ -13,7 +13,7 @@ source venv/bin/activate
nosetests -v -s
# integration test
qira qira_tests/bin/loop &
./qira qira_tests/bin/loop &
QIRA_PID=$!
trap "kill $QIRA_PID" EXIT
echo "qira pid is $QIRA_PID"