-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (27 loc) · 967 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM debian:latest
WORKDIR /build
ENV PS2DEV /usr/local/ps2dev
ENV PS2SDK ${PS2DEV}/ps2sdk
ENV PATH $PATH:${PS2DEV}/bin:${PS2DEV}/ee/bin:${PS2DEV}/iop/bin:${PS2DEV}/dvp/bin:${PS2SDK}/bin
RUN \
apt update && \
apt upgrade -y && \
apt install -y gcc build-essential git musl-dev patch wget curl
RUN \
git clone https://github.com/ps2dev/ps2toolchain && \
cd ps2toolchain && \
./toolchain.sh && \
cd .. && \
rm -Rf ps2toolchain
RUN \
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y && \
. $HOME/.cargo/env && \
rustup component add rust-src && \
cargo install cargo-xbuild
RUN \
curl https://ftp.gnu.org/gnu/binutils/binutils-2.31.tar.gz | tar zx && \
cd binutils-2.31 && \
CC_FOR_TARGET=$PS2DEV/ee/bin/ee-gcc ./configure --target=mips64el-none-elf && \
make && make install && \
rm -rf binutils-2.31
CMD . $HOME/.cargo/env && cargo xbuild --target ps2.json