mirror of https://github.com/geohot/qira
update installer to warn about non linux
This commit is contained in:
parent
7fd8778155
commit
28ea233655
|
@ -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'
|
||||||
|
|
|
@ -9,6 +9,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build qemu
|
# build qemu
|
||||||
|
if [[ "$(uname)" == 'Linux' ]]; then
|
||||||
if [ $(tracers/qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then
|
if [ $(tracers/qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then
|
||||||
echo "QIRA QEMU appears to run okay"
|
echo "QIRA QEMU appears to run okay"
|
||||||
else
|
else
|
||||||
|
@ -17,6 +18,12 @@ else
|
||||||
./qemu_build.sh
|
./qemu_build.sh
|
||||||
cd ../
|
cd ../
|
||||||
fi
|
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"
|
echo "building python venv"
|
||||||
virtualenv venv
|
virtualenv venv
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue