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

View File

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

View File

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