papermario/Dockerfile

65 lines
1.5 KiB
Docker
Raw Normal View History

2020-04-24 06:26:17 +02:00
FROM ubuntu:18.04 as build
RUN apt-get update && \
apt-get install -y \
binutils-mips-linux-gnu \
build-essential \
pkg-config \
python3 \
python3-pip \
wget \
git \
2020-04-24 09:04:30 +02:00
unzip \
nano \
libcapstone-dev \
libyaml-dev \
2020-04-27 21:43:21 +02:00
zlib1g-dev \
2020-05-12 06:45:15 +02:00
vbindiff \
bison \
flex \
texinfo
2020-04-24 06:26:17 +02:00
2020-05-12 06:45:15 +02:00
# Install qemu-irix
2020-04-24 06:26:17 +02:00
RUN wget \
https://github.com/n64decomp/qemu-irix/releases/download/v2.11-deb/qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb \
-O qemu.deb && \
echo 8170f37cf03a08cc2d7c1c58f10d650ea0d158f711f6916da9364f6d8c85f741 qemu.deb | sha256sum --check && \
dpkg -i qemu.deb && \
rm qemu.deb
2020-05-12 06:45:15 +02:00
# Build binutils
RUN wget https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.bz2 -O binutils.tar.bz2
RUN tar xjf binutils.tar.bz2
RUN mkdir -p /opt/cross
# mips-linux-gnu
RUN mkdir build-binutils && cd build-binutils
RUN /binutils-2.34/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror
RUN make && make install
# mips-sgi-irix5
RUN make distclean
RUN /binutils-2.34/configure --target=mips-sgi-irix5 --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror
RUN make && make install
RUN rm binutils.tar.bz2
ENV PATH="/opt/cross/bin:${PATH}"
# Install python dependencies
2020-04-24 06:26:17 +02:00
RUN python3 -m pip install --user colorama ansiwrap attrs watchdog python-Levenshtein
2020-05-12 06:45:15 +02:00
# Build capstone
2020-04-28 08:16:54 +02:00
RUN git clone https://github.com/aquynh/capstone.git && \
cd capstone && \
git checkout tags/4.0 && \
./make.sh && \
./make.sh install
2020-05-12 06:45:15 +02:00
2020-04-24 06:26:17 +02:00
RUN mkdir /pm
WORKDIR /pm